Rename 'intrinsic' to 'builtin'

This matches the term used in the WGSL spec.

Change-Id: I4603332b828450c126ef806f1064ed54f372013f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78787
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/docs/arch.md b/docs/arch.md
index 3acd7d1..84ec568 100644
--- a/docs/arch.md
+++ b/docs/arch.md
@@ -117,7 +117,7 @@
 
 Semantic information is held by `sem::Node`s which describe the program at
 a higher / more abstract level than the AST. This includes information such as
-the resolved type of each expression, the resolved overload of an intrinsic
+the resolved type of each expression, the resolved overload of a builtin
 function call, and the module scoped variables used by each function.
 
 Semantic information is generated by the `Resolver` when the `Program`
diff --git a/src/BUILD.gn b/src/BUILD.gn
index 5b5c406..58b2f65 100644
--- a/src/BUILD.gn
+++ b/src/BUILD.gn
@@ -337,6 +337,9 @@
     "ast/workgroup_attribute.cc",
     "ast/workgroup_attribute.h",
     "block_allocator.h",
+    "builtin_table.cc",
+    "builtin_table.h",
+    "builtin_table.inl",
     "castable.cc",
     "castable.h",
     "clone_context.cc",
@@ -359,9 +362,6 @@
     "inspector/resource_binding.h",
     "inspector/scalar.cc",
     "inspector/scalar.h",
-    "intrinsic_table.cc",
-    "intrinsic_table.h",
-    "intrinsic_table.inl",
     "program.cc",
     "program.h",
     "program_builder.cc",
@@ -382,6 +382,8 @@
     "sem/behavior.h",
     "sem/binding_point.h",
     "sem/bool_type.h",
+    "sem/builtin.h",
+    "sem/builtin_type.h",
     "sem/call.h",
     "sem/call_target.h",
     "sem/constant.h",
@@ -394,8 +396,6 @@
     "sem/i32_type.h",
     "sem/if_statement.h",
     "sem/info.h",
-    "sem/intrinsic.h",
-    "sem/intrinsic_type.h",
     "sem/loop_statement.h",
     "sem/matrix_type.h",
     "sem/multisampled_texture_type.h",
@@ -536,6 +536,10 @@
     "sem/block_statement.cc",
     "sem/bool_type.cc",
     "sem/bool_type.h",
+    "sem/builtin.cc",
+    "sem/builtin.h",
+    "sem/builtin_type.cc",
+    "sem/builtin_type.h",
     "sem/call.cc",
     "sem/call.h",
     "sem/call_target.cc",
@@ -561,10 +565,6 @@
     "sem/if_statement.h",
     "sem/info.cc",
     "sem/info.h",
-    "sem/intrinsic.cc",
-    "sem/intrinsic.h",
-    "sem/intrinsic_type.cc",
-    "sem/intrinsic_type.h",
     "sem/loop_statement.cc",
     "sem/loop_statement.h",
     "sem/matrix_type.cc",
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f2ce74a..8c0f20a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -219,6 +219,9 @@
   ast/workgroup_attribute.cc
   ast/workgroup_attribute.h
   block_allocator.h
+  builtin_table.cc
+  builtin_table.h
+  builtin_table.inl
   castable.cc
   castable.h
   clone_context.cc
@@ -233,9 +236,6 @@
   inspector/resource_binding.h
   inspector/scalar.cc
   inspector/scalar.h
-  intrinsic_table.cc
-  intrinsic_table.h
-  intrinsic_table.inl
   program_builder.cc
   program_builder.h
   program_id.cc
@@ -260,6 +260,10 @@
   sem/binding_point.h
   sem/block_statement.cc
   sem/block_statement.h
+  sem/builtin_type.cc
+  sem/builtin_type.h
+  sem/builtin.cc
+  sem/builtin.h
   sem/call_target.cc
   sem/call_target.h
   sem/call.cc
@@ -273,10 +277,6 @@
   sem/function.cc
   sem/info.cc
   sem/info.h
-  sem/intrinsic_type.cc
-  sem/intrinsic_type.h
-  sem/intrinsic.cc
-  sem/intrinsic.h
   sem/member_accessor_expression.cc
   sem/parameter_usage.cc
   sem/parameter_usage.h
@@ -624,6 +624,8 @@
     ast/bool_test.cc
     ast/break_statement_test.cc
     ast/builtin_attribute_test.cc
+    ast/builtin_texture_helper_test.cc
+    ast/builtin_texture_helper_test.h
     ast/call_expression_test.cc
     ast/call_statement_test.cc
     ast/case_statement_test.cc
@@ -645,8 +647,6 @@
     ast/index_accessor_expression_test.cc
     ast/int_literal_expression_test.cc
     ast/interpolate_attribute_test.cc
-    ast/intrinsic_texture_helper_test.cc
-    ast/intrinsic_texture_helper_test.h
     ast/invariant_attribute_test.cc
     ast/location_attribute_test.cc
     ast/loop_statement_test.cc
@@ -682,6 +682,7 @@
     ast/vector_test.cc
     ast/workgroup_attribute_test.cc
     block_allocator_test.cc
+    builtin_table_test.cc
     castable_test.cc
     clone_context_test.cc
     debug_test.cc
@@ -689,7 +690,6 @@
     diagnostic/diagnostic_test.cc
     diagnostic/formatter_test.cc
     diagnostic/printer_test.cc
-    intrinsic_table_test.cc
     program_test.cc
     resolver/array_accessor_test.cc
     resolver/assignment_validation_test.cc
@@ -697,6 +697,8 @@
     resolver/atomics_validation_test.cc
     resolver/bitcast_validation_test.cc
     resolver/builtins_validation_test.cc
+    resolver/builtin_test.cc
+    resolver/builtin_validation_test.cc
     resolver/call_test.cc
     resolver/call_validation_test.cc
     resolver/compound_statement_test.cc
@@ -707,8 +709,6 @@
     resolver/function_validation_test.cc
     resolver/host_shareable_validation_test.cc
     resolver/inferred_type_test.cc
-    resolver/intrinsic_test.cc
-    resolver/intrinsic_validation_test.cc
     resolver/is_host_shareable_test.cc
     resolver/is_storeable_test.cc
     resolver/pipeline_overridable_constant_test.cc
@@ -732,12 +732,12 @@
     scope_stack_test.cc
     sem/atomic_type_test.cc
     sem/bool_type_test.cc
+    sem/builtin_test.cc
     sem/depth_multisampled_texture_type_test.cc
     sem/depth_texture_type_test.cc
     sem/external_texture_type_test.cc
     sem/f32_type_test.cc
     sem/i32_type_test.cc
-    sem/intrinsic_test.cc
     sem/matrix_type_test.cc
     sem/multisampled_texture_type_test.cc
     sem/pointer_type_test.cc
@@ -911,6 +911,8 @@
       writer/spirv/builder_binary_expression_test.cc
       writer/spirv/builder_bitcast_expression_test.cc
       writer/spirv/builder_block_test.cc
+      writer/spirv/builder_builtin_test.cc
+      writer/spirv/builder_builtin_texture_test.cc
       writer/spirv/builder_call_test.cc
       writer/spirv/builder_constructor_expression_test.cc
       writer/spirv/builder_discard_test.cc
@@ -922,8 +924,6 @@
       writer/spirv/builder_global_variable_test.cc
       writer/spirv/builder_ident_expression_test.cc
       writer/spirv/builder_if_test.cc
-      writer/spirv/builder_intrinsic_test.cc
-      writer/spirv/builder_intrinsic_texture_test.cc
       writer/spirv/builder_literal_test.cc
       writer/spirv/builder_loop_test.cc
       writer/spirv/builder_return_test.cc
@@ -1020,6 +1020,8 @@
       writer/msl/generator_impl_bitcast_test.cc
       writer/msl/generator_impl_block_test.cc
       writer/msl/generator_impl_break_test.cc
+      writer/msl/generator_impl_builtin_test.cc
+      writer/msl/generator_impl_builtin_texture_test.cc
       writer/msl/generator_impl_call_test.cc
       writer/msl/generator_impl_case_test.cc
       writer/msl/generator_impl_cast_test.cc
@@ -1030,8 +1032,6 @@
       writer/msl/generator_impl_identifier_test.cc
       writer/msl/generator_impl_if_test.cc
       writer/msl/generator_impl_import_test.cc
-      writer/msl/generator_impl_intrinsic_test.cc
-      writer/msl/generator_impl_intrinsic_texture_test.cc
       writer/msl/generator_impl_loop_test.cc
       writer/msl/generator_impl_member_accessor_test.cc
       writer/msl/generator_impl_module_constant_test.cc
@@ -1054,6 +1054,8 @@
       writer/glsl/generator_impl_bitcast_test.cc
       writer/glsl/generator_impl_block_test.cc
       writer/glsl/generator_impl_break_test.cc
+      writer/glsl/generator_impl_builtin_test.cc
+      writer/glsl/generator_impl_builtin_texture_test.cc
       writer/glsl/generator_impl_call_test.cc
       writer/glsl/generator_impl_case_test.cc
       writer/glsl/generator_impl_cast_test.cc
@@ -1063,8 +1065,6 @@
       writer/glsl/generator_impl_function_test.cc
       writer/glsl/generator_impl_identifier_test.cc
       writer/glsl/generator_impl_if_test.cc
-      writer/glsl/generator_impl_intrinsic_test.cc
-      writer/glsl/generator_impl_intrinsic_texture_test.cc
       writer/glsl/generator_impl_import_test.cc
       writer/glsl/generator_impl_loop_test.cc
       writer/glsl/generator_impl_member_accessor_test.cc
@@ -1089,6 +1089,8 @@
       writer/hlsl/generator_impl_bitcast_test.cc
       writer/hlsl/generator_impl_block_test.cc
       writer/hlsl/generator_impl_break_test.cc
+      writer/hlsl/generator_impl_builtin_test.cc
+      writer/hlsl/generator_impl_builtin_texture_test.cc
       writer/hlsl/generator_impl_call_test.cc
       writer/hlsl/generator_impl_case_test.cc
       writer/hlsl/generator_impl_cast_test.cc
@@ -1098,8 +1100,6 @@
       writer/hlsl/generator_impl_function_test.cc
       writer/hlsl/generator_impl_identifier_test.cc
       writer/hlsl/generator_impl_if_test.cc
-      writer/hlsl/generator_impl_intrinsic_test.cc
-      writer/hlsl/generator_impl_intrinsic_texture_test.cc
       writer/hlsl/generator_impl_import_test.cc
       writer/hlsl/generator_impl_loop_test.cc
       writer/hlsl/generator_impl_member_accessor_test.cc
diff --git a/src/ast/builtin_texture_helper_test.cc b/src/ast/builtin_texture_helper_test.cc
new file mode 100644
index 0000000..f272608
--- /dev/null
+++ b/src/ast/builtin_texture_helper_test.cc
@@ -0,0 +1,2286 @@
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/ast/builtin_texture_helper_test.h"
+
+#include "src/sem/depth_texture_type.h"
+#include "src/sem/multisampled_texture_type.h"
+#include "src/sem/sampled_texture_type.h"
+
+namespace tint {
+namespace ast {
+namespace builtin {
+namespace test {
+
+using u32 = ProgramBuilder::u32;
+using i32 = ProgramBuilder::i32;
+using f32 = ProgramBuilder::f32;
+
+TextureOverloadCase::TextureOverloadCase(
+    ValidTextureOverload o,
+    const char* desc,
+    TextureKind tk,
+    ast::SamplerKind sk,
+    ast::TextureDimension dims,
+    TextureDataType datatype,
+    const char* f,
+    std::function<ExpressionList(ProgramBuilder*)> a)
+    : overload(o),
+      description(desc),
+      texture_kind(tk),
+      sampler_kind(sk),
+      texture_dimension(dims),
+      texture_data_type(datatype),
+      function(f),
+      args(std::move(a)) {}
+TextureOverloadCase::TextureOverloadCase(
+    ValidTextureOverload o,
+    const char* desc,
+    TextureKind tk,
+    ast::TextureDimension dims,
+    TextureDataType datatype,
+    const char* f,
+    std::function<ExpressionList(ProgramBuilder*)> a)
+    : overload(o),
+      description(desc),
+      texture_kind(tk),
+      texture_dimension(dims),
+      texture_data_type(datatype),
+      function(f),
+      args(std::move(a)) {}
+TextureOverloadCase::TextureOverloadCase(
+    ValidTextureOverload o,
+    const char* d,
+    Access acc,
+    ast::TexelFormat fmt,
+    ast::TextureDimension dims,
+    TextureDataType datatype,
+    const char* f,
+    std::function<ExpressionList(ProgramBuilder*)> a)
+    : overload(o),
+      description(d),
+      texture_kind(TextureKind::kStorage),
+      access(acc),
+      texel_format(fmt),
+      texture_dimension(dims),
+      texture_data_type(datatype),
+      function(f),
+      args(std::move(a)) {}
+TextureOverloadCase::TextureOverloadCase(const TextureOverloadCase&) = default;
+TextureOverloadCase::~TextureOverloadCase() = default;
+
+std::ostream& operator<<(std::ostream& out, const TextureKind& kind) {
+  switch (kind) {
+    case TextureKind::kRegular:
+      out << "regular";
+      break;
+    case TextureKind::kDepth:
+      out << "depth";
+      break;
+    case TextureKind::kDepthMultisampled:
+      out << "depth-multisampled";
+      break;
+    case TextureKind::kMultisampled:
+      out << "multisampled";
+      break;
+    case TextureKind::kStorage:
+      out << "storage";
+      break;
+  }
+  return out;
+}
+
+std::ostream& operator<<(std::ostream& out, const TextureDataType& ty) {
+  switch (ty) {
+    case TextureDataType::kF32:
+      out << "f32";
+      break;
+    case TextureDataType::kU32:
+      out << "u32";
+      break;
+    case TextureDataType::kI32:
+      out << "i32";
+      break;
+  }
+  return out;
+}
+
+std::ostream& operator<<(std::ostream& out, const TextureOverloadCase& data) {
+  out << "TextureOverloadCase " << static_cast<int>(data.overload) << "\n";
+  out << data.description << "\n";
+  out << "texture_kind:      " << data.texture_kind << "\n";
+  out << "sampler_kind:      ";
+  if (data.texture_kind != TextureKind::kStorage) {
+    out << data.sampler_kind;
+  } else {
+    out << "<unused>";
+  }
+  out << "\n";
+  out << "access:            " << data.access << "\n";
+  out << "texel_format:      " << data.texel_format << "\n";
+  out << "texture_dimension: " << data.texture_dimension << "\n";
+  out << "texture_data_type: " << data.texture_data_type << "\n";
+  return out;
+}
+
+const ast::Type* TextureOverloadCase::BuildResultVectorComponentType(
+    ProgramBuilder* b) const {
+  switch (texture_data_type) {
+    case ast::builtin::test::TextureDataType::kF32:
+      return b->ty.f32();
+    case ast::builtin::test::TextureDataType::kU32:
+      return b->ty.u32();
+    case ast::builtin::test::TextureDataType::kI32:
+      return b->ty.i32();
+  }
+
+  TINT_UNREACHABLE(AST, b->Diagnostics());
+  return {};
+}
+
+const ast::Variable* TextureOverloadCase::BuildTextureVariable(
+    ProgramBuilder* b) const {
+  AttributeList attrs = {
+      b->create<ast::GroupAttribute>(0),
+      b->create<ast::BindingAttribute>(0),
+  };
+  switch (texture_kind) {
+    case ast::builtin::test::TextureKind::kRegular:
+      return b->Global("texture",
+                       b->ty.sampled_texture(texture_dimension,
+                                             BuildResultVectorComponentType(b)),
+                       attrs);
+
+    case ast::builtin::test::TextureKind::kDepth:
+      return b->Global("texture", b->ty.depth_texture(texture_dimension),
+                       attrs);
+
+    case ast::builtin::test::TextureKind::kDepthMultisampled:
+      return b->Global("texture",
+                       b->ty.depth_multisampled_texture(texture_dimension),
+                       attrs);
+
+    case ast::builtin::test::TextureKind::kMultisampled:
+      return b->Global(
+          "texture",
+          b->ty.multisampled_texture(texture_dimension,
+                                     BuildResultVectorComponentType(b)),
+          attrs);
+
+    case ast::builtin::test::TextureKind::kStorage: {
+      auto* st = b->ty.storage_texture(texture_dimension, texel_format, access);
+      return b->Global("texture", st, attrs);
+    }
+  }
+
+  TINT_UNREACHABLE(AST, b->Diagnostics());
+  return nullptr;
+}
+
+const ast::Variable* TextureOverloadCase::BuildSamplerVariable(
+    ProgramBuilder* b) const {
+  AttributeList attrs = {
+      b->create<ast::GroupAttribute>(0),
+      b->create<ast::BindingAttribute>(1),
+  };
+  return b->Global("sampler", b->ty.sampler(sampler_kind), attrs);
+}
+
+std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
+  return {
+      {
+          ValidTextureOverload::kDimensions1d,
+          "textureDimensions(t : texture_1d<f32>) -> i32",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k1d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensions2d,
+          "textureDimensions(t : texture_2d<f32>) -> vec2<i32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensions2dLevel,
+          "textureDimensions(t     : texture_2d<f32>,\n"
+          "                  level : i32) -> vec2<i32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
+      },
+      {
+          ValidTextureOverload::kDimensions2dArray,
+          "textureDimensions(t : texture_2d_array<f32>) -> vec2<i32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensions2dArrayLevel,
+          "textureDimensions(t     : texture_2d_array<f32>,\n"
+          "                  level : i32) -> vec2<i32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
+      },
+      {
+          ValidTextureOverload::kDimensions3d,
+          "textureDimensions(t : texture_3d<f32>) -> vec3<i32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensions3dLevel,
+          "textureDimensions(t     : texture_3d<f32>,\n"
+          "                  level : i32) -> vec3<i32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
+      },
+      {
+          ValidTextureOverload::kDimensionsCube,
+          "textureDimensions(t : texture_cube<f32>) -> vec2<i32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsCubeLevel,
+          "textureDimensions(t     : texture_cube<f32>,\n"
+          "                  level : i32) -> vec2<i32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
+      },
+      {
+          ValidTextureOverload::kDimensionsCubeArray,
+          "textureDimensions(t : texture_cube_array<f32>) -> vec2<i32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsCubeArrayLevel,
+          "textureDimensions(t     : texture_cube_array<f32>,\n"
+          "                  level : i32) -> vec2<i32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
+      },
+      {
+          ValidTextureOverload::kDimensionsMultisampled2d,
+          "textureDimensions(t : texture_multisampled_2d<f32>)-> vec2<i32>",
+          TextureKind::kMultisampled,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsDepth2d,
+          "textureDimensions(t : texture_depth_2d) -> vec2<i32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsDepth2dLevel,
+          "textureDimensions(t     : texture_depth_2d,\n"
+          "                  level : i32) -> vec2<i32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
+      },
+      {
+          ValidTextureOverload::kDimensionsDepth2dArray,
+          "textureDimensions(t : texture_depth_2d_array) -> vec2<i32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsDepth2dArrayLevel,
+          "textureDimensions(t     : texture_depth_2d_array,\n"
+          "                  level : i32) -> vec2<i32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
+      },
+      {
+          ValidTextureOverload::kDimensionsDepthCube,
+          "textureDimensions(t : texture_depth_cube) -> vec2<i32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsDepthCubeLevel,
+          "textureDimensions(t     : texture_depth_cube,\n"
+          "                  level : i32) -> vec2<i32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
+      },
+      {
+          ValidTextureOverload::kDimensionsDepthCubeArray,
+          "textureDimensions(t : texture_depth_cube_array) -> vec2<i32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsDepthCubeArrayLevel,
+          "textureDimensions(t     : texture_depth_cube_array,\n"
+          "                  level : i32) -> vec2<i32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
+      },
+      {
+          ValidTextureOverload::kDimensionsDepthMultisampled2d,
+          "textureDimensions(t : texture_depth_multisampled_2d) -> vec2<i32>",
+          TextureKind::kDepthMultisampled,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsStorageWO1d,
+          "textureDimensions(t : texture_storage_1d<rgba32float>) -> i32",
+          ast::Access::kWrite,
+          ast::TexelFormat::kRgba32Float,
+          ast::TextureDimension::k1d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsStorageWO2d,
+          "textureDimensions(t : texture_storage_2d<rgba32float>) -> "
+          "vec2<i32>",
+          ast::Access::kWrite,
+          ast::TexelFormat::kRgba32Float,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsStorageWO2dArray,
+          "textureDimensions(t : texture_storage_2d_array<rgba32float>) -> "
+          "vec2<i32>",
+          ast::Access::kWrite,
+          ast::TexelFormat::kRgba32Float,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kDimensionsStorageWO3d,
+          "textureDimensions(t : texture_storage_3d<rgba32float>) -> "
+          "vec3<i32>",
+          ast::Access::kWrite,
+          ast::TexelFormat::kRgba32Float,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureDimensions",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+
+      {
+          ValidTextureOverload::kGather2dF32,
+          "textureGather(component : i32,\n"
+          "              t         : texture_2d<T>,\n"
+          "              s         : sampler,\n"
+          "              coords    : vec2<f32>) -> vec4<T>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList(0,                        // component
+                               "texture",                // t
+                               "sampler",                // s
+                               b->vec2<f32>(1.f, 2.f));  // coords
+          },
+      },
+      {
+          ValidTextureOverload::kGather2dOffsetF32,
+          "textureGather(component : i32,\n"
+          "              t         : texture_2d<T>,\n"
+          "              s         : sampler,\n"
+          "              coords    : vec2<f32>,\n"
+          "              offset    : vec2<i32>) -> vec4<T>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList(0,                       // component
+                               "texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               b->vec2<i32>(3, 4));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kGather2dArrayF32,
+          "textureGather(component   : i32,\n"
+          "              t           : texture_2d_array<T>,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec2<f32>,\n"
+          "              array_index : i32) -> vec4<T>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList(0,                       // component
+                               "texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3);                      // array index
+          },
+      },
+      {
+          ValidTextureOverload::kGather2dArrayOffsetF32,
+          "textureGather(component   : i32,\n"
+          "              t           : texture_2d_array<T>,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec2<f32>,\n"
+          "              array_index : i32,\n"
+          "              offset      : vec2<i32>) -> vec4<T>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList(0,                       // component
+                               "texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               b->vec2<i32>(4, 5));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kGatherCubeF32,
+          "textureGather(component : i32,\n"
+          "              t         : texture_cube<T>,\n"
+          "              s         : sampler,\n"
+          "              coords    : vec3<f32>) -> vec4<T>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList(0,                             // component
+                               "texture",                     // t
+                               "sampler",                     // s
+                               b->vec3<f32>(1.f, 2.f, 3.f));  // coords
+          },
+      },
+      {
+          ValidTextureOverload::kGatherCubeArrayF32,
+          "textureGather(component   : i32,\n"
+          "              t           : texture_cube_array<T>,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec3<f32>,\n"
+          "              array_index : i32) -> vec4<T>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList(0,                            // component
+                               "texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4);                           // array_index
+          },
+      },
+      {
+          ValidTextureOverload::kGatherDepth2dF32,
+          "textureGather(t      : texture_depth_2d,\n"
+          "              s      : sampler,\n"
+          "              coords : vec2<f32>) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                // t
+                               "sampler",                // s
+                               b->vec2<f32>(1.f, 2.f));  // coords
+          },
+      },
+      {
+          ValidTextureOverload::kGatherDepth2dOffsetF32,
+          "textureGather(t      : texture_depth_2d,\n"
+          "              s      : sampler,\n"
+          "              coords : vec2<f32>,\n"
+          "              offset : vec2<i32>) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               b->vec2<i32>(3, 4));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kGatherDepth2dArrayF32,
+          "textureGather(t           : texture_depth_2d_array,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec2<f32>,\n"
+          "              array_index : i32) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3);                      // array_index
+          },
+      },
+      {
+          ValidTextureOverload::kGatherDepth2dArrayOffsetF32,
+          "textureGather(t           : texture_depth_2d_array,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec2<f32>,\n"
+          "              array_index : i32,\n"
+          "              offset      : vec2<i32>) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               b->vec2<i32>(4, 5));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kGatherDepthCubeF32,
+          "textureGather(t      : texture_depth_cube,\n"
+          "              s      : sampler,\n"
+          "              coords : vec3<f32>) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                     // t
+                               "sampler",                     // s
+                               b->vec3<f32>(1.f, 2.f, 3.f));  // coords
+          },
+      },
+      {
+          ValidTextureOverload::kGatherDepthCubeArrayF32,
+          "textureGather(t           : texture_depth_cube_array,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec3<f32>,\n"
+          "              array_index : i32) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureGather",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4);                           // array_index
+          },
+      },
+      {
+          ValidTextureOverload::kGatherCompareDepth2dF32,
+          "textureGatherCompare(t         : texture_depth_2d,\n"
+          "                     s         : sampler_comparison,\n"
+          "                     coords    : vec2<f32>,\n"
+          "                     depth_ref : f32) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureGatherCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3.f);                    // depth_ref
+          },
+      },
+      {
+          ValidTextureOverload::kGatherCompareDepth2dOffsetF32,
+          "textureGatherCompare(t         : texture_depth_2d,\n"
+          "                     s         : sampler_comparison,\n"
+          "                     coords    : vec2<f32>,\n"
+          "                     depth_ref : f32,\n"
+          "                     offset    : vec2<i32>) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureGatherCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3.f,                     // depth_ref
+                               b->vec2<i32>(4, 5));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kGatherCompareDepth2dArrayF32,
+          "textureGatherCompare(t           : texture_depth_2d_array,\n"
+          "                     s           : sampler_comparison,\n"
+          "                     coords      : vec2<f32>,\n"
+          "                     array_index : i32,\n"
+          "                     depth_ref   : f32) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureGatherCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               4.f);                    // depth_ref
+          },
+      },
+      {
+          ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32,
+          "textureGatherCompare(t           : texture_depth_2d_array,\n"
+          "                     s           : sampler_comparison,\n"
+          "                     coords      : vec2<f32>,\n"
+          "                     array_index : i32,\n"
+          "                     depth_ref   : f32,\n"
+          "                     offset      : vec2<i32>) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureGatherCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               4.f,                     // depth_ref
+                               b->vec2<i32>(5, 6));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kGatherCompareDepthCubeF32,
+          "textureGatherCompare(t         : texture_depth_cube,\n"
+          "                     s         : sampler_comparison,\n"
+          "                     coords    : vec3<f32>,\n"
+          "                     depth_ref : f32) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureGatherCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4.f);                         // depth_ref
+          },
+      },
+      {
+          ValidTextureOverload::kGatherCompareDepthCubeArrayF32,
+          "textureGatherCompare(t           : texture_depth_cube_array,\n"
+          "                     s           : sampler_comparison,\n"
+          "                     coords      : vec3<f32>,\n"
+          "                     array_index : i32,\n"
+          "                     depth_ref   : f32) -> vec4<f32>",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureGatherCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4,                            // array_index
+                               5.f);                         // depth_ref
+          },
+      },
+      {
+          ValidTextureOverload::kNumLayers2dArray,
+          "textureNumLayers(t : texture_2d_array<f32>) -> i32",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureNumLayers",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLayersCubeArray,
+          "textureNumLayers(t : texture_cube_array<f32>) -> i32",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureNumLayers",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLayersDepth2dArray,
+          "textureNumLayers(t : texture_depth_2d_array) -> i32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureNumLayers",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLayersDepthCubeArray,
+          "textureNumLayers(t : texture_depth_cube_array) -> i32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureNumLayers",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLayersStorageWO2dArray,
+          "textureNumLayers(t : texture_storage_2d_array<rgba32float>) -> i32",
+          ast::Access::kWrite,
+          ast::TexelFormat::kRgba32Float,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureNumLayers",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLevels2d,
+          "textureNumLevels(t : texture_2d<f32>) -> i32",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureNumLevels",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLevels2dArray,
+          "textureNumLevels(t : texture_2d_array<f32>) -> i32",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureNumLevels",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLevels3d,
+          "textureNumLevels(t : texture_3d<f32>) -> i32",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureNumLevels",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLevelsCube,
+          "textureNumLevels(t : texture_cube<f32>) -> i32",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureNumLevels",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLevelsCubeArray,
+          "textureNumLevels(t : texture_cube_array<f32>) -> i32",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureNumLevels",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLevelsDepth2d,
+          "textureNumLevels(t : texture_depth_2d) -> i32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureNumLevels",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLevelsDepth2dArray,
+          "textureNumLevels(t : texture_depth_2d_array) -> i32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureNumLevels",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLevelsDepthCube,
+          "textureNumLevels(t : texture_depth_cube) -> i32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureNumLevels",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumLevelsDepthCubeArray,
+          "textureNumLevels(t : texture_depth_cube_array) -> i32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureNumLevels",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kNumSamplesMultisampled2d,
+          "textureNumSamples(t : texture_multisampled_2d<f32>) -> i32",
+          TextureKind::kMultisampled,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureNumSamples",
+          [](ProgramBuilder* b) { return b->ExprList("texture"); },
+      },
+      {
+          ValidTextureOverload::kSample1dF32,
+          "textureSample(t      : texture_1d<f32>,\n"
+          "              s      : sampler,\n"
+          "              coords : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k1d,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",  // t
+                               "sampler",  // s
+                               1.0f);      // coords
+          },
+      },
+      {
+          ValidTextureOverload::kSample2dF32,
+          "textureSample(t      : texture_2d<f32>,\n"
+          "              s      : sampler,\n"
+          "              coords : vec2<f32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                // t
+                               "sampler",                // s
+                               b->vec2<f32>(1.f, 2.f));  // coords
+          },
+      },
+      {
+          ValidTextureOverload::kSample2dOffsetF32,
+          "textureSample(t      : texture_2d<f32>,\n"
+          "              s      : sampler,\n"
+          "              coords : vec2<f32>\n"
+          "              offset : vec2<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               b->vec2<i32>(3, 4));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSample2dArrayF32,
+          "textureSample(t           : texture_2d_array<f32>,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec2<f32>,\n"
+          "              array_index : i32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3);                      // array_index
+          },
+      },
+      {
+          ValidTextureOverload::kSample2dArrayOffsetF32,
+          "textureSample(t           : texture_2d_array<f32>,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec2<f32>,\n"
+          "              array_index : i32\n"
+          "              offset      : vec2<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               b->vec2<i32>(4, 5));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSample3dF32,
+          "textureSample(t      : texture_3d<f32>,\n"
+          "              s      : sampler,\n"
+          "              coords : vec3<f32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                     // t
+                               "sampler",                     // s
+                               b->vec3<f32>(1.f, 2.f, 3.f));  // coords
+          },
+      },
+      {
+          ValidTextureOverload::kSample3dOffsetF32,
+          "textureSample(t      : texture_3d<f32>,\n"
+          "              s      : sampler,\n"
+          "              coords : vec3<f32>\n"
+          "              offset : vec3<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               b->vec3<i32>(4, 5, 6));       // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleCubeF32,
+          "textureSample(t      : texture_cube<f32>,\n"
+          "              s      : sampler,\n"
+          "              coords : vec3<f32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                     // t
+                               "sampler",                     // s
+                               b->vec3<f32>(1.f, 2.f, 3.f));  // coords
+          },
+      },
+      {
+          ValidTextureOverload::kSampleCubeArrayF32,
+          "textureSample(t           : texture_cube_array<f32>,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec3<f32>,\n"
+          "              array_index : i32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4);                           // array_index
+          },
+      },
+      {
+          ValidTextureOverload::kSampleDepth2dF32,
+          "textureSample(t      : texture_depth_2d,\n"
+          "              s      : sampler,\n"
+          "              coords : vec2<f32>) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                // t
+                               "sampler",                // s
+                               b->vec2<f32>(1.f, 2.f));  // coords
+          },
+      },
+      {
+          ValidTextureOverload::kSampleDepth2dOffsetF32,
+          "textureSample(t      : texture_depth_2d,\n"
+          "              s      : sampler,\n"
+          "              coords : vec2<f32>\n"
+          "              offset : vec2<i32>) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               b->vec2<i32>(3, 4));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleDepth2dArrayF32,
+          "textureSample(t           : texture_depth_2d_array,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec2<f32>,\n"
+          "              array_index : i32) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3);                      // array_index
+          },
+      },
+      {
+          ValidTextureOverload::kSampleDepth2dArrayOffsetF32,
+          "textureSample(t           : texture_depth_2d_array,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec2<f32>,\n"
+          "              array_index : i32\n"
+          "              offset      : vec2<i32>) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               b->vec2<i32>(4, 5));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleDepthCubeF32,
+          "textureSample(t      : texture_depth_cube,\n"
+          "              s      : sampler,\n"
+          "              coords : vec3<f32>) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                     // t
+                               "sampler",                     // s
+                               b->vec3<f32>(1.f, 2.f, 3.f));  // coords
+          },
+      },
+      {
+          ValidTextureOverload::kSampleDepthCubeArrayF32,
+          "textureSample(t           : texture_depth_cube_array,\n"
+          "              s           : sampler,\n"
+          "              coords      : vec3<f32>,\n"
+          "              array_index : i32) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureSample",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4);                           // array_index
+          },
+      },
+      {
+          ValidTextureOverload::kSampleBias2dF32,
+          "textureSampleBias(t      : texture_2d<f32>,\n"
+          "                  s      : sampler,\n"
+          "                  coords : vec2<f32>,\n"
+          "                  bias   : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSampleBias",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3.f);                    // bias
+          },
+      },
+      {
+          ValidTextureOverload::kSampleBias2dOffsetF32,
+          "textureSampleBias(t      : texture_2d<f32>,\n"
+          "                  s      : sampler,\n"
+          "                  coords : vec2<f32>,\n"
+          "                  bias   : f32,\n"
+          "                  offset : vec2<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSampleBias",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3.f,                     // bias
+                               b->vec2<i32>(4, 5));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleBias2dArrayF32,
+          "textureSampleBias(t           : texture_2d_array<f32>,\n"
+          "                  s           : sampler,\n"
+          "                  coords      : vec2<f32>,\n"
+          "                  array_index : i32,\n"
+          "                  bias        : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSampleBias",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               4,                       // array_index
+                               3.f);                    // bias
+          },
+      },
+      {
+          ValidTextureOverload::kSampleBias2dArrayOffsetF32,
+          "textureSampleBias(t           : texture_2d_array<f32>,\n"
+          "                  s           : sampler,\n"
+          "                  coords      : vec2<f32>,\n"
+          "                  array_index : i32,\n"
+          "                  bias        : f32,\n"
+          "                  offset      : vec2<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSampleBias",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               4.f,                     // bias
+                               b->vec2<i32>(5, 6));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleBias3dF32,
+          "textureSampleBias(t      : texture_3d<f32>,\n"
+          "                  s      : sampler,\n"
+          "                  coords : vec3<f32>,\n"
+          "                  bias   : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureSampleBias",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4.f);                         // bias
+          },
+      },
+      {
+          ValidTextureOverload::kSampleBias3dOffsetF32,
+          "textureSampleBias(t      : texture_3d<f32>,\n"
+          "                  s      : sampler,\n"
+          "                  coords : vec3<f32>,\n"
+          "                  bias   : f32,\n"
+          "                  offset : vec3<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureSampleBias",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4.f,                          // bias
+                               b->vec3<i32>(5, 6, 7));       // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleBiasCubeF32,
+          "textureSampleBias(t      : texture_cube<f32>,\n"
+          "                  s      : sampler,\n"
+          "                  coords : vec3<f32>,\n"
+          "                  bias   : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureSampleBias",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4.f);                         // bias
+          },
+      },
+      {
+          ValidTextureOverload::kSampleBiasCubeArrayF32,
+          "textureSampleBias(t           : texture_cube_array<f32>,\n"
+          "                  s           : sampler,\n"
+          "                  coords      : vec3<f32>,\n"
+          "                  array_index : i32,\n"
+          "                  bias        : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureSampleBias",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               3,                            // array_index
+                               4.f);                         // bias
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevel2dF32,
+          "textureSampleLevel(t      : texture_2d<f32>,\n"
+          "                   s      : sampler,\n"
+          "                   coords : vec2<f32>,\n"
+          "                   level  : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3.f);                    // level
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevel2dOffsetF32,
+          "textureSampleLevel(t      : texture_2d<f32>,\n"
+          "                   s      : sampler,\n"
+          "                   coords : vec2<f32>,\n"
+          "                   level  : f32,\n"
+          "                   offset : vec2<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3.f,                     // level
+                               b->vec2<i32>(4, 5));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevel2dArrayF32,
+          "textureSampleLevel(t           : texture_2d_array<f32>,\n"
+          "                   s           : sampler,\n"
+          "                   coords      : vec2<f32>,\n"
+          "                   array_index : i32,\n"
+          "                   level       : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               4.f);                    // level
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevel2dArrayOffsetF32,
+          "textureSampleLevel(t           : texture_2d_array<f32>,\n"
+          "                   s           : sampler,\n"
+          "                   coords      : vec2<f32>,\n"
+          "                   array_index : i32,\n"
+          "                   level       : f32,\n"
+          "                   offset      : vec2<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               4.f,                     // level
+                               b->vec2<i32>(5, 6));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevel3dF32,
+          "textureSampleLevel(t      : texture_3d<f32>,\n"
+          "                   s      : sampler,\n"
+          "                   coords : vec3<f32>,\n"
+          "                   level  : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4.f);                         // level
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevel3dOffsetF32,
+          "textureSampleLevel(t      : texture_3d<f32>,\n"
+          "                   s      : sampler,\n"
+          "                   coords : vec3<f32>,\n"
+          "                   level  : f32,\n"
+          "                   offset : vec3<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4.f,                          // level
+                               b->vec3<i32>(5, 6, 7));       // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevelCubeF32,
+          "textureSampleLevel(t      : texture_cube<f32>,\n"
+          "                   s      : sampler,\n"
+          "                   coords : vec3<f32>,\n"
+          "                   level  : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4.f);                         // level
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevelCubeArrayF32,
+          "textureSampleLevel(t           : texture_cube_array<f32>,\n"
+          "                   s           : sampler,\n"
+          "                   coords      : vec3<f32>,\n"
+          "                   array_index : i32,\n"
+          "                   level       : f32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4,                            // array_index
+                               5.f);                         // level
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevelDepth2dF32,
+          "textureSampleLevel(t      : texture_depth_2d,\n"
+          "                   s      : sampler,\n"
+          "                   coords : vec2<f32>,\n"
+          "                   level  : i32) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3);                      // level
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevelDepth2dOffsetF32,
+          "textureSampleLevel(t      : texture_depth_2d,\n"
+          "                   s      : sampler,\n"
+          "                   coords : vec2<f32>,\n"
+          "                   level  : i32,\n"
+          "                   offset : vec2<i32>) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // level
+                               b->vec2<i32>(4, 5));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevelDepth2dArrayF32,
+          "textureSampleLevel(t           : texture_depth_2d_array,\n"
+          "                   s           : sampler,\n"
+          "                   coords      : vec2<f32>,\n"
+          "                   array_index : i32,\n"
+          "                   level       : i32) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               4);                      // level
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32,
+          "textureSampleLevel(t           : texture_depth_2d_array,\n"
+          "                   s           : sampler,\n"
+          "                   coords      : vec2<f32>,\n"
+          "                   array_index : i32,\n"
+          "                   level       : i32,\n"
+          "                   offset      : vec2<i32>) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               4,                       // level
+                               b->vec2<i32>(5, 6));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevelDepthCubeF32,
+          "textureSampleLevel(t      : texture_depth_cube,\n"
+          "                   s      : sampler,\n"
+          "                   coords : vec3<f32>,\n"
+          "                   level  : i32) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4);                           // level
+          },
+      },
+      {
+          ValidTextureOverload::kSampleLevelDepthCubeArrayF32,
+          "textureSampleLevel(t           : texture_depth_cube_array,\n"
+          "                   s           : sampler,\n"
+          "                   coords      : vec3<f32>,\n"
+          "                   array_index : i32,\n"
+          "                   level       : i32) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureSampleLevel",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4,                            // array_index
+                               5);                           // level
+          },
+      },
+      {
+          ValidTextureOverload::kSampleGrad2dF32,
+          "textureSampleGrad(t      : texture_2d<f32>,\n"
+          "                  s      : sampler,\n"
+          "                  coords : vec2<f32>\n"
+          "                  ddx    : vec2<f32>,\n"
+          "                  ddy    : vec2<f32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSampleGrad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                  // t
+                               "sampler",                  // s
+                               b->vec2<f32>(1.0f, 2.0f),   // coords
+                               b->vec2<f32>(3.0f, 4.0f),   // ddx
+                               b->vec2<f32>(5.0f, 6.0f));  // ddy
+          },
+      },
+      {
+          ValidTextureOverload::kSampleGrad2dOffsetF32,
+          "textureSampleGrad(t      : texture_2d<f32>,\n"
+          "                  s      : sampler,\n"
+          "                  coords : vec2<f32>,\n"
+          "                  ddx    : vec2<f32>,\n"
+          "                  ddy    : vec2<f32>,\n"
+          "                  offset : vec2<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSampleGrad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               b->vec2<f32>(3.f, 4.f),  // ddx
+                               b->vec2<f32>(5.f, 6.f),  // ddy
+                               b->vec2<i32>(7, 7));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleGrad2dArrayF32,
+          "textureSampleGrad(t           : texture_2d_array<f32>,\n"
+          "                  s           : sampler,\n"
+          "                  coords      : vec2<f32>,\n"
+          "                  array_index : i32,\n"
+          "                  ddx         : vec2<f32>,\n"
+          "                  ddy         : vec2<f32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSampleGrad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                // t
+                               "sampler",                // s
+                               b->vec2<f32>(1.f, 2.f),   // coords
+                               3,                        // array_index
+                               b->vec2<f32>(4.f, 5.f),   // ddx
+                               b->vec2<f32>(6.f, 7.f));  // ddy
+          },
+      },
+      {
+          ValidTextureOverload::kSampleGrad2dArrayOffsetF32,
+          "textureSampleGrad(t           : texture_2d_array<f32>,\n"
+          "                  s           : sampler,\n"
+          "                  coords      : vec2<f32>,\n"
+          "                  array_index : i32,\n"
+          "                  ddx         : vec2<f32>,\n"
+          "                  ddy         : vec2<f32>,\n"
+          "                  offset      : vec2<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSampleGrad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3,                       // array_index
+                               b->vec2<f32>(4.f, 5.f),  // ddx
+                               b->vec2<f32>(6.f, 7.f),  // ddy
+                               b->vec2<i32>(6, 7));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleGrad3dF32,
+          "textureSampleGrad(t      : texture_3d<f32>,\n"
+          "                  s      : sampler,\n"
+          "                  coords : vec3<f32>,\n"
+          "                  ddx    : vec3<f32>,\n"
+          "                  ddy    : vec3<f32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureSampleGrad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                     // t
+                               "sampler",                     // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),   // coords
+                               b->vec3<f32>(4.f, 5.f, 6.f),   // ddx
+                               b->vec3<f32>(7.f, 8.f, 9.f));  // ddy
+          },
+      },
+      {
+          ValidTextureOverload::kSampleGrad3dOffsetF32,
+          "textureSampleGrad(t      : texture_3d<f32>,\n"
+          "                  s      : sampler,\n"
+          "                  coords : vec3<f32>,\n"
+          "                  ddx    : vec3<f32>,\n"
+          "                  ddy    : vec3<f32>,\n"
+          "                  offset : vec3<i32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureSampleGrad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               b->vec3<f32>(4.f, 5.f, 6.f),  // ddx
+                               b->vec3<f32>(7.f, 8.f, 9.f),  // ddy
+                               b->vec3<i32>(0, 1, 2));       // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleGradCubeF32,
+          "textureSampleGrad(t      : texture_cube<f32>,\n"
+          "                  s      : sampler,\n"
+          "                  coords : vec3<f32>,\n"
+          "                  ddx    : vec3<f32>,\n"
+          "                  ddy    : vec3<f32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureSampleGrad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                     // t
+                               "sampler",                     // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),   // coords
+                               b->vec3<f32>(4.f, 5.f, 6.f),   // ddx
+                               b->vec3<f32>(7.f, 8.f, 9.f));  // ddy
+          },
+      },
+      {
+          ValidTextureOverload::kSampleGradCubeArrayF32,
+          "textureSampleGrad(t           : texture_cube_array<f32>,\n"
+          "                  s           : sampler,\n"
+          "                  coords      : vec3<f32>,\n"
+          "                  array_index : i32,\n"
+          "                  ddx         : vec3<f32>,\n"
+          "                  ddy         : vec3<f32>) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::SamplerKind::kSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureSampleGrad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                      // t
+                               "sampler",                      // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),    // coords
+                               4,                              // array_index
+                               b->vec3<f32>(5.f, 6.f, 7.f),    // ddx
+                               b->vec3<f32>(8.f, 9.f, 10.f));  // ddy
+          },
+      },
+      {
+          ValidTextureOverload::kSampleCompareDepth2dF32,
+          "textureSampleCompare(t         : texture_depth_2d,\n"
+          "                     s         : sampler_comparison,\n"
+          "                     coords    : vec2<f32>,\n"
+          "                     depth_ref : f32) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSampleCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3.f);                    // depth_ref
+          },
+      },
+      {
+          ValidTextureOverload::kSampleCompareDepth2dOffsetF32,
+          "textureSampleCompare(t         : texture_depth_2d,\n"
+          "                     s         : sampler_comparison,\n"
+          "                     coords    : vec2<f32>,\n"
+          "                     depth_ref : f32,\n"
+          "                     offset    : vec2<i32>) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureSampleCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               3.f,                     // depth_ref
+                               b->vec2<i32>(4, 5));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleCompareDepth2dArrayF32,
+          "textureSampleCompare(t           : texture_depth_2d_array,\n"
+          "                     s           : sampler_comparison,\n"
+          "                     coords      : vec2<f32>,\n"
+          "                     array_index : i32,\n"
+          "                     depth_ref   : f32) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSampleCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               4,                       // array_index
+                               3.f);                    // depth_ref
+          },
+      },
+      {
+          ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32,
+          "textureSampleCompare(t           : texture_depth_2d_array,\n"
+          "                     s           : sampler_comparison,\n"
+          "                     coords      : vec2<f32>,\n"
+          "                     array_index : i32,\n"
+          "                     depth_ref   : f32,\n"
+          "                     offset      : vec2<i32>) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureSampleCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",               // t
+                               "sampler",               // s
+                               b->vec2<f32>(1.f, 2.f),  // coords
+                               4,                       // array_index
+                               3.f,                     // depth_ref
+                               b->vec2<i32>(5, 6));     // offset
+          },
+      },
+      {
+          ValidTextureOverload::kSampleCompareDepthCubeF32,
+          "textureSampleCompare(t         : texture_depth_cube,\n"
+          "                     s         : sampler_comparison,\n"
+          "                     coords    : vec3<f32>,\n"
+          "                     depth_ref : f32) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::kCube,
+          TextureDataType::kF32,
+          "textureSampleCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4.f);                         // depth_ref
+          },
+      },
+      {
+          ValidTextureOverload::kSampleCompareDepthCubeArrayF32,
+          "textureSampleCompare(t           : texture_depth_cube_array,\n"
+          "                     s           : sampler_comparison,\n"
+          "                     coords      : vec3<f32>,\n"
+          "                     array_index : i32,\n"
+          "                     depth_ref   : f32) -> f32",
+          TextureKind::kDepth,
+          ast::SamplerKind::kComparisonSampler,
+          ast::TextureDimension::kCubeArray,
+          TextureDataType::kF32,
+          "textureSampleCompare",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                    // t
+                               "sampler",                    // s
+                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
+                               4,                            // array_index
+                               5.f);                         // depth_ref
+          },
+      },
+      {
+          ValidTextureOverload::kLoad1dLevelF32,
+          "textureLoad(t      : texture_1d<f32>,\n"
+          "            coords : i32,\n"
+          "            level  : i32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k1d,
+          TextureDataType::kF32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",  // t
+                               1,          // coords
+                               3);         // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad1dLevelU32,
+          "textureLoad(t      : texture_1d<u32>,\n"
+          "            coords : i32,\n"
+          "            level  : i32) -> vec4<u32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k1d,
+          TextureDataType::kU32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",  // t
+                               1,          // coords
+                               3);         // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad1dLevelI32,
+          "textureLoad(t      : texture_1d<i32>,\n"
+          "            coords : i32,\n"
+          "            level  : i32) -> vec4<i32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k1d,
+          TextureDataType::kI32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",  // t
+                               1,          // coords
+                               3);         // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad2dLevelF32,
+          "textureLoad(t      : texture_2d<f32>,\n"
+          "            coords : vec2<i32>,\n"
+          "            level  : i32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3);                  // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad2dLevelU32,
+          "textureLoad(t      : texture_2d<u32>,\n"
+          "            coords : vec2<i32>,\n"
+          "            level  : i32) -> vec4<u32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k2d,
+          TextureDataType::kU32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3);                  // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad2dLevelI32,
+          "textureLoad(t      : texture_2d<i32>,\n"
+          "            coords : vec2<i32>,\n"
+          "            level  : i32) -> vec4<i32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k2d,
+          TextureDataType::kI32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3);                  // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad2dArrayLevelF32,
+          "textureLoad(t           : texture_2d_array<f32>,\n"
+          "            coords      : vec2<i32>,\n"
+          "            array_index : i32,\n"
+          "            level       : i32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3,                   // array_index
+                               4);                  // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad2dArrayLevelU32,
+          "textureLoad(t           : texture_2d_array<u32>,\n"
+          "            coords      : vec2<i32>,\n"
+          "            array_index : i32,\n"
+          "            level       : i32) -> vec4<u32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kU32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3,                   // array_index
+                               4);                  // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad2dArrayLevelI32,
+          "textureLoad(t           : texture_2d_array<i32>,\n"
+          "            coords      : vec2<i32>,\n"
+          "            array_index : i32,\n"
+          "            level       : i32) -> vec4<i32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kI32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3,                   // array_index
+                               4);                  // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad3dLevelF32,
+          "textureLoad(t      : texture_3d<f32>,\n"
+          "            coords : vec3<i32>,\n"
+          "            level  : i32) -> vec4<f32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",              // t
+                               b->vec3<i32>(1, 2, 3),  // coords
+                               4);                     // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad3dLevelU32,
+          "textureLoad(t      : texture_3d<u32>,\n"
+          "            coords : vec3<i32>,\n"
+          "            level  : i32) -> vec4<u32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k3d,
+          TextureDataType::kU32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",              // t
+                               b->vec3<i32>(1, 2, 3),  // coords
+                               4);                     // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoad3dLevelI32,
+          "textureLoad(t      : texture_3d<i32>,\n"
+          "            coords : vec3<i32>,\n"
+          "            level  : i32) -> vec4<i32>",
+          TextureKind::kRegular,
+          ast::TextureDimension::k3d,
+          TextureDataType::kI32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",              // t
+                               b->vec3<i32>(1, 2, 3),  // coords
+                               4);                     // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoadMultisampled2dF32,
+          "textureLoad(t            : texture_multisampled_2d<f32>,\n"
+          "            coords       : vec2<i32>,\n"
+          "            sample_index : i32) -> vec4<f32>",
+          TextureKind::kMultisampled,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3);                  // sample_index
+          },
+      },
+      {
+          ValidTextureOverload::kLoadMultisampled2dU32,
+          "textureLoad(t            : texture_multisampled_2d<u32>,\n"
+          "            coords       : vec2<i32>,\n"
+          "            sample_index : i32) -> vec4<u32>",
+          TextureKind::kMultisampled,
+          ast::TextureDimension::k2d,
+          TextureDataType::kU32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3);                  // sample_index
+          },
+      },
+      {
+          ValidTextureOverload::kLoadMultisampled2dI32,
+          "textureLoad(t            : texture_multisampled_2d<i32>,\n"
+          "            coords       : vec2<i32>,\n"
+          "            sample_index : i32) -> vec4<i32>",
+          TextureKind::kMultisampled,
+          ast::TextureDimension::k2d,
+          TextureDataType::kI32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3);                  // sample_index
+          },
+      },
+      {
+          ValidTextureOverload::kLoadDepth2dLevelF32,
+          "textureLoad(t      : texture_depth_2d,\n"
+          "            coords : vec2<i32>,\n"
+          "            level  : i32) -> f32",
+          TextureKind::kDepth,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3);                  // level
+          },
+      },
+      {
+          ValidTextureOverload::kLoadDepth2dArrayLevelF32,
+          "textureLoad(t           : texture_depth_2d_array,\n"
+          "            coords      : vec2<i32>,\n"
+          "            array_index : i32,\n"
+          "            level       : i32) -> f32",
+          TextureKind::kDepth,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureLoad",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3,                   // array_index
+                               4);                  // level
+          },
+      },
+      {
+          ValidTextureOverload::kStoreWO1dRgba32float,
+          "textureStore(t      : texture_storage_1d<rgba32float>,\n"
+          "             coords : i32,\n"
+          "             value  : vec4<T>)",
+          ast::Access::kWrite,
+          ast::TexelFormat::kRgba32Float,
+          ast::TextureDimension::k1d,
+          TextureDataType::kF32,
+          "textureStore",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                          // t
+                               1,                                  // coords
+                               b->vec4<f32>(2.f, 3.f, 4.f, 5.f));  // value
+          },
+      },
+      {
+          ValidTextureOverload::kStoreWO2dRgba32float,
+          "textureStore(t      : texture_storage_2d<rgba32float>,\n"
+          "             coords : vec2<i32>,\n"
+          "             value  : vec4<T>)",
+          ast::Access::kWrite,
+          ast::TexelFormat::kRgba32Float,
+          ast::TextureDimension::k2d,
+          TextureDataType::kF32,
+          "textureStore",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                          // t
+                               b->vec2<i32>(1, 2),                 // coords
+                               b->vec4<f32>(3.f, 4.f, 5.f, 6.f));  // value
+          },
+      },
+      {
+          ValidTextureOverload::kStoreWO2dArrayRgba32float,
+          "textureStore(t           : texture_storage_2d_array<rgba32float>,\n"
+          "             coords      : vec2<i32>,\n"
+          "             array_index : i32,\n"
+          "             value       : vec4<T>)",
+          ast::Access::kWrite,
+          ast::TexelFormat::kRgba32Float,
+          ast::TextureDimension::k2dArray,
+          TextureDataType::kF32,
+          "textureStore",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",           // t
+                               b->vec2<i32>(1, 2),  // coords
+                               3,                   // array_index
+                               b->vec4<f32>(4.f, 5.f, 6.f, 7.f));  // value
+          },
+      },
+      {
+          ValidTextureOverload::kStoreWO3dRgba32float,
+          "textureStore(t      : texture_storage_3d<rgba32float>,\n"
+          "             coords : vec3<i32>,\n"
+          "             value  : vec4<T>)",
+          ast::Access::kWrite,
+          ast::TexelFormat::kRgba32Float,
+          ast::TextureDimension::k3d,
+          TextureDataType::kF32,
+          "textureStore",
+          [](ProgramBuilder* b) {
+            return b->ExprList("texture",                          // t
+                               b->vec3<i32>(1, 2, 3),              // coords
+                               b->vec4<f32>(4.f, 5.f, 6.f, 7.f));  // value
+          },
+      },
+  };
+}
+
+bool ReturnsVoid(ValidTextureOverload texture_overload) {
+  switch (texture_overload) {
+    case ValidTextureOverload::kStoreWO1dRgba32float:
+    case ValidTextureOverload::kStoreWO2dRgba32float:
+    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
+    case ValidTextureOverload::kStoreWO3dRgba32float:
+      return true;
+    default:
+      return false;
+  }
+}
+
+}  // namespace test
+}  // namespace builtin
+}  // namespace ast
+}  // namespace tint
diff --git a/src/ast/builtin_texture_helper_test.h b/src/ast/builtin_texture_helper_test.h
new file mode 100644
index 0000000..64151c9
--- /dev/null
+++ b/src/ast/builtin_texture_helper_test.h
@@ -0,0 +1,269 @@
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_AST_BUILTIN_TEXTURE_HELPER_TEST_H_
+#define SRC_AST_BUILTIN_TEXTURE_HELPER_TEST_H_
+
+#include <vector>
+
+#include "src/ast/access.h"
+#include "src/program_builder.h"
+#include "src/sem/storage_texture_type.h"
+
+namespace tint {
+namespace ast {
+namespace builtin {
+namespace test {
+
+enum class TextureKind {
+  kRegular,
+  kDepth,
+  kDepthMultisampled,
+  kMultisampled,
+  kStorage
+};
+enum class TextureDataType { kF32, kU32, kI32 };
+
+std::ostream& operator<<(std::ostream& out, const TextureKind& kind);
+std::ostream& operator<<(std::ostream& out, const TextureDataType& ty);
+
+/// Non-exhaustive list of valid texture overloads
+enum class ValidTextureOverload {
+  kDimensions1d,
+  kDimensions2d,
+  kDimensions2dLevel,
+  kDimensions2dArray,
+  kDimensions2dArrayLevel,
+  kDimensions3d,
+  kDimensions3dLevel,
+  kDimensionsCube,
+  kDimensionsCubeLevel,
+  kDimensionsCubeArray,
+  kDimensionsCubeArrayLevel,
+  kDimensionsMultisampled2d,
+  kDimensionsDepth2d,
+  kDimensionsDepth2dLevel,
+  kDimensionsDepth2dArray,
+  kDimensionsDepth2dArrayLevel,
+  kDimensionsDepthCube,
+  kDimensionsDepthCubeLevel,
+  kDimensionsDepthCubeArray,
+  kDimensionsDepthCubeArrayLevel,
+  kDimensionsDepthMultisampled2d,
+  kDimensionsStorageWO1d,
+  kDimensionsStorageWO2d,
+  kDimensionsStorageWO2dArray,
+  kDimensionsStorageWO3d,
+  kGather2dF32,
+  kGather2dOffsetF32,
+  kGather2dArrayF32,
+  kGather2dArrayOffsetF32,
+  kGatherCubeF32,
+  kGatherCubeArrayF32,
+  kGatherDepth2dF32,
+  kGatherDepth2dOffsetF32,
+  kGatherDepth2dArrayF32,
+  kGatherDepth2dArrayOffsetF32,
+  kGatherDepthCubeF32,
+  kGatherDepthCubeArrayF32,
+  kGatherCompareDepth2dF32,
+  kGatherCompareDepth2dOffsetF32,
+  kGatherCompareDepth2dArrayF32,
+  kGatherCompareDepth2dArrayOffsetF32,
+  kGatherCompareDepthCubeF32,
+  kGatherCompareDepthCubeArrayF32,
+  kNumLayers2dArray,
+  kNumLayersCubeArray,
+  kNumLayersDepth2dArray,
+  kNumLayersDepthCubeArray,
+  kNumLayersStorageWO2dArray,
+  kNumLevels2d,
+  kNumLevels2dArray,
+  kNumLevels3d,
+  kNumLevelsCube,
+  kNumLevelsCubeArray,
+  kNumLevelsDepth2d,
+  kNumLevelsDepth2dArray,
+  kNumLevelsDepthCube,
+  kNumLevelsDepthCubeArray,
+  kNumSamplesMultisampled2d,
+  kNumSamplesDepthMultisampled2d,
+  kSample1dF32,
+  kSample2dF32,
+  kSample2dOffsetF32,
+  kSample2dArrayF32,
+  kSample2dArrayOffsetF32,
+  kSample3dF32,
+  kSample3dOffsetF32,
+  kSampleCubeF32,
+  kSampleCubeArrayF32,
+  kSampleDepth2dF32,
+  kSampleDepth2dOffsetF32,
+  kSampleDepth2dArrayF32,
+  kSampleDepth2dArrayOffsetF32,
+  kSampleDepthCubeF32,
+  kSampleDepthCubeArrayF32,
+  kSampleBias2dF32,
+  kSampleBias2dOffsetF32,
+  kSampleBias2dArrayF32,
+  kSampleBias2dArrayOffsetF32,
+  kSampleBias3dF32,
+  kSampleBias3dOffsetF32,
+  kSampleBiasCubeF32,
+  kSampleBiasCubeArrayF32,
+  kSampleLevel2dF32,
+  kSampleLevel2dOffsetF32,
+  kSampleLevel2dArrayF32,
+  kSampleLevel2dArrayOffsetF32,
+  kSampleLevel3dF32,
+  kSampleLevel3dOffsetF32,
+  kSampleLevelCubeF32,
+  kSampleLevelCubeArrayF32,
+  kSampleLevelDepth2dF32,
+  kSampleLevelDepth2dOffsetF32,
+  kSampleLevelDepth2dArrayF32,
+  kSampleLevelDepth2dArrayOffsetF32,
+  kSampleLevelDepthCubeF32,
+  kSampleLevelDepthCubeArrayF32,
+  kSampleGrad2dF32,
+  kSampleGrad2dOffsetF32,
+  kSampleGrad2dArrayF32,
+  kSampleGrad2dArrayOffsetF32,
+  kSampleGrad3dF32,
+  kSampleGrad3dOffsetF32,
+  kSampleGradCubeF32,
+  kSampleGradCubeArrayF32,
+  kSampleCompareDepth2dF32,
+  kSampleCompareDepth2dOffsetF32,
+  kSampleCompareDepth2dArrayF32,
+  kSampleCompareDepth2dArrayOffsetF32,
+  kSampleCompareDepthCubeF32,
+  kSampleCompareDepthCubeArrayF32,
+  kSampleCompareLevelDepth2dF32,
+  kSampleCompareLevelDepth2dOffsetF32,
+  kSampleCompareLevelDepth2dArrayF32,
+  kSampleCompareLevelDepth2dArrayOffsetF32,
+  kSampleCompareLevelDepthCubeF32,
+  kSampleCompareLevelDepthCubeArrayF32,
+  kLoad1dLevelF32,
+  kLoad1dLevelU32,
+  kLoad1dLevelI32,
+  kLoad2dLevelF32,
+  kLoad2dLevelU32,
+  kLoad2dLevelI32,
+  kLoad2dArrayLevelF32,
+  kLoad2dArrayLevelU32,
+  kLoad2dArrayLevelI32,
+  kLoad3dLevelF32,
+  kLoad3dLevelU32,
+  kLoad3dLevelI32,
+  kLoadMultisampled2dF32,
+  kLoadMultisampled2dU32,
+  kLoadMultisampled2dI32,
+  kLoadDepth2dLevelF32,
+  kLoadDepth2dArrayLevelF32,
+  kLoadDepthMultisampled2dF32,
+  kStoreWO1dRgba32float,       // Not permutated for all texel formats
+  kStoreWO2dRgba32float,       // Not permutated for all texel formats
+  kStoreWO2dArrayRgba32float,  // Not permutated for all texel formats
+  kStoreWO3dRgba32float,       // Not permutated for all texel formats
+};
+
+/// @param texture_overload the ValidTextureOverload
+/// @returns true if the ValidTextureOverload builtin returns no value.
+bool ReturnsVoid(ValidTextureOverload texture_overload);
+
+/// Describes a texture builtin overload
+struct TextureOverloadCase {
+  /// Constructor for textureSample...() functions
+  TextureOverloadCase(ValidTextureOverload,
+                      const char*,
+                      TextureKind,
+                      ast::SamplerKind,
+                      ast::TextureDimension,
+                      TextureDataType,
+                      const char*,
+                      std::function<ExpressionList(ProgramBuilder*)>);
+  /// Constructor for textureLoad() functions with non-storage textures
+  TextureOverloadCase(ValidTextureOverload,
+                      const char*,
+                      TextureKind,
+                      ast::TextureDimension,
+                      TextureDataType,
+                      const char*,
+                      std::function<ExpressionList(ProgramBuilder*)>);
+  /// Constructor for textureLoad() with storage textures
+  TextureOverloadCase(ValidTextureOverload,
+                      const char*,
+                      Access,
+                      ast::TexelFormat,
+                      ast::TextureDimension,
+                      TextureDataType,
+                      const char*,
+                      std::function<ExpressionList(ProgramBuilder*)>);
+  /// Copy constructor
+  TextureOverloadCase(const TextureOverloadCase&);
+  /// Destructor
+  ~TextureOverloadCase();
+
+  /// @return a vector containing a large number (non-exhaustive) of valid
+  /// texture overloads.
+  static std::vector<TextureOverloadCase> ValidCases();
+
+  /// @param builder the AST builder used for the test
+  /// @returns the vector component type of the texture function return value
+  const ast::Type* BuildResultVectorComponentType(
+      ProgramBuilder* builder) const;
+  /// @param builder the AST builder used for the test
+  /// @returns a variable holding the test texture, automatically registered as
+  /// a global variable.
+  const ast::Variable* BuildTextureVariable(ProgramBuilder* builder) const;
+  /// @param builder the AST builder used for the test
+  /// @returns a Variable holding the test sampler, automatically registered as
+  /// a global variable.
+  const ast::Variable* BuildSamplerVariable(ProgramBuilder* builder) const;
+
+  /// The enumerator for this overload
+  const ValidTextureOverload overload;
+  /// A human readable description of the overload
+  const char* const description;
+  /// The texture kind for the texture parameter
+  const TextureKind texture_kind;
+  /// The sampler kind for the sampler parameter
+  /// Used only when texture_kind is not kStorage
+  ast::SamplerKind const sampler_kind = ast::SamplerKind::kSampler;
+  /// The access control for the storage texture
+  /// Used only when texture_kind is kStorage
+  Access const access = Access::kReadWrite;
+  /// The image format for the storage texture
+  /// Used only when texture_kind is kStorage
+  ast::TexelFormat const texel_format = ast::TexelFormat::kNone;
+  /// The dimensions of the texture parameter
+  ast::TextureDimension const texture_dimension;
+  /// The data type of the texture parameter
+  const TextureDataType texture_data_type;
+  /// Name of the function. e.g. `textureSample`, `textureSampleGrad`, etc
+  const char* const function;
+  /// A function that builds the AST arguments for the overload
+  std::function<ExpressionList(ProgramBuilder*)> const args;
+};
+
+std::ostream& operator<<(std::ostream& out, const TextureOverloadCase& data);
+
+}  // namespace test
+}  // namespace builtin
+}  // namespace ast
+}  // namespace tint
+
+#endif  // SRC_AST_BUILTIN_TEXTURE_HELPER_TEST_H_
diff --git a/src/ast/call_expression.h b/src/ast/call_expression.h
index 68ef6cc..25d2079 100644
--- a/src/ast/call_expression.h
+++ b/src/ast/call_expression.h
@@ -26,7 +26,7 @@
 
 /// A call expression - represents either a:
 /// * sem::Function
-/// * sem::Intrinsic
+/// * sem::Builtin
 /// * sem::TypeConstructor
 /// * sem::TypeConversion
 class CallExpression : public Castable<CallExpression, Expression> {
@@ -64,7 +64,7 @@
   /// Target is either an identifier, or a Type.
   /// One of these must be nullptr and the other a non-nullptr.
   struct Target {
-    /// name is a function or intrinsic to call, or type name to construct or
+    /// name is a function or builtin to call, or type name to construct or
     /// cast-to
     const IdentifierExpression* name = nullptr;
     /// type to construct or cast-to
diff --git a/src/ast/intrinsic_texture_helper_test.cc b/src/ast/intrinsic_texture_helper_test.cc
deleted file mode 100644
index 0de6571..0000000
--- a/src/ast/intrinsic_texture_helper_test.cc
+++ /dev/null
@@ -1,2286 +0,0 @@
-// Copyright 2020 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/ast/intrinsic_texture_helper_test.h"
-
-#include "src/sem/depth_texture_type.h"
-#include "src/sem/multisampled_texture_type.h"
-#include "src/sem/sampled_texture_type.h"
-
-namespace tint {
-namespace ast {
-namespace intrinsic {
-namespace test {
-
-using u32 = ProgramBuilder::u32;
-using i32 = ProgramBuilder::i32;
-using f32 = ProgramBuilder::f32;
-
-TextureOverloadCase::TextureOverloadCase(
-    ValidTextureOverload o,
-    const char* desc,
-    TextureKind tk,
-    ast::SamplerKind sk,
-    ast::TextureDimension dims,
-    TextureDataType datatype,
-    const char* f,
-    std::function<ExpressionList(ProgramBuilder*)> a)
-    : overload(o),
-      description(desc),
-      texture_kind(tk),
-      sampler_kind(sk),
-      texture_dimension(dims),
-      texture_data_type(datatype),
-      function(f),
-      args(std::move(a)) {}
-TextureOverloadCase::TextureOverloadCase(
-    ValidTextureOverload o,
-    const char* desc,
-    TextureKind tk,
-    ast::TextureDimension dims,
-    TextureDataType datatype,
-    const char* f,
-    std::function<ExpressionList(ProgramBuilder*)> a)
-    : overload(o),
-      description(desc),
-      texture_kind(tk),
-      texture_dimension(dims),
-      texture_data_type(datatype),
-      function(f),
-      args(std::move(a)) {}
-TextureOverloadCase::TextureOverloadCase(
-    ValidTextureOverload o,
-    const char* d,
-    Access acc,
-    ast::TexelFormat fmt,
-    ast::TextureDimension dims,
-    TextureDataType datatype,
-    const char* f,
-    std::function<ExpressionList(ProgramBuilder*)> a)
-    : overload(o),
-      description(d),
-      texture_kind(TextureKind::kStorage),
-      access(acc),
-      texel_format(fmt),
-      texture_dimension(dims),
-      texture_data_type(datatype),
-      function(f),
-      args(std::move(a)) {}
-TextureOverloadCase::TextureOverloadCase(const TextureOverloadCase&) = default;
-TextureOverloadCase::~TextureOverloadCase() = default;
-
-std::ostream& operator<<(std::ostream& out, const TextureKind& kind) {
-  switch (kind) {
-    case TextureKind::kRegular:
-      out << "regular";
-      break;
-    case TextureKind::kDepth:
-      out << "depth";
-      break;
-    case TextureKind::kDepthMultisampled:
-      out << "depth-multisampled";
-      break;
-    case TextureKind::kMultisampled:
-      out << "multisampled";
-      break;
-    case TextureKind::kStorage:
-      out << "storage";
-      break;
-  }
-  return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const TextureDataType& ty) {
-  switch (ty) {
-    case TextureDataType::kF32:
-      out << "f32";
-      break;
-    case TextureDataType::kU32:
-      out << "u32";
-      break;
-    case TextureDataType::kI32:
-      out << "i32";
-      break;
-  }
-  return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const TextureOverloadCase& data) {
-  out << "TextureOverloadCase " << static_cast<int>(data.overload) << "\n";
-  out << data.description << "\n";
-  out << "texture_kind:      " << data.texture_kind << "\n";
-  out << "sampler_kind:      ";
-  if (data.texture_kind != TextureKind::kStorage) {
-    out << data.sampler_kind;
-  } else {
-    out << "<unused>";
-  }
-  out << "\n";
-  out << "access:            " << data.access << "\n";
-  out << "texel_format:      " << data.texel_format << "\n";
-  out << "texture_dimension: " << data.texture_dimension << "\n";
-  out << "texture_data_type: " << data.texture_data_type << "\n";
-  return out;
-}
-
-const ast::Type* TextureOverloadCase::BuildResultVectorComponentType(
-    ProgramBuilder* b) const {
-  switch (texture_data_type) {
-    case ast::intrinsic::test::TextureDataType::kF32:
-      return b->ty.f32();
-    case ast::intrinsic::test::TextureDataType::kU32:
-      return b->ty.u32();
-    case ast::intrinsic::test::TextureDataType::kI32:
-      return b->ty.i32();
-  }
-
-  TINT_UNREACHABLE(AST, b->Diagnostics());
-  return {};
-}
-
-const ast::Variable* TextureOverloadCase::BuildTextureVariable(
-    ProgramBuilder* b) const {
-  AttributeList attrs = {
-      b->create<ast::GroupAttribute>(0),
-      b->create<ast::BindingAttribute>(0),
-  };
-  switch (texture_kind) {
-    case ast::intrinsic::test::TextureKind::kRegular:
-      return b->Global("texture",
-                       b->ty.sampled_texture(texture_dimension,
-                                             BuildResultVectorComponentType(b)),
-                       attrs);
-
-    case ast::intrinsic::test::TextureKind::kDepth:
-      return b->Global("texture", b->ty.depth_texture(texture_dimension),
-                       attrs);
-
-    case ast::intrinsic::test::TextureKind::kDepthMultisampled:
-      return b->Global("texture",
-                       b->ty.depth_multisampled_texture(texture_dimension),
-                       attrs);
-
-    case ast::intrinsic::test::TextureKind::kMultisampled:
-      return b->Global(
-          "texture",
-          b->ty.multisampled_texture(texture_dimension,
-                                     BuildResultVectorComponentType(b)),
-          attrs);
-
-    case ast::intrinsic::test::TextureKind::kStorage: {
-      auto* st = b->ty.storage_texture(texture_dimension, texel_format, access);
-      return b->Global("texture", st, attrs);
-    }
-  }
-
-  TINT_UNREACHABLE(AST, b->Diagnostics());
-  return nullptr;
-}
-
-const ast::Variable* TextureOverloadCase::BuildSamplerVariable(
-    ProgramBuilder* b) const {
-  AttributeList attrs = {
-      b->create<ast::GroupAttribute>(0),
-      b->create<ast::BindingAttribute>(1),
-  };
-  return b->Global("sampler", b->ty.sampler(sampler_kind), attrs);
-}
-
-std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
-  return {
-      {
-          ValidTextureOverload::kDimensions1d,
-          "textureDimensions(t : texture_1d<f32>) -> i32",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k1d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensions2d,
-          "textureDimensions(t : texture_2d<f32>) -> vec2<i32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensions2dLevel,
-          "textureDimensions(t     : texture_2d<f32>,\n"
-          "                  level : i32) -> vec2<i32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
-      },
-      {
-          ValidTextureOverload::kDimensions2dArray,
-          "textureDimensions(t : texture_2d_array<f32>) -> vec2<i32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensions2dArrayLevel,
-          "textureDimensions(t     : texture_2d_array<f32>,\n"
-          "                  level : i32) -> vec2<i32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
-      },
-      {
-          ValidTextureOverload::kDimensions3d,
-          "textureDimensions(t : texture_3d<f32>) -> vec3<i32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensions3dLevel,
-          "textureDimensions(t     : texture_3d<f32>,\n"
-          "                  level : i32) -> vec3<i32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
-      },
-      {
-          ValidTextureOverload::kDimensionsCube,
-          "textureDimensions(t : texture_cube<f32>) -> vec2<i32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsCubeLevel,
-          "textureDimensions(t     : texture_cube<f32>,\n"
-          "                  level : i32) -> vec2<i32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
-      },
-      {
-          ValidTextureOverload::kDimensionsCubeArray,
-          "textureDimensions(t : texture_cube_array<f32>) -> vec2<i32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsCubeArrayLevel,
-          "textureDimensions(t     : texture_cube_array<f32>,\n"
-          "                  level : i32) -> vec2<i32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
-      },
-      {
-          ValidTextureOverload::kDimensionsMultisampled2d,
-          "textureDimensions(t : texture_multisampled_2d<f32>)-> vec2<i32>",
-          TextureKind::kMultisampled,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsDepth2d,
-          "textureDimensions(t : texture_depth_2d) -> vec2<i32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsDepth2dLevel,
-          "textureDimensions(t     : texture_depth_2d,\n"
-          "                  level : i32) -> vec2<i32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
-      },
-      {
-          ValidTextureOverload::kDimensionsDepth2dArray,
-          "textureDimensions(t : texture_depth_2d_array) -> vec2<i32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsDepth2dArrayLevel,
-          "textureDimensions(t     : texture_depth_2d_array,\n"
-          "                  level : i32) -> vec2<i32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
-      },
-      {
-          ValidTextureOverload::kDimensionsDepthCube,
-          "textureDimensions(t : texture_depth_cube) -> vec2<i32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsDepthCubeLevel,
-          "textureDimensions(t     : texture_depth_cube,\n"
-          "                  level : i32) -> vec2<i32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
-      },
-      {
-          ValidTextureOverload::kDimensionsDepthCubeArray,
-          "textureDimensions(t : texture_depth_cube_array) -> vec2<i32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsDepthCubeArrayLevel,
-          "textureDimensions(t     : texture_depth_cube_array,\n"
-          "                  level : i32) -> vec2<i32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture", 1); },
-      },
-      {
-          ValidTextureOverload::kDimensionsDepthMultisampled2d,
-          "textureDimensions(t : texture_depth_multisampled_2d) -> vec2<i32>",
-          TextureKind::kDepthMultisampled,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsStorageWO1d,
-          "textureDimensions(t : texture_storage_1d<rgba32float>) -> i32",
-          ast::Access::kWrite,
-          ast::TexelFormat::kRgba32Float,
-          ast::TextureDimension::k1d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsStorageWO2d,
-          "textureDimensions(t : texture_storage_2d<rgba32float>) -> "
-          "vec2<i32>",
-          ast::Access::kWrite,
-          ast::TexelFormat::kRgba32Float,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsStorageWO2dArray,
-          "textureDimensions(t : texture_storage_2d_array<rgba32float>) -> "
-          "vec2<i32>",
-          ast::Access::kWrite,
-          ast::TexelFormat::kRgba32Float,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kDimensionsStorageWO3d,
-          "textureDimensions(t : texture_storage_3d<rgba32float>) -> "
-          "vec3<i32>",
-          ast::Access::kWrite,
-          ast::TexelFormat::kRgba32Float,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureDimensions",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-
-      {
-          ValidTextureOverload::kGather2dF32,
-          "textureGather(component : i32,\n"
-          "              t         : texture_2d<T>,\n"
-          "              s         : sampler,\n"
-          "              coords    : vec2<f32>) -> vec4<T>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList(0,                        // component
-                               "texture",                // t
-                               "sampler",                // s
-                               b->vec2<f32>(1.f, 2.f));  // coords
-          },
-      },
-      {
-          ValidTextureOverload::kGather2dOffsetF32,
-          "textureGather(component : i32,\n"
-          "              t         : texture_2d<T>,\n"
-          "              s         : sampler,\n"
-          "              coords    : vec2<f32>,\n"
-          "              offset    : vec2<i32>) -> vec4<T>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList(0,                       // component
-                               "texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               b->vec2<i32>(3, 4));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kGather2dArrayF32,
-          "textureGather(component   : i32,\n"
-          "              t           : texture_2d_array<T>,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec2<f32>,\n"
-          "              array_index : i32) -> vec4<T>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList(0,                       // component
-                               "texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3);                      // array index
-          },
-      },
-      {
-          ValidTextureOverload::kGather2dArrayOffsetF32,
-          "textureGather(component   : i32,\n"
-          "              t           : texture_2d_array<T>,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec2<f32>,\n"
-          "              array_index : i32,\n"
-          "              offset      : vec2<i32>) -> vec4<T>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList(0,                       // component
-                               "texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               b->vec2<i32>(4, 5));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kGatherCubeF32,
-          "textureGather(component : i32,\n"
-          "              t         : texture_cube<T>,\n"
-          "              s         : sampler,\n"
-          "              coords    : vec3<f32>) -> vec4<T>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList(0,                             // component
-                               "texture",                     // t
-                               "sampler",                     // s
-                               b->vec3<f32>(1.f, 2.f, 3.f));  // coords
-          },
-      },
-      {
-          ValidTextureOverload::kGatherCubeArrayF32,
-          "textureGather(component   : i32,\n"
-          "              t           : texture_cube_array<T>,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec3<f32>,\n"
-          "              array_index : i32) -> vec4<T>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList(0,                            // component
-                               "texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4);                           // array_index
-          },
-      },
-      {
-          ValidTextureOverload::kGatherDepth2dF32,
-          "textureGather(t      : texture_depth_2d,\n"
-          "              s      : sampler,\n"
-          "              coords : vec2<f32>) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                // t
-                               "sampler",                // s
-                               b->vec2<f32>(1.f, 2.f));  // coords
-          },
-      },
-      {
-          ValidTextureOverload::kGatherDepth2dOffsetF32,
-          "textureGather(t      : texture_depth_2d,\n"
-          "              s      : sampler,\n"
-          "              coords : vec2<f32>,\n"
-          "              offset : vec2<i32>) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               b->vec2<i32>(3, 4));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kGatherDepth2dArrayF32,
-          "textureGather(t           : texture_depth_2d_array,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec2<f32>,\n"
-          "              array_index : i32) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3);                      // array_index
-          },
-      },
-      {
-          ValidTextureOverload::kGatherDepth2dArrayOffsetF32,
-          "textureGather(t           : texture_depth_2d_array,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec2<f32>,\n"
-          "              array_index : i32,\n"
-          "              offset      : vec2<i32>) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               b->vec2<i32>(4, 5));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kGatherDepthCubeF32,
-          "textureGather(t      : texture_depth_cube,\n"
-          "              s      : sampler,\n"
-          "              coords : vec3<f32>) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                     // t
-                               "sampler",                     // s
-                               b->vec3<f32>(1.f, 2.f, 3.f));  // coords
-          },
-      },
-      {
-          ValidTextureOverload::kGatherDepthCubeArrayF32,
-          "textureGather(t           : texture_depth_cube_array,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec3<f32>,\n"
-          "              array_index : i32) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureGather",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4);                           // array_index
-          },
-      },
-      {
-          ValidTextureOverload::kGatherCompareDepth2dF32,
-          "textureGatherCompare(t         : texture_depth_2d,\n"
-          "                     s         : sampler_comparison,\n"
-          "                     coords    : vec2<f32>,\n"
-          "                     depth_ref : f32) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureGatherCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3.f);                    // depth_ref
-          },
-      },
-      {
-          ValidTextureOverload::kGatherCompareDepth2dOffsetF32,
-          "textureGatherCompare(t         : texture_depth_2d,\n"
-          "                     s         : sampler_comparison,\n"
-          "                     coords    : vec2<f32>,\n"
-          "                     depth_ref : f32,\n"
-          "                     offset    : vec2<i32>) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureGatherCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3.f,                     // depth_ref
-                               b->vec2<i32>(4, 5));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kGatherCompareDepth2dArrayF32,
-          "textureGatherCompare(t           : texture_depth_2d_array,\n"
-          "                     s           : sampler_comparison,\n"
-          "                     coords      : vec2<f32>,\n"
-          "                     array_index : i32,\n"
-          "                     depth_ref   : f32) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureGatherCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               4.f);                    // depth_ref
-          },
-      },
-      {
-          ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32,
-          "textureGatherCompare(t           : texture_depth_2d_array,\n"
-          "                     s           : sampler_comparison,\n"
-          "                     coords      : vec2<f32>,\n"
-          "                     array_index : i32,\n"
-          "                     depth_ref   : f32,\n"
-          "                     offset      : vec2<i32>) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureGatherCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               4.f,                     // depth_ref
-                               b->vec2<i32>(5, 6));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kGatherCompareDepthCubeF32,
-          "textureGatherCompare(t         : texture_depth_cube,\n"
-          "                     s         : sampler_comparison,\n"
-          "                     coords    : vec3<f32>,\n"
-          "                     depth_ref : f32) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureGatherCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4.f);                         // depth_ref
-          },
-      },
-      {
-          ValidTextureOverload::kGatherCompareDepthCubeArrayF32,
-          "textureGatherCompare(t           : texture_depth_cube_array,\n"
-          "                     s           : sampler_comparison,\n"
-          "                     coords      : vec3<f32>,\n"
-          "                     array_index : i32,\n"
-          "                     depth_ref   : f32) -> vec4<f32>",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureGatherCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4,                            // array_index
-                               5.f);                         // depth_ref
-          },
-      },
-      {
-          ValidTextureOverload::kNumLayers2dArray,
-          "textureNumLayers(t : texture_2d_array<f32>) -> i32",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureNumLayers",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLayersCubeArray,
-          "textureNumLayers(t : texture_cube_array<f32>) -> i32",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureNumLayers",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLayersDepth2dArray,
-          "textureNumLayers(t : texture_depth_2d_array) -> i32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureNumLayers",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLayersDepthCubeArray,
-          "textureNumLayers(t : texture_depth_cube_array) -> i32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureNumLayers",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLayersStorageWO2dArray,
-          "textureNumLayers(t : texture_storage_2d_array<rgba32float>) -> i32",
-          ast::Access::kWrite,
-          ast::TexelFormat::kRgba32Float,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureNumLayers",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLevels2d,
-          "textureNumLevels(t : texture_2d<f32>) -> i32",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureNumLevels",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLevels2dArray,
-          "textureNumLevels(t : texture_2d_array<f32>) -> i32",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureNumLevels",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLevels3d,
-          "textureNumLevels(t : texture_3d<f32>) -> i32",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureNumLevels",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLevelsCube,
-          "textureNumLevels(t : texture_cube<f32>) -> i32",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureNumLevels",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLevelsCubeArray,
-          "textureNumLevels(t : texture_cube_array<f32>) -> i32",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureNumLevels",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLevelsDepth2d,
-          "textureNumLevels(t : texture_depth_2d) -> i32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureNumLevels",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLevelsDepth2dArray,
-          "textureNumLevels(t : texture_depth_2d_array) -> i32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureNumLevels",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLevelsDepthCube,
-          "textureNumLevels(t : texture_depth_cube) -> i32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureNumLevels",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumLevelsDepthCubeArray,
-          "textureNumLevels(t : texture_depth_cube_array) -> i32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureNumLevels",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kNumSamplesMultisampled2d,
-          "textureNumSamples(t : texture_multisampled_2d<f32>) -> i32",
-          TextureKind::kMultisampled,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureNumSamples",
-          [](ProgramBuilder* b) { return b->ExprList("texture"); },
-      },
-      {
-          ValidTextureOverload::kSample1dF32,
-          "textureSample(t      : texture_1d<f32>,\n"
-          "              s      : sampler,\n"
-          "              coords : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k1d,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",  // t
-                               "sampler",  // s
-                               1.0f);      // coords
-          },
-      },
-      {
-          ValidTextureOverload::kSample2dF32,
-          "textureSample(t      : texture_2d<f32>,\n"
-          "              s      : sampler,\n"
-          "              coords : vec2<f32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                // t
-                               "sampler",                // s
-                               b->vec2<f32>(1.f, 2.f));  // coords
-          },
-      },
-      {
-          ValidTextureOverload::kSample2dOffsetF32,
-          "textureSample(t      : texture_2d<f32>,\n"
-          "              s      : sampler,\n"
-          "              coords : vec2<f32>\n"
-          "              offset : vec2<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               b->vec2<i32>(3, 4));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSample2dArrayF32,
-          "textureSample(t           : texture_2d_array<f32>,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec2<f32>,\n"
-          "              array_index : i32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3);                      // array_index
-          },
-      },
-      {
-          ValidTextureOverload::kSample2dArrayOffsetF32,
-          "textureSample(t           : texture_2d_array<f32>,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec2<f32>,\n"
-          "              array_index : i32\n"
-          "              offset      : vec2<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               b->vec2<i32>(4, 5));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSample3dF32,
-          "textureSample(t      : texture_3d<f32>,\n"
-          "              s      : sampler,\n"
-          "              coords : vec3<f32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                     // t
-                               "sampler",                     // s
-                               b->vec3<f32>(1.f, 2.f, 3.f));  // coords
-          },
-      },
-      {
-          ValidTextureOverload::kSample3dOffsetF32,
-          "textureSample(t      : texture_3d<f32>,\n"
-          "              s      : sampler,\n"
-          "              coords : vec3<f32>\n"
-          "              offset : vec3<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               b->vec3<i32>(4, 5, 6));       // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleCubeF32,
-          "textureSample(t      : texture_cube<f32>,\n"
-          "              s      : sampler,\n"
-          "              coords : vec3<f32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                     // t
-                               "sampler",                     // s
-                               b->vec3<f32>(1.f, 2.f, 3.f));  // coords
-          },
-      },
-      {
-          ValidTextureOverload::kSampleCubeArrayF32,
-          "textureSample(t           : texture_cube_array<f32>,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec3<f32>,\n"
-          "              array_index : i32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4);                           // array_index
-          },
-      },
-      {
-          ValidTextureOverload::kSampleDepth2dF32,
-          "textureSample(t      : texture_depth_2d,\n"
-          "              s      : sampler,\n"
-          "              coords : vec2<f32>) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                // t
-                               "sampler",                // s
-                               b->vec2<f32>(1.f, 2.f));  // coords
-          },
-      },
-      {
-          ValidTextureOverload::kSampleDepth2dOffsetF32,
-          "textureSample(t      : texture_depth_2d,\n"
-          "              s      : sampler,\n"
-          "              coords : vec2<f32>\n"
-          "              offset : vec2<i32>) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               b->vec2<i32>(3, 4));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleDepth2dArrayF32,
-          "textureSample(t           : texture_depth_2d_array,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec2<f32>,\n"
-          "              array_index : i32) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3);                      // array_index
-          },
-      },
-      {
-          ValidTextureOverload::kSampleDepth2dArrayOffsetF32,
-          "textureSample(t           : texture_depth_2d_array,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec2<f32>,\n"
-          "              array_index : i32\n"
-          "              offset      : vec2<i32>) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               b->vec2<i32>(4, 5));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleDepthCubeF32,
-          "textureSample(t      : texture_depth_cube,\n"
-          "              s      : sampler,\n"
-          "              coords : vec3<f32>) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                     // t
-                               "sampler",                     // s
-                               b->vec3<f32>(1.f, 2.f, 3.f));  // coords
-          },
-      },
-      {
-          ValidTextureOverload::kSampleDepthCubeArrayF32,
-          "textureSample(t           : texture_depth_cube_array,\n"
-          "              s           : sampler,\n"
-          "              coords      : vec3<f32>,\n"
-          "              array_index : i32) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureSample",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4);                           // array_index
-          },
-      },
-      {
-          ValidTextureOverload::kSampleBias2dF32,
-          "textureSampleBias(t      : texture_2d<f32>,\n"
-          "                  s      : sampler,\n"
-          "                  coords : vec2<f32>,\n"
-          "                  bias   : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSampleBias",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3.f);                    // bias
-          },
-      },
-      {
-          ValidTextureOverload::kSampleBias2dOffsetF32,
-          "textureSampleBias(t      : texture_2d<f32>,\n"
-          "                  s      : sampler,\n"
-          "                  coords : vec2<f32>,\n"
-          "                  bias   : f32,\n"
-          "                  offset : vec2<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSampleBias",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3.f,                     // bias
-                               b->vec2<i32>(4, 5));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleBias2dArrayF32,
-          "textureSampleBias(t           : texture_2d_array<f32>,\n"
-          "                  s           : sampler,\n"
-          "                  coords      : vec2<f32>,\n"
-          "                  array_index : i32,\n"
-          "                  bias        : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSampleBias",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               4,                       // array_index
-                               3.f);                    // bias
-          },
-      },
-      {
-          ValidTextureOverload::kSampleBias2dArrayOffsetF32,
-          "textureSampleBias(t           : texture_2d_array<f32>,\n"
-          "                  s           : sampler,\n"
-          "                  coords      : vec2<f32>,\n"
-          "                  array_index : i32,\n"
-          "                  bias        : f32,\n"
-          "                  offset      : vec2<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSampleBias",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               4.f,                     // bias
-                               b->vec2<i32>(5, 6));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleBias3dF32,
-          "textureSampleBias(t      : texture_3d<f32>,\n"
-          "                  s      : sampler,\n"
-          "                  coords : vec3<f32>,\n"
-          "                  bias   : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureSampleBias",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4.f);                         // bias
-          },
-      },
-      {
-          ValidTextureOverload::kSampleBias3dOffsetF32,
-          "textureSampleBias(t      : texture_3d<f32>,\n"
-          "                  s      : sampler,\n"
-          "                  coords : vec3<f32>,\n"
-          "                  bias   : f32,\n"
-          "                  offset : vec3<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureSampleBias",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4.f,                          // bias
-                               b->vec3<i32>(5, 6, 7));       // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleBiasCubeF32,
-          "textureSampleBias(t      : texture_cube<f32>,\n"
-          "                  s      : sampler,\n"
-          "                  coords : vec3<f32>,\n"
-          "                  bias   : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureSampleBias",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4.f);                         // bias
-          },
-      },
-      {
-          ValidTextureOverload::kSampleBiasCubeArrayF32,
-          "textureSampleBias(t           : texture_cube_array<f32>,\n"
-          "                  s           : sampler,\n"
-          "                  coords      : vec3<f32>,\n"
-          "                  array_index : i32,\n"
-          "                  bias        : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureSampleBias",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               3,                            // array_index
-                               4.f);                         // bias
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevel2dF32,
-          "textureSampleLevel(t      : texture_2d<f32>,\n"
-          "                   s      : sampler,\n"
-          "                   coords : vec2<f32>,\n"
-          "                   level  : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3.f);                    // level
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevel2dOffsetF32,
-          "textureSampleLevel(t      : texture_2d<f32>,\n"
-          "                   s      : sampler,\n"
-          "                   coords : vec2<f32>,\n"
-          "                   level  : f32,\n"
-          "                   offset : vec2<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3.f,                     // level
-                               b->vec2<i32>(4, 5));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevel2dArrayF32,
-          "textureSampleLevel(t           : texture_2d_array<f32>,\n"
-          "                   s           : sampler,\n"
-          "                   coords      : vec2<f32>,\n"
-          "                   array_index : i32,\n"
-          "                   level       : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               4.f);                    // level
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevel2dArrayOffsetF32,
-          "textureSampleLevel(t           : texture_2d_array<f32>,\n"
-          "                   s           : sampler,\n"
-          "                   coords      : vec2<f32>,\n"
-          "                   array_index : i32,\n"
-          "                   level       : f32,\n"
-          "                   offset      : vec2<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               4.f,                     // level
-                               b->vec2<i32>(5, 6));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevel3dF32,
-          "textureSampleLevel(t      : texture_3d<f32>,\n"
-          "                   s      : sampler,\n"
-          "                   coords : vec3<f32>,\n"
-          "                   level  : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4.f);                         // level
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevel3dOffsetF32,
-          "textureSampleLevel(t      : texture_3d<f32>,\n"
-          "                   s      : sampler,\n"
-          "                   coords : vec3<f32>,\n"
-          "                   level  : f32,\n"
-          "                   offset : vec3<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4.f,                          // level
-                               b->vec3<i32>(5, 6, 7));       // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevelCubeF32,
-          "textureSampleLevel(t      : texture_cube<f32>,\n"
-          "                   s      : sampler,\n"
-          "                   coords : vec3<f32>,\n"
-          "                   level  : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4.f);                         // level
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevelCubeArrayF32,
-          "textureSampleLevel(t           : texture_cube_array<f32>,\n"
-          "                   s           : sampler,\n"
-          "                   coords      : vec3<f32>,\n"
-          "                   array_index : i32,\n"
-          "                   level       : f32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4,                            // array_index
-                               5.f);                         // level
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevelDepth2dF32,
-          "textureSampleLevel(t      : texture_depth_2d,\n"
-          "                   s      : sampler,\n"
-          "                   coords : vec2<f32>,\n"
-          "                   level  : i32) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3);                      // level
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevelDepth2dOffsetF32,
-          "textureSampleLevel(t      : texture_depth_2d,\n"
-          "                   s      : sampler,\n"
-          "                   coords : vec2<f32>,\n"
-          "                   level  : i32,\n"
-          "                   offset : vec2<i32>) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // level
-                               b->vec2<i32>(4, 5));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevelDepth2dArrayF32,
-          "textureSampleLevel(t           : texture_depth_2d_array,\n"
-          "                   s           : sampler,\n"
-          "                   coords      : vec2<f32>,\n"
-          "                   array_index : i32,\n"
-          "                   level       : i32) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               4);                      // level
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32,
-          "textureSampleLevel(t           : texture_depth_2d_array,\n"
-          "                   s           : sampler,\n"
-          "                   coords      : vec2<f32>,\n"
-          "                   array_index : i32,\n"
-          "                   level       : i32,\n"
-          "                   offset      : vec2<i32>) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               4,                       // level
-                               b->vec2<i32>(5, 6));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevelDepthCubeF32,
-          "textureSampleLevel(t      : texture_depth_cube,\n"
-          "                   s      : sampler,\n"
-          "                   coords : vec3<f32>,\n"
-          "                   level  : i32) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4);                           // level
-          },
-      },
-      {
-          ValidTextureOverload::kSampleLevelDepthCubeArrayF32,
-          "textureSampleLevel(t           : texture_depth_cube_array,\n"
-          "                   s           : sampler,\n"
-          "                   coords      : vec3<f32>,\n"
-          "                   array_index : i32,\n"
-          "                   level       : i32) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureSampleLevel",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4,                            // array_index
-                               5);                           // level
-          },
-      },
-      {
-          ValidTextureOverload::kSampleGrad2dF32,
-          "textureSampleGrad(t      : texture_2d<f32>,\n"
-          "                  s      : sampler,\n"
-          "                  coords : vec2<f32>\n"
-          "                  ddx    : vec2<f32>,\n"
-          "                  ddy    : vec2<f32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSampleGrad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                  // t
-                               "sampler",                  // s
-                               b->vec2<f32>(1.0f, 2.0f),   // coords
-                               b->vec2<f32>(3.0f, 4.0f),   // ddx
-                               b->vec2<f32>(5.0f, 6.0f));  // ddy
-          },
-      },
-      {
-          ValidTextureOverload::kSampleGrad2dOffsetF32,
-          "textureSampleGrad(t      : texture_2d<f32>,\n"
-          "                  s      : sampler,\n"
-          "                  coords : vec2<f32>,\n"
-          "                  ddx    : vec2<f32>,\n"
-          "                  ddy    : vec2<f32>,\n"
-          "                  offset : vec2<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSampleGrad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               b->vec2<f32>(3.f, 4.f),  // ddx
-                               b->vec2<f32>(5.f, 6.f),  // ddy
-                               b->vec2<i32>(7, 7));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleGrad2dArrayF32,
-          "textureSampleGrad(t           : texture_2d_array<f32>,\n"
-          "                  s           : sampler,\n"
-          "                  coords      : vec2<f32>,\n"
-          "                  array_index : i32,\n"
-          "                  ddx         : vec2<f32>,\n"
-          "                  ddy         : vec2<f32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSampleGrad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                // t
-                               "sampler",                // s
-                               b->vec2<f32>(1.f, 2.f),   // coords
-                               3,                        // array_index
-                               b->vec2<f32>(4.f, 5.f),   // ddx
-                               b->vec2<f32>(6.f, 7.f));  // ddy
-          },
-      },
-      {
-          ValidTextureOverload::kSampleGrad2dArrayOffsetF32,
-          "textureSampleGrad(t           : texture_2d_array<f32>,\n"
-          "                  s           : sampler,\n"
-          "                  coords      : vec2<f32>,\n"
-          "                  array_index : i32,\n"
-          "                  ddx         : vec2<f32>,\n"
-          "                  ddy         : vec2<f32>,\n"
-          "                  offset      : vec2<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSampleGrad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3,                       // array_index
-                               b->vec2<f32>(4.f, 5.f),  // ddx
-                               b->vec2<f32>(6.f, 7.f),  // ddy
-                               b->vec2<i32>(6, 7));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleGrad3dF32,
-          "textureSampleGrad(t      : texture_3d<f32>,\n"
-          "                  s      : sampler,\n"
-          "                  coords : vec3<f32>,\n"
-          "                  ddx    : vec3<f32>,\n"
-          "                  ddy    : vec3<f32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureSampleGrad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                     // t
-                               "sampler",                     // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),   // coords
-                               b->vec3<f32>(4.f, 5.f, 6.f),   // ddx
-                               b->vec3<f32>(7.f, 8.f, 9.f));  // ddy
-          },
-      },
-      {
-          ValidTextureOverload::kSampleGrad3dOffsetF32,
-          "textureSampleGrad(t      : texture_3d<f32>,\n"
-          "                  s      : sampler,\n"
-          "                  coords : vec3<f32>,\n"
-          "                  ddx    : vec3<f32>,\n"
-          "                  ddy    : vec3<f32>,\n"
-          "                  offset : vec3<i32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureSampleGrad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               b->vec3<f32>(4.f, 5.f, 6.f),  // ddx
-                               b->vec3<f32>(7.f, 8.f, 9.f),  // ddy
-                               b->vec3<i32>(0, 1, 2));       // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleGradCubeF32,
-          "textureSampleGrad(t      : texture_cube<f32>,\n"
-          "                  s      : sampler,\n"
-          "                  coords : vec3<f32>,\n"
-          "                  ddx    : vec3<f32>,\n"
-          "                  ddy    : vec3<f32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureSampleGrad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                     // t
-                               "sampler",                     // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),   // coords
-                               b->vec3<f32>(4.f, 5.f, 6.f),   // ddx
-                               b->vec3<f32>(7.f, 8.f, 9.f));  // ddy
-          },
-      },
-      {
-          ValidTextureOverload::kSampleGradCubeArrayF32,
-          "textureSampleGrad(t           : texture_cube_array<f32>,\n"
-          "                  s           : sampler,\n"
-          "                  coords      : vec3<f32>,\n"
-          "                  array_index : i32,\n"
-          "                  ddx         : vec3<f32>,\n"
-          "                  ddy         : vec3<f32>) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::SamplerKind::kSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureSampleGrad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                      // t
-                               "sampler",                      // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),    // coords
-                               4,                              // array_index
-                               b->vec3<f32>(5.f, 6.f, 7.f),    // ddx
-                               b->vec3<f32>(8.f, 9.f, 10.f));  // ddy
-          },
-      },
-      {
-          ValidTextureOverload::kSampleCompareDepth2dF32,
-          "textureSampleCompare(t         : texture_depth_2d,\n"
-          "                     s         : sampler_comparison,\n"
-          "                     coords    : vec2<f32>,\n"
-          "                     depth_ref : f32) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSampleCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3.f);                    // depth_ref
-          },
-      },
-      {
-          ValidTextureOverload::kSampleCompareDepth2dOffsetF32,
-          "textureSampleCompare(t         : texture_depth_2d,\n"
-          "                     s         : sampler_comparison,\n"
-          "                     coords    : vec2<f32>,\n"
-          "                     depth_ref : f32,\n"
-          "                     offset    : vec2<i32>) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureSampleCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               3.f,                     // depth_ref
-                               b->vec2<i32>(4, 5));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleCompareDepth2dArrayF32,
-          "textureSampleCompare(t           : texture_depth_2d_array,\n"
-          "                     s           : sampler_comparison,\n"
-          "                     coords      : vec2<f32>,\n"
-          "                     array_index : i32,\n"
-          "                     depth_ref   : f32) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSampleCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               4,                       // array_index
-                               3.f);                    // depth_ref
-          },
-      },
-      {
-          ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32,
-          "textureSampleCompare(t           : texture_depth_2d_array,\n"
-          "                     s           : sampler_comparison,\n"
-          "                     coords      : vec2<f32>,\n"
-          "                     array_index : i32,\n"
-          "                     depth_ref   : f32,\n"
-          "                     offset      : vec2<i32>) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureSampleCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",               // t
-                               "sampler",               // s
-                               b->vec2<f32>(1.f, 2.f),  // coords
-                               4,                       // array_index
-                               3.f,                     // depth_ref
-                               b->vec2<i32>(5, 6));     // offset
-          },
-      },
-      {
-          ValidTextureOverload::kSampleCompareDepthCubeF32,
-          "textureSampleCompare(t         : texture_depth_cube,\n"
-          "                     s         : sampler_comparison,\n"
-          "                     coords    : vec3<f32>,\n"
-          "                     depth_ref : f32) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::kCube,
-          TextureDataType::kF32,
-          "textureSampleCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4.f);                         // depth_ref
-          },
-      },
-      {
-          ValidTextureOverload::kSampleCompareDepthCubeArrayF32,
-          "textureSampleCompare(t           : texture_depth_cube_array,\n"
-          "                     s           : sampler_comparison,\n"
-          "                     coords      : vec3<f32>,\n"
-          "                     array_index : i32,\n"
-          "                     depth_ref   : f32) -> f32",
-          TextureKind::kDepth,
-          ast::SamplerKind::kComparisonSampler,
-          ast::TextureDimension::kCubeArray,
-          TextureDataType::kF32,
-          "textureSampleCompare",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                    // t
-                               "sampler",                    // s
-                               b->vec3<f32>(1.f, 2.f, 3.f),  // coords
-                               4,                            // array_index
-                               5.f);                         // depth_ref
-          },
-      },
-      {
-          ValidTextureOverload::kLoad1dLevelF32,
-          "textureLoad(t      : texture_1d<f32>,\n"
-          "            coords : i32,\n"
-          "            level  : i32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k1d,
-          TextureDataType::kF32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",  // t
-                               1,          // coords
-                               3);         // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad1dLevelU32,
-          "textureLoad(t      : texture_1d<u32>,\n"
-          "            coords : i32,\n"
-          "            level  : i32) -> vec4<u32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k1d,
-          TextureDataType::kU32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",  // t
-                               1,          // coords
-                               3);         // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad1dLevelI32,
-          "textureLoad(t      : texture_1d<i32>,\n"
-          "            coords : i32,\n"
-          "            level  : i32) -> vec4<i32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k1d,
-          TextureDataType::kI32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",  // t
-                               1,          // coords
-                               3);         // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad2dLevelF32,
-          "textureLoad(t      : texture_2d<f32>,\n"
-          "            coords : vec2<i32>,\n"
-          "            level  : i32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3);                  // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad2dLevelU32,
-          "textureLoad(t      : texture_2d<u32>,\n"
-          "            coords : vec2<i32>,\n"
-          "            level  : i32) -> vec4<u32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k2d,
-          TextureDataType::kU32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3);                  // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad2dLevelI32,
-          "textureLoad(t      : texture_2d<i32>,\n"
-          "            coords : vec2<i32>,\n"
-          "            level  : i32) -> vec4<i32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k2d,
-          TextureDataType::kI32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3);                  // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad2dArrayLevelF32,
-          "textureLoad(t           : texture_2d_array<f32>,\n"
-          "            coords      : vec2<i32>,\n"
-          "            array_index : i32,\n"
-          "            level       : i32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3,                   // array_index
-                               4);                  // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad2dArrayLevelU32,
-          "textureLoad(t           : texture_2d_array<u32>,\n"
-          "            coords      : vec2<i32>,\n"
-          "            array_index : i32,\n"
-          "            level       : i32) -> vec4<u32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kU32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3,                   // array_index
-                               4);                  // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad2dArrayLevelI32,
-          "textureLoad(t           : texture_2d_array<i32>,\n"
-          "            coords      : vec2<i32>,\n"
-          "            array_index : i32,\n"
-          "            level       : i32) -> vec4<i32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kI32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3,                   // array_index
-                               4);                  // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad3dLevelF32,
-          "textureLoad(t      : texture_3d<f32>,\n"
-          "            coords : vec3<i32>,\n"
-          "            level  : i32) -> vec4<f32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",              // t
-                               b->vec3<i32>(1, 2, 3),  // coords
-                               4);                     // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad3dLevelU32,
-          "textureLoad(t      : texture_3d<u32>,\n"
-          "            coords : vec3<i32>,\n"
-          "            level  : i32) -> vec4<u32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k3d,
-          TextureDataType::kU32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",              // t
-                               b->vec3<i32>(1, 2, 3),  // coords
-                               4);                     // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoad3dLevelI32,
-          "textureLoad(t      : texture_3d<i32>,\n"
-          "            coords : vec3<i32>,\n"
-          "            level  : i32) -> vec4<i32>",
-          TextureKind::kRegular,
-          ast::TextureDimension::k3d,
-          TextureDataType::kI32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",              // t
-                               b->vec3<i32>(1, 2, 3),  // coords
-                               4);                     // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoadMultisampled2dF32,
-          "textureLoad(t            : texture_multisampled_2d<f32>,\n"
-          "            coords       : vec2<i32>,\n"
-          "            sample_index : i32) -> vec4<f32>",
-          TextureKind::kMultisampled,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3);                  // sample_index
-          },
-      },
-      {
-          ValidTextureOverload::kLoadMultisampled2dU32,
-          "textureLoad(t            : texture_multisampled_2d<u32>,\n"
-          "            coords       : vec2<i32>,\n"
-          "            sample_index : i32) -> vec4<u32>",
-          TextureKind::kMultisampled,
-          ast::TextureDimension::k2d,
-          TextureDataType::kU32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3);                  // sample_index
-          },
-      },
-      {
-          ValidTextureOverload::kLoadMultisampled2dI32,
-          "textureLoad(t            : texture_multisampled_2d<i32>,\n"
-          "            coords       : vec2<i32>,\n"
-          "            sample_index : i32) -> vec4<i32>",
-          TextureKind::kMultisampled,
-          ast::TextureDimension::k2d,
-          TextureDataType::kI32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3);                  // sample_index
-          },
-      },
-      {
-          ValidTextureOverload::kLoadDepth2dLevelF32,
-          "textureLoad(t      : texture_depth_2d,\n"
-          "            coords : vec2<i32>,\n"
-          "            level  : i32) -> f32",
-          TextureKind::kDepth,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3);                  // level
-          },
-      },
-      {
-          ValidTextureOverload::kLoadDepth2dArrayLevelF32,
-          "textureLoad(t           : texture_depth_2d_array,\n"
-          "            coords      : vec2<i32>,\n"
-          "            array_index : i32,\n"
-          "            level       : i32) -> f32",
-          TextureKind::kDepth,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureLoad",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3,                   // array_index
-                               4);                  // level
-          },
-      },
-      {
-          ValidTextureOverload::kStoreWO1dRgba32float,
-          "textureStore(t      : texture_storage_1d<rgba32float>,\n"
-          "             coords : i32,\n"
-          "             value  : vec4<T>)",
-          ast::Access::kWrite,
-          ast::TexelFormat::kRgba32Float,
-          ast::TextureDimension::k1d,
-          TextureDataType::kF32,
-          "textureStore",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                          // t
-                               1,                                  // coords
-                               b->vec4<f32>(2.f, 3.f, 4.f, 5.f));  // value
-          },
-      },
-      {
-          ValidTextureOverload::kStoreWO2dRgba32float,
-          "textureStore(t      : texture_storage_2d<rgba32float>,\n"
-          "             coords : vec2<i32>,\n"
-          "             value  : vec4<T>)",
-          ast::Access::kWrite,
-          ast::TexelFormat::kRgba32Float,
-          ast::TextureDimension::k2d,
-          TextureDataType::kF32,
-          "textureStore",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                          // t
-                               b->vec2<i32>(1, 2),                 // coords
-                               b->vec4<f32>(3.f, 4.f, 5.f, 6.f));  // value
-          },
-      },
-      {
-          ValidTextureOverload::kStoreWO2dArrayRgba32float,
-          "textureStore(t           : texture_storage_2d_array<rgba32float>,\n"
-          "             coords      : vec2<i32>,\n"
-          "             array_index : i32,\n"
-          "             value       : vec4<T>)",
-          ast::Access::kWrite,
-          ast::TexelFormat::kRgba32Float,
-          ast::TextureDimension::k2dArray,
-          TextureDataType::kF32,
-          "textureStore",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",           // t
-                               b->vec2<i32>(1, 2),  // coords
-                               3,                   // array_index
-                               b->vec4<f32>(4.f, 5.f, 6.f, 7.f));  // value
-          },
-      },
-      {
-          ValidTextureOverload::kStoreWO3dRgba32float,
-          "textureStore(t      : texture_storage_3d<rgba32float>,\n"
-          "             coords : vec3<i32>,\n"
-          "             value  : vec4<T>)",
-          ast::Access::kWrite,
-          ast::TexelFormat::kRgba32Float,
-          ast::TextureDimension::k3d,
-          TextureDataType::kF32,
-          "textureStore",
-          [](ProgramBuilder* b) {
-            return b->ExprList("texture",                          // t
-                               b->vec3<i32>(1, 2, 3),              // coords
-                               b->vec4<f32>(4.f, 5.f, 6.f, 7.f));  // value
-          },
-      },
-  };
-}
-
-bool ReturnsVoid(ValidTextureOverload texture_overload) {
-  switch (texture_overload) {
-    case ValidTextureOverload::kStoreWO1dRgba32float:
-    case ValidTextureOverload::kStoreWO2dRgba32float:
-    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
-    case ValidTextureOverload::kStoreWO3dRgba32float:
-      return true;
-    default:
-      return false;
-  }
-}
-
-}  // namespace test
-}  // namespace intrinsic
-}  // namespace ast
-}  // namespace tint
diff --git a/src/ast/intrinsic_texture_helper_test.h b/src/ast/intrinsic_texture_helper_test.h
deleted file mode 100644
index b5f4a34..0000000
--- a/src/ast/intrinsic_texture_helper_test.h
+++ /dev/null
@@ -1,269 +0,0 @@
-// Copyright 2020 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef SRC_AST_INTRINSIC_TEXTURE_HELPER_TEST_H_
-#define SRC_AST_INTRINSIC_TEXTURE_HELPER_TEST_H_
-
-#include <vector>
-
-#include "src/ast/access.h"
-#include "src/program_builder.h"
-#include "src/sem/storage_texture_type.h"
-
-namespace tint {
-namespace ast {
-namespace intrinsic {
-namespace test {
-
-enum class TextureKind {
-  kRegular,
-  kDepth,
-  kDepthMultisampled,
-  kMultisampled,
-  kStorage
-};
-enum class TextureDataType { kF32, kU32, kI32 };
-
-std::ostream& operator<<(std::ostream& out, const TextureKind& kind);
-std::ostream& operator<<(std::ostream& out, const TextureDataType& ty);
-
-/// Non-exhaustive list of valid texture overloads
-enum class ValidTextureOverload {
-  kDimensions1d,
-  kDimensions2d,
-  kDimensions2dLevel,
-  kDimensions2dArray,
-  kDimensions2dArrayLevel,
-  kDimensions3d,
-  kDimensions3dLevel,
-  kDimensionsCube,
-  kDimensionsCubeLevel,
-  kDimensionsCubeArray,
-  kDimensionsCubeArrayLevel,
-  kDimensionsMultisampled2d,
-  kDimensionsDepth2d,
-  kDimensionsDepth2dLevel,
-  kDimensionsDepth2dArray,
-  kDimensionsDepth2dArrayLevel,
-  kDimensionsDepthCube,
-  kDimensionsDepthCubeLevel,
-  kDimensionsDepthCubeArray,
-  kDimensionsDepthCubeArrayLevel,
-  kDimensionsDepthMultisampled2d,
-  kDimensionsStorageWO1d,
-  kDimensionsStorageWO2d,
-  kDimensionsStorageWO2dArray,
-  kDimensionsStorageWO3d,
-  kGather2dF32,
-  kGather2dOffsetF32,
-  kGather2dArrayF32,
-  kGather2dArrayOffsetF32,
-  kGatherCubeF32,
-  kGatherCubeArrayF32,
-  kGatherDepth2dF32,
-  kGatherDepth2dOffsetF32,
-  kGatherDepth2dArrayF32,
-  kGatherDepth2dArrayOffsetF32,
-  kGatherDepthCubeF32,
-  kGatherDepthCubeArrayF32,
-  kGatherCompareDepth2dF32,
-  kGatherCompareDepth2dOffsetF32,
-  kGatherCompareDepth2dArrayF32,
-  kGatherCompareDepth2dArrayOffsetF32,
-  kGatherCompareDepthCubeF32,
-  kGatherCompareDepthCubeArrayF32,
-  kNumLayers2dArray,
-  kNumLayersCubeArray,
-  kNumLayersDepth2dArray,
-  kNumLayersDepthCubeArray,
-  kNumLayersStorageWO2dArray,
-  kNumLevels2d,
-  kNumLevels2dArray,
-  kNumLevels3d,
-  kNumLevelsCube,
-  kNumLevelsCubeArray,
-  kNumLevelsDepth2d,
-  kNumLevelsDepth2dArray,
-  kNumLevelsDepthCube,
-  kNumLevelsDepthCubeArray,
-  kNumSamplesMultisampled2d,
-  kNumSamplesDepthMultisampled2d,
-  kSample1dF32,
-  kSample2dF32,
-  kSample2dOffsetF32,
-  kSample2dArrayF32,
-  kSample2dArrayOffsetF32,
-  kSample3dF32,
-  kSample3dOffsetF32,
-  kSampleCubeF32,
-  kSampleCubeArrayF32,
-  kSampleDepth2dF32,
-  kSampleDepth2dOffsetF32,
-  kSampleDepth2dArrayF32,
-  kSampleDepth2dArrayOffsetF32,
-  kSampleDepthCubeF32,
-  kSampleDepthCubeArrayF32,
-  kSampleBias2dF32,
-  kSampleBias2dOffsetF32,
-  kSampleBias2dArrayF32,
-  kSampleBias2dArrayOffsetF32,
-  kSampleBias3dF32,
-  kSampleBias3dOffsetF32,
-  kSampleBiasCubeF32,
-  kSampleBiasCubeArrayF32,
-  kSampleLevel2dF32,
-  kSampleLevel2dOffsetF32,
-  kSampleLevel2dArrayF32,
-  kSampleLevel2dArrayOffsetF32,
-  kSampleLevel3dF32,
-  kSampleLevel3dOffsetF32,
-  kSampleLevelCubeF32,
-  kSampleLevelCubeArrayF32,
-  kSampleLevelDepth2dF32,
-  kSampleLevelDepth2dOffsetF32,
-  kSampleLevelDepth2dArrayF32,
-  kSampleLevelDepth2dArrayOffsetF32,
-  kSampleLevelDepthCubeF32,
-  kSampleLevelDepthCubeArrayF32,
-  kSampleGrad2dF32,
-  kSampleGrad2dOffsetF32,
-  kSampleGrad2dArrayF32,
-  kSampleGrad2dArrayOffsetF32,
-  kSampleGrad3dF32,
-  kSampleGrad3dOffsetF32,
-  kSampleGradCubeF32,
-  kSampleGradCubeArrayF32,
-  kSampleCompareDepth2dF32,
-  kSampleCompareDepth2dOffsetF32,
-  kSampleCompareDepth2dArrayF32,
-  kSampleCompareDepth2dArrayOffsetF32,
-  kSampleCompareDepthCubeF32,
-  kSampleCompareDepthCubeArrayF32,
-  kSampleCompareLevelDepth2dF32,
-  kSampleCompareLevelDepth2dOffsetF32,
-  kSampleCompareLevelDepth2dArrayF32,
-  kSampleCompareLevelDepth2dArrayOffsetF32,
-  kSampleCompareLevelDepthCubeF32,
-  kSampleCompareLevelDepthCubeArrayF32,
-  kLoad1dLevelF32,
-  kLoad1dLevelU32,
-  kLoad1dLevelI32,
-  kLoad2dLevelF32,
-  kLoad2dLevelU32,
-  kLoad2dLevelI32,
-  kLoad2dArrayLevelF32,
-  kLoad2dArrayLevelU32,
-  kLoad2dArrayLevelI32,
-  kLoad3dLevelF32,
-  kLoad3dLevelU32,
-  kLoad3dLevelI32,
-  kLoadMultisampled2dF32,
-  kLoadMultisampled2dU32,
-  kLoadMultisampled2dI32,
-  kLoadDepth2dLevelF32,
-  kLoadDepth2dArrayLevelF32,
-  kLoadDepthMultisampled2dF32,
-  kStoreWO1dRgba32float,       // Not permutated for all texel formats
-  kStoreWO2dRgba32float,       // Not permutated for all texel formats
-  kStoreWO2dArrayRgba32float,  // Not permutated for all texel formats
-  kStoreWO3dRgba32float,       // Not permutated for all texel formats
-};
-
-/// @param texture_overload the ValidTextureOverload
-/// @returns true if the ValidTextureOverload intrinsic returns no value.
-bool ReturnsVoid(ValidTextureOverload texture_overload);
-
-/// Describes a texture intrinsic overload
-struct TextureOverloadCase {
-  /// Constructor for textureSample...() functions
-  TextureOverloadCase(ValidTextureOverload,
-                      const char*,
-                      TextureKind,
-                      ast::SamplerKind,
-                      ast::TextureDimension,
-                      TextureDataType,
-                      const char*,
-                      std::function<ExpressionList(ProgramBuilder*)>);
-  /// Constructor for textureLoad() functions with non-storage textures
-  TextureOverloadCase(ValidTextureOverload,
-                      const char*,
-                      TextureKind,
-                      ast::TextureDimension,
-                      TextureDataType,
-                      const char*,
-                      std::function<ExpressionList(ProgramBuilder*)>);
-  /// Constructor for textureLoad() with storage textures
-  TextureOverloadCase(ValidTextureOverload,
-                      const char*,
-                      Access,
-                      ast::TexelFormat,
-                      ast::TextureDimension,
-                      TextureDataType,
-                      const char*,
-                      std::function<ExpressionList(ProgramBuilder*)>);
-  /// Copy constructor
-  TextureOverloadCase(const TextureOverloadCase&);
-  /// Destructor
-  ~TextureOverloadCase();
-
-  /// @return a vector containing a large number (non-exhaustive) of valid
-  /// texture overloads.
-  static std::vector<TextureOverloadCase> ValidCases();
-
-  /// @param builder the AST builder used for the test
-  /// @returns the vector component type of the texture function return value
-  const ast::Type* BuildResultVectorComponentType(
-      ProgramBuilder* builder) const;
-  /// @param builder the AST builder used for the test
-  /// @returns a variable holding the test texture, automatically registered as
-  /// a global variable.
-  const ast::Variable* BuildTextureVariable(ProgramBuilder* builder) const;
-  /// @param builder the AST builder used for the test
-  /// @returns a Variable holding the test sampler, automatically registered as
-  /// a global variable.
-  const ast::Variable* BuildSamplerVariable(ProgramBuilder* builder) const;
-
-  /// The enumerator for this overload
-  const ValidTextureOverload overload;
-  /// A human readable description of the overload
-  const char* const description;
-  /// The texture kind for the texture parameter
-  const TextureKind texture_kind;
-  /// The sampler kind for the sampler parameter
-  /// Used only when texture_kind is not kStorage
-  ast::SamplerKind const sampler_kind = ast::SamplerKind::kSampler;
-  /// The access control for the storage texture
-  /// Used only when texture_kind is kStorage
-  Access const access = Access::kReadWrite;
-  /// The image format for the storage texture
-  /// Used only when texture_kind is kStorage
-  ast::TexelFormat const texel_format = ast::TexelFormat::kNone;
-  /// The dimensions of the texture parameter
-  ast::TextureDimension const texture_dimension;
-  /// The data type of the texture parameter
-  const TextureDataType texture_data_type;
-  /// Name of the function. e.g. `textureSample`, `textureSampleGrad`, etc
-  const char* const function;
-  /// A function that builds the AST arguments for the overload
-  std::function<ExpressionList(ProgramBuilder*)> const args;
-};
-
-std::ostream& operator<<(std::ostream& out, const TextureOverloadCase& data);
-
-}  // namespace test
-}  // namespace intrinsic
-}  // namespace ast
-}  // namespace tint
-
-#endif  // SRC_AST_INTRINSIC_TEXTURE_HELPER_TEST_H_
diff --git a/src/builtin_table.cc b/src/builtin_table.cc
new file mode 100644
index 0000000..569d057
--- /dev/null
+++ b/src/builtin_table.cc
@@ -0,0 +1,1166 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/builtin_table.h"
+
+#include <algorithm>
+#include <limits>
+#include <unordered_map>
+#include <utility>
+
+#include "src/program_builder.h"
+#include "src/sem/atomic_type.h"
+#include "src/sem/depth_multisampled_texture_type.h"
+#include "src/sem/depth_texture_type.h"
+#include "src/sem/external_texture_type.h"
+#include "src/sem/multisampled_texture_type.h"
+#include "src/sem/pipeline_stage_set.h"
+#include "src/sem/sampled_texture_type.h"
+#include "src/sem/storage_texture_type.h"
+#include "src/utils/hash.h"
+#include "src/utils/map.h"
+#include "src/utils/math.h"
+#include "src/utils/scoped_assignment.h"
+
+namespace tint {
+namespace {
+
+// Forward declarations
+struct OverloadInfo;
+class Matchers;
+class NumberMatcher;
+class TypeMatcher;
+
+/// A special type that matches all TypeMatchers
+class Any : public Castable<Any, sem::Type> {
+ public:
+  Any() = default;
+  ~Any() override = default;
+  std::string type_name() const override { return "<any>"; }
+  std::string FriendlyName(const SymbolTable&) const override {
+    return "<any>";
+  }
+};
+
+/// Number is an 32 bit unsigned integer, which can be in one of three states:
+/// * Invalid - Number has not been assigned a value
+/// * Valid   - a fixed integer value
+/// * Any     - matches any other non-invalid number
+struct Number {
+  static const Number any;
+  static const Number invalid;
+
+  /// Constructed as a valid number with the value v
+  explicit Number(uint32_t v) : value_(v), state_(kValid) {}
+
+  /// @returns the value of the number
+  inline uint32_t Value() const { return value_; }
+
+  /// @returns the true if the number is valid
+  inline bool IsValid() const { return state_ == kValid; }
+
+  /// @returns the true if the number is any
+  inline bool IsAny() const { return state_ == kAny; }
+
+  /// Assignment operator.
+  /// The number becomes valid, with the value n
+  inline Number& operator=(uint32_t n) {
+    value_ = n;
+    state_ = kValid;
+    return *this;
+  }
+
+ private:
+  enum State {
+    kInvalid,
+    kValid,
+    kAny,
+  };
+
+  constexpr explicit Number(State state) : state_(state) {}
+
+  uint32_t value_ = 0;
+  State state_ = kInvalid;
+};
+
+const Number Number::any{Number::kAny};
+const Number Number::invalid{Number::kInvalid};
+
+/// ClosedState holds the state of the open / closed numbers and types.
+/// Used by the MatchState.
+class ClosedState {
+ public:
+  explicit ClosedState(ProgramBuilder& b) : builder(b) {}
+
+  /// If the type with index `idx` is open, then it is closed with type `ty` and
+  /// Type() returns true. If the type is closed, then `Type()` returns true iff
+  /// it is equal to `ty`.
+  bool Type(uint32_t idx, const sem::Type* ty) {
+    auto res = types_.emplace(idx, ty);
+    return res.second || res.first->second == ty;
+  }
+
+  /// If the number with index `idx` is open, then it is closed with number
+  /// `number` and Num() returns true. If the number is closed, then `Num()`
+  /// returns true iff it is equal to `ty`.
+  bool Num(uint32_t idx, Number number) {
+    auto res = numbers_.emplace(idx, number.Value());
+    return res.second || res.first->second == number.Value();
+  }
+
+  /// Type returns the closed type with index `idx`.
+  /// An ICE is raised if the type is not closed.
+  const sem::Type* Type(uint32_t idx) const {
+    auto it = types_.find(idx);
+    if (it == types_.end()) {
+      TINT_ICE(Resolver, builder.Diagnostics())
+          << "type with index " << idx << " is not closed";
+      return nullptr;
+    }
+    TINT_ASSERT(Resolver, it != types_.end());
+    return it->second;
+  }
+
+  /// Type returns the number type with index `idx`.
+  /// An ICE is raised if the number is not closed.
+  Number Num(uint32_t idx) const {
+    auto it = numbers_.find(idx);
+    if (it == numbers_.end()) {
+      TINT_ICE(Resolver, builder.Diagnostics())
+          << "number with index " << idx << " is not closed";
+      return Number::invalid;
+    }
+    return Number(it->second);
+  }
+
+ private:
+  ProgramBuilder& builder;
+  std::unordered_map<uint32_t, const sem::Type*> types_;
+  std::unordered_map<uint32_t, uint32_t> numbers_;
+};
+
+/// Index type used for matcher indices
+using MatcherIndex = uint8_t;
+
+/// Index value used for open types / numbers that do not have a constraint
+constexpr MatcherIndex kNoMatcher = std::numeric_limits<MatcherIndex>::max();
+
+/// MatchState holds the state used to match an overload.
+class MatchState {
+ public:
+  MatchState(ProgramBuilder& b,
+             ClosedState& c,
+             const Matchers& m,
+             const OverloadInfo& o,
+             MatcherIndex const* matcher_indices)
+      : builder(b),
+        closed(c),
+        matchers(m),
+        overload(o),
+        matcher_indices_(matcher_indices) {}
+
+  /// The program builder
+  ProgramBuilder& builder;
+  /// The open / closed types and numbers
+  ClosedState& closed;
+  /// The type and number matchers
+  Matchers const& matchers;
+  /// The current overload being evaluated
+  OverloadInfo const& overload;
+
+  /// Type uses the next TypeMatcher from the matcher indices to match the type
+  /// `ty`. If the type matches, the canonical expected type is returned. If the
+  /// type `ty` does not match, then nullptr is returned.
+  /// @note: The matcher indices are progressed on calling.
+  const sem::Type* Type(const sem::Type* ty);
+
+  /// Num uses the next NumMatcher from the matcher indices to match the number
+  /// `num`. If the number matches, the canonical expected number is returned.
+  /// If the number `num` does not match, then an invalid number is returned.
+  /// @note: The matcher indices are progressed on calling.
+  Number Num(Number num);
+
+  /// @returns a string representation of the next TypeMatcher from the matcher
+  /// indices.
+  /// @note: The matcher indices are progressed on calling.
+  std::string TypeName();
+
+  /// @returns a string representation of the next NumberMatcher from the
+  /// matcher indices.
+  /// @note: The matcher indices are progressed on calling.
+  std::string NumName();
+
+ private:
+  MatcherIndex const* matcher_indices_ = nullptr;
+};
+
+/// A TypeMatcher is the interface used to match an type used as part of an
+/// overload's parameter or return type.
+class TypeMatcher {
+ public:
+  /// Destructor
+  virtual ~TypeMatcher() = default;
+
+  /// Checks whether the given type matches the matcher rules, and returns the
+  /// expected, canonicalized type on success.
+  /// Match may close open types and numbers in state.
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  virtual const sem::Type* Match(MatchState& state,
+                                 const sem::Type* type) const = 0;
+
+  /// @return a string representation of the matcher. Used for printing error
+  /// messages when no overload is found.
+  virtual std::string String(MatchState& state) const = 0;
+};
+
+/// A NumberMatcher is the interface used to match a number or enumerator used
+/// as part of an overload's parameter or return type.
+class NumberMatcher {
+ public:
+  /// Destructor
+  virtual ~NumberMatcher() = default;
+
+  /// Checks whether the given number matches the matcher rules.
+  /// Match may close open numbers in state.
+  /// @param number the number to match
+  /// @returns true if the argument type is as expected.
+  virtual Number Match(MatchState& state, Number number) const = 0;
+
+  /// @return a string representation of the matcher. Used for printing error
+  /// messages when no overload is found.
+  virtual std::string String(MatchState& state) const = 0;
+};
+
+/// OpenTypeMatcher is a Matcher for an open type.
+/// The OpenTypeMatcher will match against any type (so long as it is consistent
+/// across all uses in the overload)
+class OpenTypeMatcher : public TypeMatcher {
+ public:
+  /// Constructor
+  explicit OpenTypeMatcher(uint32_t index) : index_(index) {}
+
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override {
+    if (type->Is<Any>()) {
+      return state.closed.Type(index_);
+    }
+    return state.closed.Type(index_, type) ? type : nullptr;
+  }
+
+  std::string String(MatchState& state) const override;
+
+ private:
+  uint32_t index_;
+};
+
+/// OpenNumberMatcher is a Matcher for an open number.
+/// The OpenNumberMatcher will match against any number (so long as it is
+/// consistent for the overload)
+class OpenNumberMatcher : public NumberMatcher {
+ public:
+  explicit OpenNumberMatcher(uint32_t index) : index_(index) {}
+
+  Number Match(MatchState& state, Number number) const override {
+    if (number.IsAny()) {
+      return state.closed.Num(index_);
+    }
+    return state.closed.Num(index_, number) ? number : Number::invalid;
+  }
+
+  std::string String(MatchState& state) const override;
+
+ private:
+  uint32_t index_;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// Binding functions for use in the generated builtin_table.inl
+// TODO(bclayton): See if we can move more of this hand-rolled code to the
+// template
+////////////////////////////////////////////////////////////////////////////////
+using TexelFormat = ast::TexelFormat;
+using Access = ast::Access;
+using StorageClass = ast::StorageClass;
+using ParameterUsage = sem::ParameterUsage;
+using PipelineStageSet = sem::PipelineStageSet;
+using PipelineStage = ast::PipelineStage;
+
+bool match_bool(const sem::Type* ty) {
+  return ty->IsAnyOf<Any, sem::Bool>();
+}
+
+const sem::Bool* build_bool(MatchState& state) {
+  return state.builder.create<sem::Bool>();
+}
+
+bool match_f32(const sem::Type* ty) {
+  return ty->IsAnyOf<Any, sem::F32>();
+}
+
+const sem::I32* build_i32(MatchState& state) {
+  return state.builder.create<sem::I32>();
+}
+
+bool match_i32(const sem::Type* ty) {
+  return ty->IsAnyOf<Any, sem::I32>();
+}
+
+const sem::U32* build_u32(MatchState& state) {
+  return state.builder.create<sem::U32>();
+}
+
+bool match_u32(const sem::Type* ty) {
+  return ty->IsAnyOf<Any, sem::U32>();
+}
+
+const sem::F32* build_f32(MatchState& state) {
+  return state.builder.create<sem::F32>();
+}
+
+bool match_vec(const sem::Type* ty, Number& N, const sem::Type*& T) {
+  if (ty->Is<Any>()) {
+    N = Number::any;
+    T = ty;
+    return true;
+  }
+
+  if (auto* v = ty->As<sem::Vector>()) {
+    N = v->Width();
+    T = v->type();
+    return true;
+  }
+  return false;
+}
+
+const sem::Vector* build_vec(MatchState& state, Number N, const sem::Type* el) {
+  return state.builder.create<sem::Vector>(el, N.Value());
+}
+
+template <int N>
+bool match_vec(const sem::Type* ty, const sem::Type*& T) {
+  if (ty->Is<Any>()) {
+    T = ty;
+    return true;
+  }
+
+  if (auto* v = ty->As<sem::Vector>()) {
+    if (v->Width() == N) {
+      T = v->type();
+      return true;
+    }
+  }
+  return false;
+}
+
+bool match_vec2(const sem::Type* ty, const sem::Type*& T) {
+  return match_vec<2>(ty, T);
+}
+
+const sem::Vector* build_vec2(MatchState& state, const sem::Type* T) {
+  return build_vec(state, Number(2), T);
+}
+
+bool match_vec3(const sem::Type* ty, const sem::Type*& T) {
+  return match_vec<3>(ty, T);
+}
+
+const sem::Vector* build_vec3(MatchState& state, const sem::Type* T) {
+  return build_vec(state, Number(3), T);
+}
+
+bool match_vec4(const sem::Type* ty, const sem::Type*& T) {
+  return match_vec<4>(ty, T);
+}
+
+const sem::Vector* build_vec4(MatchState& state, const sem::Type* T) {
+  return build_vec(state, Number(4), T);
+}
+
+bool match_mat(const sem::Type* ty, Number& M, Number& N, const sem::Type*& T) {
+  if (ty->Is<Any>()) {
+    M = Number::any;
+    N = Number::any;
+    T = ty;
+    return true;
+  }
+  if (auto* m = ty->As<sem::Matrix>()) {
+    M = m->columns();
+    N = m->ColumnType()->Width();
+    T = m->type();
+    return true;
+  }
+  return false;
+}
+
+const sem::Matrix* build_mat(MatchState& state,
+                             Number N,
+                             Number M,
+                             const sem::Type* T) {
+  auto* column_type = state.builder.create<sem::Vector>(T, M.Value());
+  return state.builder.create<sem::Matrix>(column_type, N.Value());
+}
+
+bool match_array(const sem::Type* ty, const sem::Type*& T) {
+  if (ty->Is<Any>()) {
+    T = ty;
+    return true;
+  }
+
+  if (auto* a = ty->As<sem::Array>()) {
+    if (a->Count() == 0) {
+      T = a->ElemType();
+      return true;
+    }
+  }
+  return false;
+}
+
+const sem::Array* build_array(MatchState& state, const sem::Type* el) {
+  return state.builder.create<sem::Array>(el,
+                                          /* count */ 0,
+                                          /* align */ 0,
+                                          /* size */ 0,
+                                          /* stride */ 0,
+                                          /* stride_implicit */ 0);
+}
+
+bool match_ptr(const sem::Type* ty, Number& S, const sem::Type*& T, Number& A) {
+  if (ty->Is<Any>()) {
+    S = Number::any;
+    T = ty;
+    A = Number::any;
+    return true;
+  }
+
+  if (auto* p = ty->As<sem::Pointer>()) {
+    S = Number(static_cast<uint32_t>(p->StorageClass()));
+    T = p->StoreType();
+    A = Number(static_cast<uint32_t>(p->Access()));
+    return true;
+  }
+  return false;
+}
+
+const sem::Pointer* build_ptr(MatchState& state,
+                              Number S,
+                              const sem::Type* T,
+                              Number& A) {
+  return state.builder.create<sem::Pointer>(
+      T, static_cast<ast::StorageClass>(S.Value()),
+      static_cast<ast::Access>(A.Value()));
+}
+
+bool match_atomic(const sem::Type* ty, const sem::Type*& T) {
+  if (ty->Is<Any>()) {
+    T = ty;
+    return true;
+  }
+
+  if (auto* a = ty->As<sem::Atomic>()) {
+    T = a->Type();
+    return true;
+  }
+  return false;
+}
+
+const sem::Atomic* build_atomic(MatchState& state, const sem::Type* T) {
+  return state.builder.create<sem::Atomic>(T);
+}
+
+bool match_sampler(const sem::Type* ty) {
+  if (ty->Is<Any>()) {
+    return true;
+  }
+  return ty->Is([](const sem::Sampler* s) {
+    return s->kind() == ast::SamplerKind::kSampler;
+  });
+}
+
+const sem::Sampler* build_sampler(MatchState& state) {
+  return state.builder.create<sem::Sampler>(ast::SamplerKind::kSampler);
+}
+
+bool match_sampler_comparison(const sem::Type* ty) {
+  if (ty->Is<Any>()) {
+    return true;
+  }
+  return ty->Is([](const sem::Sampler* s) {
+    return s->kind() == ast::SamplerKind::kComparisonSampler;
+  });
+}
+
+const sem::Sampler* build_sampler_comparison(MatchState& state) {
+  return state.builder.create<sem::Sampler>(
+      ast::SamplerKind::kComparisonSampler);
+}
+
+bool match_texture(const sem::Type* ty,
+                   ast::TextureDimension dim,
+                   const sem::Type*& T) {
+  if (ty->Is<Any>()) {
+    T = ty;
+    return true;
+  }
+  if (auto* v = ty->As<sem::SampledTexture>()) {
+    if (v->dim() == dim) {
+      T = v->type();
+      return true;
+    }
+  }
+  return false;
+}
+
+#define JOIN(a, b) a##b
+
+#define DECLARE_SAMPLED_TEXTURE(suffix, dim)                  \
+  bool JOIN(match_texture_, suffix)(const sem::Type* ty,      \
+                                    const sem::Type*& T) {    \
+    return match_texture(ty, dim, T);                         \
+  }                                                           \
+  const sem::SampledTexture* JOIN(build_texture_, suffix)(    \
+      MatchState & state, const sem::Type* T) {               \
+    return state.builder.create<sem::SampledTexture>(dim, T); \
+  }
+
+DECLARE_SAMPLED_TEXTURE(1d, ast::TextureDimension::k1d)
+DECLARE_SAMPLED_TEXTURE(2d, ast::TextureDimension::k2d)
+DECLARE_SAMPLED_TEXTURE(2d_array, ast::TextureDimension::k2dArray)
+DECLARE_SAMPLED_TEXTURE(3d, ast::TextureDimension::k3d)
+DECLARE_SAMPLED_TEXTURE(cube, ast::TextureDimension::kCube)
+DECLARE_SAMPLED_TEXTURE(cube_array, ast::TextureDimension::kCubeArray)
+#undef DECLARE_SAMPLED_TEXTURE
+
+bool match_texture_multisampled(const sem::Type* ty,
+                                ast::TextureDimension dim,
+                                const sem::Type*& T) {
+  if (ty->Is<Any>()) {
+    T = ty;
+    return true;
+  }
+  if (auto* v = ty->As<sem::MultisampledTexture>()) {
+    if (v->dim() == dim) {
+      T = v->type();
+      return true;
+    }
+  }
+  return false;
+}
+
+#define DECLARE_MULTISAMPLED_TEXTURE(suffix, dim)                            \
+  bool JOIN(match_texture_multisampled_, suffix)(const sem::Type* ty,        \
+                                                 const sem::Type*& T) {      \
+    return match_texture_multisampled(ty, dim, T);                           \
+  }                                                                          \
+  const sem::MultisampledTexture* JOIN(build_texture_multisampled_, suffix)( \
+      MatchState & state, const sem::Type* T) {                              \
+    return state.builder.create<sem::MultisampledTexture>(dim, T);           \
+  }
+
+DECLARE_MULTISAMPLED_TEXTURE(2d, ast::TextureDimension::k2d)
+#undef DECLARE_MULTISAMPLED_TEXTURE
+
+bool match_texture_depth(const sem::Type* ty, ast::TextureDimension dim) {
+  if (ty->Is<Any>()) {
+    return true;
+  }
+  return ty->Is([&](const sem::DepthTexture* t) { return t->dim() == dim; });
+}
+
+#define DECLARE_DEPTH_TEXTURE(suffix, dim)                       \
+  bool JOIN(match_texture_depth_, suffix)(const sem::Type* ty) { \
+    return match_texture_depth(ty, dim);                         \
+  }                                                              \
+  const sem::DepthTexture* JOIN(build_texture_depth_,            \
+                                suffix)(MatchState & state) {    \
+    return state.builder.create<sem::DepthTexture>(dim);         \
+  }
+
+DECLARE_DEPTH_TEXTURE(2d, ast::TextureDimension::k2d)
+DECLARE_DEPTH_TEXTURE(2d_array, ast::TextureDimension::k2dArray)
+DECLARE_DEPTH_TEXTURE(cube, ast::TextureDimension::kCube)
+DECLARE_DEPTH_TEXTURE(cube_array, ast::TextureDimension::kCubeArray)
+#undef DECLARE_DEPTH_TEXTURE
+
+bool match_texture_depth_multisampled_2d(const sem::Type* ty) {
+  if (ty->Is<Any>()) {
+    return true;
+  }
+  return ty->Is([&](const sem::DepthMultisampledTexture* t) {
+    return t->dim() == ast::TextureDimension::k2d;
+  });
+}
+
+sem::DepthMultisampledTexture* build_texture_depth_multisampled_2d(
+    MatchState& state) {
+  return state.builder.create<sem::DepthMultisampledTexture>(
+      ast::TextureDimension::k2d);
+}
+
+bool match_texture_storage(const sem::Type* ty,
+                           ast::TextureDimension dim,
+                           Number& F,
+                           Number& A) {
+  if (ty->Is<Any>()) {
+    F = Number::any;
+    A = Number::any;
+    return true;
+  }
+  if (auto* v = ty->As<sem::StorageTexture>()) {
+    if (v->dim() == dim) {
+      F = Number(static_cast<uint32_t>(v->texel_format()));
+      A = Number(static_cast<uint32_t>(v->access()));
+      return true;
+    }
+  }
+  return false;
+}
+
+#define DECLARE_STORAGE_TEXTURE(suffix, dim)                                  \
+  bool JOIN(match_texture_storage_, suffix)(const sem::Type* ty, Number& F,   \
+                                            Number& A) {                      \
+    return match_texture_storage(ty, dim, F, A);                              \
+  }                                                                           \
+  const sem::StorageTexture* JOIN(build_texture_storage_, suffix)(            \
+      MatchState & state, Number F, Number A) {                               \
+    auto format = static_cast<TexelFormat>(F.Value());                        \
+    auto access = static_cast<Access>(A.Value());                             \
+    auto* T = sem::StorageTexture::SubtypeFor(format, state.builder.Types()); \
+    return state.builder.create<sem::StorageTexture>(dim, format, access, T); \
+  }
+
+DECLARE_STORAGE_TEXTURE(1d, ast::TextureDimension::k1d)
+DECLARE_STORAGE_TEXTURE(2d, ast::TextureDimension::k2d)
+DECLARE_STORAGE_TEXTURE(2d_array, ast::TextureDimension::k2dArray)
+DECLARE_STORAGE_TEXTURE(3d, ast::TextureDimension::k3d)
+#undef DECLARE_STORAGE_TEXTURE
+
+bool match_texture_external(const sem::Type* ty) {
+  return ty->IsAnyOf<Any, sem::ExternalTexture>();
+}
+
+const sem::ExternalTexture* build_texture_external(MatchState& state) {
+  return state.builder.create<sem::ExternalTexture>();
+}
+
+// Builtin types starting with a _ prefix cannot be declared in WGSL, so they
+// can only be used as return types. Because of this, they must only match Any,
+// which is used as the return type matcher.
+bool match_modf_result(const sem::Type* ty) {
+  return ty->Is<Any>();
+}
+bool match_modf_result_vec(const sem::Type* ty, Number& N) {
+  if (!ty->Is<Any>()) {
+    return false;
+  }
+  N = Number::any;
+  return true;
+}
+bool match_frexp_result(const sem::Type* ty) {
+  return ty->Is<Any>();
+}
+bool match_frexp_result_vec(const sem::Type* ty, Number& N) {
+  if (!ty->Is<Any>()) {
+    return false;
+  }
+  N = Number::any;
+  return true;
+}
+
+struct NameAndType {
+  std::string name;
+  sem::Type* type;
+};
+const sem::Struct* build_struct(
+    MatchState& state,
+    std::string name,
+    std::initializer_list<NameAndType> member_names_and_types) {
+  uint32_t offset = 0;
+  uint32_t max_align = 0;
+  sem::StructMemberList members;
+  for (auto& m : member_names_and_types) {
+    uint32_t align = m.type->Align();
+    uint32_t size = m.type->Size();
+    offset = utils::RoundUp(align, offset);
+    max_align = std::max(max_align, align);
+    members.emplace_back(state.builder.create<sem::StructMember>(
+        /* declaration */ nullptr,
+        /* name */ state.builder.Sym(m.name),
+        /* type */ m.type,
+        /* index */ static_cast<uint32_t>(members.size()),
+        /* offset */ offset,
+        /* align */ align,
+        /* size */ size));
+    offset += size;
+  }
+  uint32_t size_without_padding = offset;
+  uint32_t size_with_padding = utils::RoundUp(max_align, offset);
+  return state.builder.create<sem::Struct>(
+      /* declaration */ nullptr,
+      /* name */ state.builder.Sym(name),
+      /* members */ members,
+      /* align */ max_align,
+      /* size */ size_with_padding,
+      /* size_no_padding */ size_without_padding);
+}
+
+const sem::Struct* build_modf_result(MatchState& state) {
+  auto* f32 = state.builder.create<sem::F32>();
+  return build_struct(state, "__modf_result", {{"fract", f32}, {"whole", f32}});
+}
+const sem::Struct* build_modf_result_vec(MatchState& state, Number& n) {
+  auto* vec_f32 = state.builder.create<sem::Vector>(
+      state.builder.create<sem::F32>(), n.Value());
+  return build_struct(state, "__modf_result_vec" + std::to_string(n.Value()),
+                      {{"fract", vec_f32}, {"whole", vec_f32}});
+}
+const sem::Struct* build_frexp_result(MatchState& state) {
+  auto* f32 = state.builder.create<sem::F32>();
+  auto* i32 = state.builder.create<sem::I32>();
+  return build_struct(state, "__frexp_result", {{"sig", f32}, {"exp", i32}});
+}
+const sem::Struct* build_frexp_result_vec(MatchState& state, Number& n) {
+  auto* vec_f32 = state.builder.create<sem::Vector>(
+      state.builder.create<sem::F32>(), n.Value());
+  auto* vec_i32 = state.builder.create<sem::Vector>(
+      state.builder.create<sem::I32>(), n.Value());
+  return build_struct(state, "__frexp_result_vec" + std::to_string(n.Value()),
+                      {{"sig", vec_f32}, {"exp", vec_i32}});
+}
+
+/// ParameterInfo describes a parameter
+struct ParameterInfo {
+  /// The parameter usage (parameter name in definition file)
+  const ParameterUsage usage;
+
+  /// Pointer to a list of indices that are used to match the parameter type.
+  /// The matcher indices index on Matchers::type and / or Matchers::number.
+  /// These indices are consumed by the matchers themselves.
+  /// The first index is always a TypeMatcher.
+  MatcherIndex const* const matcher_indices;
+};
+
+/// OpenTypeInfo describes an open type
+struct OpenTypeInfo {
+  /// Name of the open type (e.g. 'T')
+  const char* name;
+  /// Optional type matcher constraint.
+  /// Either an index in Matchers::type, or kNoMatcher
+  const MatcherIndex matcher_index;
+};
+
+/// OpenNumberInfo describes an open number
+struct OpenNumberInfo {
+  /// Name of the open number (e.g. 'N')
+  const char* name;
+  /// Optional number matcher constraint.
+  /// Either an index in Matchers::number, or kNoMatcher
+  const MatcherIndex matcher_index;
+};
+
+/// OverloadInfo describes a single function overload
+struct OverloadInfo {
+  /// Total number of parameters for the overload
+  const uint8_t num_parameters;
+  /// Total number of open types for the overload
+  const uint8_t num_open_types;
+  /// Total number of open numbers for the overload
+  const uint8_t num_open_numbers;
+  /// Pointer to the first open type
+  OpenTypeInfo const* const open_types;
+  /// Pointer to the first open number
+  OpenNumberInfo const* const open_numbers;
+  /// Pointer to the first parameter
+  ParameterInfo const* const parameters;
+  /// Pointer to a list of matcher indices that index on Matchers::type and
+  /// Matchers::number, used to build the return type. If the function has no
+  /// return type then this is null
+  MatcherIndex const* const return_matcher_indices;
+  /// The pipeline stages that this overload can be used in
+  PipelineStageSet supported_stages;
+  /// True if the overload is marked as deprecated
+  bool is_deprecated;
+};
+
+/// BuiltinInfo describes a builtin function
+struct BuiltinInfo {
+  /// Number of overloads of the builtin function
+  const uint8_t num_overloads;
+  /// Pointer to the start of the overloads for the function
+  OverloadInfo const* const overloads;
+};
+
+#include "builtin_table.inl"
+
+/// BuiltinPrototype describes a fully matched builtin function, which is
+/// used as a lookup for building unique sem::Builtin instances.
+struct BuiltinPrototype {
+  /// Parameter describes a single parameter
+  struct Parameter {
+    /// Parameter type
+    const sem::Type* const type;
+    /// Parameter usage
+    ParameterUsage const usage = ParameterUsage::kNone;
+  };
+
+  /// Hasher provides a hash function for the BuiltinPrototype
+  struct Hasher {
+    /// @param i the BuiltinPrototype to create a hash for
+    /// @return the hash value
+    inline std::size_t operator()(const BuiltinPrototype& i) const {
+      size_t hash = utils::Hash(i.parameters.size());
+      for (auto& p : i.parameters) {
+        utils::HashCombine(&hash, p.type, p.usage);
+      }
+      return utils::Hash(hash, i.type, i.return_type, i.supported_stages,
+                         i.is_deprecated);
+    }
+  };
+
+  sem::BuiltinType type = sem::BuiltinType::kNone;
+  std::vector<Parameter> parameters;
+  sem::Type const* return_type = nullptr;
+  PipelineStageSet supported_stages;
+  bool is_deprecated = false;
+};
+
+/// Equality operator for BuiltinPrototype
+bool operator==(const BuiltinPrototype& a, const BuiltinPrototype& b) {
+  if (a.type != b.type || a.supported_stages != b.supported_stages ||
+      a.return_type != b.return_type || a.is_deprecated != b.is_deprecated ||
+      a.parameters.size() != b.parameters.size()) {
+    return false;
+  }
+  for (size_t i = 0; i < a.parameters.size(); i++) {
+    auto& pa = a.parameters[i];
+    auto& pb = b.parameters[i];
+    if (pa.type != pb.type || pa.usage != pb.usage) {
+      return false;
+    }
+  }
+  return true;
+}
+
+/// Impl is the private implementation of the BuiltinTable interface.
+class Impl : public BuiltinTable {
+ public:
+  explicit Impl(ProgramBuilder& builder);
+
+  const sem::Builtin* Lookup(sem::BuiltinType builtin_type,
+                             const std::vector<const sem::Type*>& args,
+                             const Source& source) override;
+
+ private:
+  const sem::Builtin* Match(sem::BuiltinType builtin_type,
+                            const OverloadInfo& overload,
+                            const std::vector<const sem::Type*>& args,
+                            int& match_score);
+
+  MatchState Match(ClosedState& closed,
+                   const OverloadInfo& overload,
+                   MatcherIndex const* matcher_indices) const;
+
+  void PrintOverload(std::ostream& ss,
+                     const OverloadInfo& overload,
+                     sem::BuiltinType builtin_type) const;
+
+  ProgramBuilder& builder;
+  Matchers matchers;
+  std::unordered_map<BuiltinPrototype, sem::Builtin*, BuiltinPrototype::Hasher>
+      builtins;
+};
+
+/// @return a string representing a call to a builtin with the given argument
+/// types.
+std::string CallSignature(ProgramBuilder& builder,
+                          sem::BuiltinType builtin_type,
+                          const std::vector<const sem::Type*>& args) {
+  std::stringstream ss;
+  ss << sem::str(builtin_type) << "(";
+  {
+    bool first = true;
+    for (auto* arg : args) {
+      if (!first) {
+        ss << ", ";
+      }
+      first = false;
+      ss << arg->UnwrapRef()->FriendlyName(builder.Symbols());
+    }
+  }
+  ss << ")";
+
+  return ss.str();
+}
+
+std::string OpenTypeMatcher::String(MatchState& state) const {
+  return state.overload.open_types[index_].name;
+}
+
+std::string OpenNumberMatcher::String(MatchState& state) const {
+  return state.overload.open_numbers[index_].name;
+}
+
+Impl::Impl(ProgramBuilder& b) : builder(b) {}
+
+const sem::Builtin* Impl::Lookup(sem::BuiltinType builtin_type,
+                                 const std::vector<const sem::Type*>& args,
+                                 const Source& source) {
+  // Candidate holds information about a mismatched overload that could be what
+  // the user intended to call.
+  struct Candidate {
+    const OverloadInfo* overload;
+    int score;
+  };
+
+  // The list of failed matches that had promise.
+  std::vector<Candidate> candidates;
+
+  auto& builtin = kBuiltins[static_cast<uint32_t>(builtin_type)];
+  for (uint32_t o = 0; o < builtin.num_overloads; o++) {
+    int match_score = 1000;
+    auto& overload = builtin.overloads[o];
+    if (auto* match = Match(builtin_type, overload, args, match_score)) {
+      return match;
+    }
+    if (match_score > 0) {
+      candidates.emplace_back(Candidate{&overload, match_score});
+    }
+  }
+
+  // Sort the candidates with the most promising first
+  std::stable_sort(
+      candidates.begin(), candidates.end(),
+      [](const Candidate& a, const Candidate& b) { return a.score > b.score; });
+
+  // Generate an error message
+  std::stringstream ss;
+  ss << "no matching call to " << CallSignature(builder, builtin_type, args)
+     << std::endl;
+  if (!candidates.empty()) {
+    ss << std::endl;
+    ss << candidates.size() << " candidate function"
+       << (candidates.size() > 1 ? "s:" : ":") << std::endl;
+    for (auto& candidate : candidates) {
+      ss << "  ";
+      PrintOverload(ss, *candidate.overload, builtin_type);
+      ss << std::endl;
+    }
+  }
+  builder.Diagnostics().add_error(diag::System::Resolver, ss.str(), source);
+  return nullptr;
+}
+
+const sem::Builtin* Impl::Match(sem::BuiltinType builtin_type,
+                                const OverloadInfo& overload,
+                                const std::vector<const sem::Type*>& args,
+                                int& match_score) {
+  // Score wait for argument <-> parameter count matches / mismatches
+  constexpr int kScorePerParamArgMismatch = -1;
+  constexpr int kScorePerMatchedParam = 2;
+  constexpr int kScorePerMatchedOpenType = 1;
+  constexpr int kScorePerMatchedOpenNumber = 1;
+
+  auto num_parameters = overload.num_parameters;
+  auto num_arguments = static_cast<decltype(num_parameters)>(args.size());
+
+  bool overload_matched = true;
+
+  if (num_parameters != num_arguments) {
+    match_score +=
+        kScorePerParamArgMismatch * (std::max(num_parameters, num_arguments) -
+                                     std::min(num_parameters, num_arguments));
+    overload_matched = false;
+  }
+
+  ClosedState closed(builder);
+
+  std::vector<BuiltinPrototype::Parameter> parameters;
+
+  auto num_params = std::min(num_parameters, num_arguments);
+  for (uint32_t p = 0; p < num_params; p++) {
+    auto& parameter = overload.parameters[p];
+    auto* indices = parameter.matcher_indices;
+    auto* type = Match(closed, overload, indices).Type(args[p]->UnwrapRef());
+    if (type) {
+      parameters.emplace_back(
+          BuiltinPrototype::Parameter{type, parameter.usage});
+      match_score += kScorePerMatchedParam;
+    } else {
+      overload_matched = false;
+    }
+  }
+
+  if (overload_matched) {
+    // Check all constrained open types matched
+    for (uint32_t ot = 0; ot < overload.num_open_types; ot++) {
+      auto& open_type = overload.open_types[ot];
+      if (open_type.matcher_index != kNoMatcher) {
+        auto* index = &open_type.matcher_index;
+        if (Match(closed, overload, index).Type(closed.Type(ot))) {
+          match_score += kScorePerMatchedOpenType;
+        } else {
+          overload_matched = false;
+        }
+      }
+    }
+  }
+
+  if (overload_matched) {
+    // Check all constrained open numbers matched
+    for (uint32_t on = 0; on < overload.num_open_numbers; on++) {
+      auto& open_number = overload.open_numbers[on];
+      if (open_number.matcher_index != kNoMatcher) {
+        auto* index = &open_number.matcher_index;
+        if (Match(closed, overload, index).Num(closed.Num(on)).IsValid()) {
+          match_score += kScorePerMatchedOpenNumber;
+        } else {
+          overload_matched = false;
+        }
+      }
+    }
+  }
+
+  if (!overload_matched) {
+    return nullptr;
+  }
+
+  // Build the return type
+  const sem::Type* return_type = nullptr;
+  if (auto* indices = overload.return_matcher_indices) {
+    Any any;
+    return_type = Match(closed, overload, indices).Type(&any);
+    if (!return_type) {
+      std::stringstream ss;
+      PrintOverload(ss, overload, builtin_type);
+      TINT_ICE(Resolver, builder.Diagnostics())
+          << "MatchState.Match() returned null for " << ss.str();
+      return nullptr;
+    }
+  } else {
+    return_type = builder.create<sem::Void>();
+  }
+
+  BuiltinPrototype builtin;
+  builtin.type = builtin_type;
+  builtin.return_type = return_type;
+  builtin.parameters = std::move(parameters);
+  builtin.supported_stages = overload.supported_stages;
+  builtin.is_deprecated = overload.is_deprecated;
+
+  // De-duplicate builtins that are identical.
+  return utils::GetOrCreate(builtins, builtin, [&] {
+    std::vector<sem::Parameter*> params;
+    params.reserve(builtin.parameters.size());
+    for (auto& p : builtin.parameters) {
+      params.emplace_back(builder.create<sem::Parameter>(
+          nullptr, static_cast<uint32_t>(params.size()), p.type,
+          ast::StorageClass::kNone, ast::Access::kUndefined, p.usage));
+    }
+    return builder.create<sem::Builtin>(
+        builtin.type, builtin.return_type, std::move(params),
+        builtin.supported_stages, builtin.is_deprecated);
+  });
+}
+
+MatchState Impl::Match(ClosedState& closed,
+                       const OverloadInfo& overload,
+                       MatcherIndex const* matcher_indices) const {
+  return MatchState(builder, closed, matchers, overload, matcher_indices);
+}
+
+void Impl::PrintOverload(std::ostream& ss,
+                         const OverloadInfo& overload,
+                         sem::BuiltinType builtin_type) const {
+  ClosedState closed(builder);
+
+  ss << builtin_type << "(";
+  for (uint32_t p = 0; p < overload.num_parameters; p++) {
+    auto& parameter = overload.parameters[p];
+    if (p > 0) {
+      ss << ", ";
+    }
+    if (parameter.usage != ParameterUsage::kNone) {
+      ss << sem::str(parameter.usage) << ": ";
+    }
+    auto* indices = parameter.matcher_indices;
+    ss << Match(closed, overload, indices).TypeName();
+  }
+  ss << ")";
+  if (overload.return_matcher_indices) {
+    ss << " -> ";
+    auto* indices = overload.return_matcher_indices;
+    ss << Match(closed, overload, indices).TypeName();
+  }
+
+  bool first = true;
+  auto separator = [&] {
+    ss << (first ? "  where: " : ", ");
+    first = false;
+  };
+  for (uint32_t i = 0; i < overload.num_open_types; i++) {
+    auto& open_type = overload.open_types[i];
+    if (open_type.matcher_index != kNoMatcher) {
+      separator();
+      ss << open_type.name;
+      auto* index = &open_type.matcher_index;
+      ss << " is " << Match(closed, overload, index).TypeName();
+    }
+  }
+  for (uint32_t i = 0; i < overload.num_open_numbers; i++) {
+    auto& open_number = overload.open_numbers[i];
+    if (open_number.matcher_index != kNoMatcher) {
+      separator();
+      ss << open_number.name;
+      auto* index = &open_number.matcher_index;
+      ss << " is " << Match(closed, overload, index).NumName();
+    }
+  }
+}
+
+const sem::Type* MatchState::Type(const sem::Type* ty) {
+  MatcherIndex matcher_index = *matcher_indices_++;
+  auto* matcher = matchers.type[matcher_index];
+  return matcher->Match(*this, ty);
+}
+
+Number MatchState::Num(Number number) {
+  MatcherIndex matcher_index = *matcher_indices_++;
+  auto* matcher = matchers.number[matcher_index];
+  return matcher->Match(*this, number);
+}
+
+std::string MatchState::TypeName() {
+  MatcherIndex matcher_index = *matcher_indices_++;
+  auto* matcher = matchers.type[matcher_index];
+  return matcher->String(*this);
+}
+
+std::string MatchState::NumName() {
+  MatcherIndex matcher_index = *matcher_indices_++;
+  auto* matcher = matchers.number[matcher_index];
+  return matcher->String(*this);
+}
+
+}  // namespace
+
+std::unique_ptr<BuiltinTable> BuiltinTable::Create(ProgramBuilder& builder) {
+  return std::make_unique<Impl>(builder);
+}
+
+BuiltinTable::~BuiltinTable() = default;
+
+/// TypeInfo for the Any type declared in the anonymous namespace above
+TINT_INSTANTIATE_TYPEINFO(Any);
+
+}  // namespace tint
diff --git a/src/builtin_table.h b/src/builtin_table.h
new file mode 100644
index 0000000..c681fe7
--- /dev/null
+++ b/src/builtin_table.h
@@ -0,0 +1,52 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_BUILTIN_TABLE_H_
+#define SRC_BUILTIN_TABLE_H_
+
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "src/sem/builtin.h"
+
+namespace tint {
+
+// Forward declarations
+class ProgramBuilder;
+
+/// BuiltinTable is a lookup table of all the WGSL builtin functions
+class BuiltinTable {
+ public:
+  /// @param builder the program builder
+  /// @return a pointer to a newly created BuiltinTable
+  static std::unique_ptr<BuiltinTable> Create(ProgramBuilder& builder);
+
+  /// Destructor
+  virtual ~BuiltinTable();
+
+  /// Lookup looks for the builtin overload with the given signature, raising
+  /// an error diagnostic if the builtin was not found.
+  /// @param type the builtin type
+  /// @param args the argument types passed to the builtin function
+  /// @param source the source of the builtin call
+  /// @return the semantic builtin if found, otherwise nullptr
+  virtual const sem::Builtin* Lookup(sem::BuiltinType type,
+                                     const std::vector<const sem::Type*>& args,
+                                     const Source& source) = 0;
+};
+
+}  // namespace tint
+
+#endif  // SRC_BUILTIN_TABLE_H_
diff --git a/src/builtin_table.inl b/src/builtin_table.inl
new file mode 100644
index 0000000..e6a30f8
--- /dev/null
+++ b/src/builtin_table.inl
@@ -0,0 +1,9445 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   src/builtin_table.inl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+// clang-format off
+
+/// TypeMatcher for 'type bool'
+/// @see src/builtins.def:68:6
+class Bool : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Bool::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_bool(ty)) {
+    return nullptr;
+  }
+  return build_bool(state);
+}
+
+std::string Bool::String(MatchState&) const {
+  return "bool";
+}
+
+/// TypeMatcher for 'type f32'
+/// @see src/builtins.def:69:6
+class F32 : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* F32::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_f32(ty)) {
+    return nullptr;
+  }
+  return build_f32(state);
+}
+
+std::string F32::String(MatchState&) const {
+  return "f32";
+}
+
+/// TypeMatcher for 'type i32'
+/// @see src/builtins.def:70:6
+class I32 : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* I32::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_i32(ty)) {
+    return nullptr;
+  }
+  return build_i32(state);
+}
+
+std::string I32::String(MatchState&) const {
+  return "i32";
+}
+
+/// TypeMatcher for 'type u32'
+/// @see src/builtins.def:71:6
+class U32 : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* U32::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_u32(ty)) {
+    return nullptr;
+  }
+  return build_u32(state);
+}
+
+std::string U32::String(MatchState&) const {
+  return "u32";
+}
+
+/// TypeMatcher for 'type vec2'
+/// @see src/builtins.def:72:6
+class Vec2 : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Vec2::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_vec2(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_vec2(state, T);
+}
+
+std::string Vec2::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "vec2<" + T + ">";
+}
+
+/// TypeMatcher for 'type vec3'
+/// @see src/builtins.def:73:6
+class Vec3 : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Vec3::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_vec3(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_vec3(state, T);
+}
+
+std::string Vec3::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "vec3<" + T + ">";
+}
+
+/// TypeMatcher for 'type vec4'
+/// @see src/builtins.def:74:6
+class Vec4 : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Vec4::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_vec4(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_vec4(state, T);
+}
+
+std::string Vec4::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "vec4<" + T + ">";
+}
+
+/// TypeMatcher for 'type vec'
+/// @see src/builtins.def:75:37
+class Vec : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Vec::Match(MatchState& state, const sem::Type* ty) const {
+  Number N = Number::invalid;
+  const sem::Type* T = nullptr;
+  if (!match_vec(ty, N, T)) {
+    return nullptr;
+  }
+  N = state.Num(N);
+  if (!N.IsValid()) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_vec(state, N, T);
+}
+
+std::string Vec::String(MatchState& state) const {
+  const std::string N = state.NumName();
+  const std::string T = state.TypeName();
+  std::stringstream ss;
+  ss << "vec" << N << "<" << T << ">";
+  return ss.str();
+}
+
+/// TypeMatcher for 'type mat'
+/// @see src/builtins.def:76:37
+class Mat : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Mat::Match(MatchState& state, const sem::Type* ty) const {
+  Number N = Number::invalid;
+  Number M = Number::invalid;
+  const sem::Type* T = nullptr;
+  if (!match_mat(ty, N, M, T)) {
+    return nullptr;
+  }
+  N = state.Num(N);
+  if (!N.IsValid()) {
+    return nullptr;
+  }
+  M = state.Num(M);
+  if (!M.IsValid()) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_mat(state, N, M, T);
+}
+
+std::string Mat::String(MatchState& state) const {
+  const std::string N = state.NumName();
+  const std::string M = state.NumName();
+  const std::string T = state.TypeName();
+  std::stringstream ss;
+  ss << "mat" << N << "x" << M << "<" << T << ">";
+  return ss.str();
+}
+
+/// TypeMatcher for 'type ptr'
+/// @see src/builtins.def:77:6
+class Ptr : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Ptr::Match(MatchState& state, const sem::Type* ty) const {
+  Number S = Number::invalid;
+  const sem::Type* T = nullptr;
+  Number A = Number::invalid;
+  if (!match_ptr(ty, S, T, A)) {
+    return nullptr;
+  }
+  S = state.Num(S);
+  if (!S.IsValid()) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  A = state.Num(A);
+  if (!A.IsValid()) {
+    return nullptr;
+  }
+  return build_ptr(state, S, T, A);
+}
+
+std::string Ptr::String(MatchState& state) const {
+  const std::string S = state.NumName();
+  const std::string T = state.TypeName();
+  const std::string A = state.NumName();
+  return "ptr<" + S + ", " + T + ", " + A + ">";
+}
+
+/// TypeMatcher for 'type atomic'
+/// @see src/builtins.def:78:6
+class Atomic : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Atomic::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_atomic(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_atomic(state, T);
+}
+
+std::string Atomic::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "atomic<" + T + ">";
+}
+
+/// TypeMatcher for 'type array'
+/// @see src/builtins.def:79:6
+class Array : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Array::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_array(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_array(state, T);
+}
+
+std::string Array::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "array<" + T + ">";
+}
+
+/// TypeMatcher for 'type sampler'
+/// @see src/builtins.def:80:6
+class Sampler : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Sampler::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_sampler(ty)) {
+    return nullptr;
+  }
+  return build_sampler(state);
+}
+
+std::string Sampler::String(MatchState&) const {
+  return "sampler";
+}
+
+/// TypeMatcher for 'type sampler_comparison'
+/// @see src/builtins.def:81:6
+class SamplerComparison : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* SamplerComparison::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_sampler_comparison(ty)) {
+    return nullptr;
+  }
+  return build_sampler_comparison(state);
+}
+
+std::string SamplerComparison::String(MatchState&) const {
+  return "sampler_comparison";
+}
+
+/// TypeMatcher for 'type texture_1d'
+/// @see src/builtins.def:82:6
+class Texture1D : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Texture1D::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_texture_1d(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_texture_1d(state, T);
+}
+
+std::string Texture1D::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "texture_1d<" + T + ">";
+}
+
+/// TypeMatcher for 'type texture_2d'
+/// @see src/builtins.def:83:6
+class Texture2D : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Texture2D::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_texture_2d(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_texture_2d(state, T);
+}
+
+std::string Texture2D::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "texture_2d<" + T + ">";
+}
+
+/// TypeMatcher for 'type texture_2d_array'
+/// @see src/builtins.def:84:6
+class Texture2DArray : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Texture2DArray::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_texture_2d_array(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_texture_2d_array(state, T);
+}
+
+std::string Texture2DArray::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "texture_2d_array<" + T + ">";
+}
+
+/// TypeMatcher for 'type texture_3d'
+/// @see src/builtins.def:85:6
+class Texture3D : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Texture3D::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_texture_3d(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_texture_3d(state, T);
+}
+
+std::string Texture3D::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "texture_3d<" + T + ">";
+}
+
+/// TypeMatcher for 'type texture_cube'
+/// @see src/builtins.def:86:6
+class TextureCube : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureCube::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_texture_cube(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_texture_cube(state, T);
+}
+
+std::string TextureCube::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "texture_cube<" + T + ">";
+}
+
+/// TypeMatcher for 'type texture_cube_array'
+/// @see src/builtins.def:87:6
+class TextureCubeArray : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureCubeArray::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_texture_cube_array(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_texture_cube_array(state, T);
+}
+
+std::string TextureCubeArray::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "texture_cube_array<" + T + ">";
+}
+
+/// TypeMatcher for 'type texture_multisampled_2d'
+/// @see src/builtins.def:88:6
+class TextureMultisampled2D : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureMultisampled2D::Match(MatchState& state, const sem::Type* ty) const {
+  const sem::Type* T = nullptr;
+  if (!match_texture_multisampled_2d(ty, T)) {
+    return nullptr;
+  }
+  T = state.Type(T);
+  if (T == nullptr) {
+    return nullptr;
+  }
+  return build_texture_multisampled_2d(state, T);
+}
+
+std::string TextureMultisampled2D::String(MatchState& state) const {
+  const std::string T = state.TypeName();
+  return "texture_multisampled_2d<" + T + ">";
+}
+
+/// TypeMatcher for 'type texture_depth_2d'
+/// @see src/builtins.def:89:6
+class TextureDepth2D : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureDepth2D::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_texture_depth_2d(ty)) {
+    return nullptr;
+  }
+  return build_texture_depth_2d(state);
+}
+
+std::string TextureDepth2D::String(MatchState&) const {
+  return "texture_depth_2d";
+}
+
+/// TypeMatcher for 'type texture_depth_2d_array'
+/// @see src/builtins.def:90:6
+class TextureDepth2DArray : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureDepth2DArray::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_texture_depth_2d_array(ty)) {
+    return nullptr;
+  }
+  return build_texture_depth_2d_array(state);
+}
+
+std::string TextureDepth2DArray::String(MatchState&) const {
+  return "texture_depth_2d_array";
+}
+
+/// TypeMatcher for 'type texture_depth_cube'
+/// @see src/builtins.def:91:6
+class TextureDepthCube : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureDepthCube::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_texture_depth_cube(ty)) {
+    return nullptr;
+  }
+  return build_texture_depth_cube(state);
+}
+
+std::string TextureDepthCube::String(MatchState&) const {
+  return "texture_depth_cube";
+}
+
+/// TypeMatcher for 'type texture_depth_cube_array'
+/// @see src/builtins.def:92:6
+class TextureDepthCubeArray : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureDepthCubeArray::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_texture_depth_cube_array(ty)) {
+    return nullptr;
+  }
+  return build_texture_depth_cube_array(state);
+}
+
+std::string TextureDepthCubeArray::String(MatchState&) const {
+  return "texture_depth_cube_array";
+}
+
+/// TypeMatcher for 'type texture_depth_multisampled_2d'
+/// @see src/builtins.def:93:6
+class TextureDepthMultisampled2D : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureDepthMultisampled2D::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_texture_depth_multisampled_2d(ty)) {
+    return nullptr;
+  }
+  return build_texture_depth_multisampled_2d(state);
+}
+
+std::string TextureDepthMultisampled2D::String(MatchState&) const {
+  return "texture_depth_multisampled_2d";
+}
+
+/// TypeMatcher for 'type texture_storage_1d'
+/// @see src/builtins.def:94:6
+class TextureStorage1D : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureStorage1D::Match(MatchState& state, const sem::Type* ty) const {
+  Number F = Number::invalid;
+  Number A = Number::invalid;
+  if (!match_texture_storage_1d(ty, F, A)) {
+    return nullptr;
+  }
+  F = state.Num(F);
+  if (!F.IsValid()) {
+    return nullptr;
+  }
+  A = state.Num(A);
+  if (!A.IsValid()) {
+    return nullptr;
+  }
+  return build_texture_storage_1d(state, F, A);
+}
+
+std::string TextureStorage1D::String(MatchState& state) const {
+  const std::string F = state.NumName();
+  const std::string A = state.NumName();
+  return "texture_storage_1d<" + F + ", " + A + ">";
+}
+
+/// TypeMatcher for 'type texture_storage_2d'
+/// @see src/builtins.def:95:6
+class TextureStorage2D : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureStorage2D::Match(MatchState& state, const sem::Type* ty) const {
+  Number F = Number::invalid;
+  Number A = Number::invalid;
+  if (!match_texture_storage_2d(ty, F, A)) {
+    return nullptr;
+  }
+  F = state.Num(F);
+  if (!F.IsValid()) {
+    return nullptr;
+  }
+  A = state.Num(A);
+  if (!A.IsValid()) {
+    return nullptr;
+  }
+  return build_texture_storage_2d(state, F, A);
+}
+
+std::string TextureStorage2D::String(MatchState& state) const {
+  const std::string F = state.NumName();
+  const std::string A = state.NumName();
+  return "texture_storage_2d<" + F + ", " + A + ">";
+}
+
+/// TypeMatcher for 'type texture_storage_2d_array'
+/// @see src/builtins.def:96:6
+class TextureStorage2DArray : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureStorage2DArray::Match(MatchState& state, const sem::Type* ty) const {
+  Number F = Number::invalid;
+  Number A = Number::invalid;
+  if (!match_texture_storage_2d_array(ty, F, A)) {
+    return nullptr;
+  }
+  F = state.Num(F);
+  if (!F.IsValid()) {
+    return nullptr;
+  }
+  A = state.Num(A);
+  if (!A.IsValid()) {
+    return nullptr;
+  }
+  return build_texture_storage_2d_array(state, F, A);
+}
+
+std::string TextureStorage2DArray::String(MatchState& state) const {
+  const std::string F = state.NumName();
+  const std::string A = state.NumName();
+  return "texture_storage_2d_array<" + F + ", " + A + ">";
+}
+
+/// TypeMatcher for 'type texture_storage_3d'
+/// @see src/builtins.def:97:6
+class TextureStorage3D : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureStorage3D::Match(MatchState& state, const sem::Type* ty) const {
+  Number F = Number::invalid;
+  Number A = Number::invalid;
+  if (!match_texture_storage_3d(ty, F, A)) {
+    return nullptr;
+  }
+  F = state.Num(F);
+  if (!F.IsValid()) {
+    return nullptr;
+  }
+  A = state.Num(A);
+  if (!A.IsValid()) {
+    return nullptr;
+  }
+  return build_texture_storage_3d(state, F, A);
+}
+
+std::string TextureStorage3D::String(MatchState& state) const {
+  const std::string F = state.NumName();
+  const std::string A = state.NumName();
+  return "texture_storage_3d<" + F + ", " + A + ">";
+}
+
+/// TypeMatcher for 'type texture_external'
+/// @see src/builtins.def:98:6
+class TextureExternal : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* TextureExternal::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_texture_external(ty)) {
+    return nullptr;
+  }
+  return build_texture_external(state);
+}
+
+std::string TextureExternal::String(MatchState&) const {
+  return "texture_external";
+}
+
+/// TypeMatcher for 'type __modf_result'
+/// @see src/builtins.def:100:6
+class ModfResult : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* ModfResult::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_modf_result(ty)) {
+    return nullptr;
+  }
+  return build_modf_result(state);
+}
+
+std::string ModfResult::String(MatchState&) const {
+  return "__modf_result";
+}
+
+/// TypeMatcher for 'type __modf_result_vec'
+/// @see src/builtins.def:101:42
+class ModfResultVec : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* ModfResultVec::Match(MatchState& state, const sem::Type* ty) const {
+  Number N = Number::invalid;
+  if (!match_modf_result_vec(ty, N)) {
+    return nullptr;
+  }
+  N = state.Num(N);
+  if (!N.IsValid()) {
+    return nullptr;
+  }
+  return build_modf_result_vec(state, N);
+}
+
+std::string ModfResultVec::String(MatchState& state) const {
+  const std::string N = state.NumName();
+  std::stringstream ss;
+  ss << "__modf_result_vec" << N;
+  return ss.str();
+}
+
+/// TypeMatcher for 'type __frexp_result'
+/// @see src/builtins.def:102:6
+class FrexpResult : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* FrexpResult::Match(MatchState& state, const sem::Type* ty) const {
+  if (!match_frexp_result(ty)) {
+    return nullptr;
+  }
+  return build_frexp_result(state);
+}
+
+std::string FrexpResult::String(MatchState&) const {
+  return "__frexp_result";
+}
+
+/// TypeMatcher for 'type __frexp_result_vec'
+/// @see src/builtins.def:103:43
+class FrexpResultVec : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* FrexpResultVec::Match(MatchState& state, const sem::Type* ty) const {
+  Number N = Number::invalid;
+  if (!match_frexp_result_vec(ty, N)) {
+    return nullptr;
+  }
+  N = state.Num(N);
+  if (!N.IsValid()) {
+    return nullptr;
+  }
+  return build_frexp_result_vec(state, N);
+}
+
+std::string FrexpResultVec::String(MatchState& state) const {
+  const std::string N = state.NumName();
+  std::stringstream ss;
+  ss << "__frexp_result_vec" << N;
+  return ss.str();
+}
+
+/// TypeMatcher for 'match fiu32'
+/// @see src/builtins.def:111:7
+class Fiu32 : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules, and returns the
+  /// expected, canonicalized type on success.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Fiu32::Match(MatchState& state, const sem::Type* ty) const {
+  if (match_f32(ty)) {
+    return build_f32(state);
+  }
+  if (match_i32(ty)) {
+    return build_i32(state);
+  }
+  if (match_u32(ty)) {
+    return build_u32(state);
+  }
+  return nullptr;
+}
+
+std::string Fiu32::String(MatchState&) const {
+  return "f32, i32 or u32";
+}
+
+/// TypeMatcher for 'match iu32'
+/// @see src/builtins.def:112:7
+class Iu32 : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules, and returns the
+  /// expected, canonicalized type on success.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Iu32::Match(MatchState& state, const sem::Type* ty) const {
+  if (match_i32(ty)) {
+    return build_i32(state);
+  }
+  if (match_u32(ty)) {
+    return build_u32(state);
+  }
+  return nullptr;
+}
+
+std::string Iu32::String(MatchState&) const {
+  return "i32 or u32";
+}
+
+/// TypeMatcher for 'match scalar'
+/// @see src/builtins.def:113:7
+class Scalar : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules, and returns the
+  /// expected, canonicalized type on success.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* Scalar::Match(MatchState& state, const sem::Type* ty) const {
+  if (match_f32(ty)) {
+    return build_f32(state);
+  }
+  if (match_i32(ty)) {
+    return build_i32(state);
+  }
+  if (match_u32(ty)) {
+    return build_u32(state);
+  }
+  if (match_bool(ty)) {
+    return build_bool(state);
+  }
+  return nullptr;
+}
+
+std::string Scalar::String(MatchState&) const {
+  return "f32, i32, u32 or bool";
+}
+
+/// EnumMatcher for 'match f32_texel_format'
+/// @see src/builtins.def:124:7
+class F32TexelFormat : public NumberMatcher {
+ public:
+  /// Checks whether the given number matches the enum matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param number the enum value as a Number
+  /// @return true if the enum value matches the set
+  Number Match(MatchState& state, Number number) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+Number F32TexelFormat::Match(MatchState&, Number number) const {
+  switch (static_cast<TexelFormat>(number.Value())) {
+    case TexelFormat::kRgba8Unorm:
+    case TexelFormat::kRgba8Snorm:
+    case TexelFormat::kRgba16Float:
+    case TexelFormat::kR32Float:
+    case TexelFormat::kRg32Float:
+    case TexelFormat::kRgba32Float:
+      return number;
+    default:
+      return Number::invalid;
+  }
+}
+
+std::string F32TexelFormat::String(MatchState&) const {
+  return "rgba8unorm, rgba8snorm, rgba16float, r32float, rg32float or rgba32float";
+}
+
+/// EnumMatcher for 'match i32_texel_format'
+/// @see src/builtins.def:126:7
+class I32TexelFormat : public NumberMatcher {
+ public:
+  /// Checks whether the given number matches the enum matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param number the enum value as a Number
+  /// @return true if the enum value matches the set
+  Number Match(MatchState& state, Number number) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+Number I32TexelFormat::Match(MatchState&, Number number) const {
+  switch (static_cast<TexelFormat>(number.Value())) {
+    case TexelFormat::kRgba8Sint:
+    case TexelFormat::kRgba16Sint:
+    case TexelFormat::kR32Sint:
+    case TexelFormat::kRg32Sint:
+    case TexelFormat::kRgba32Sint:
+      return number;
+    default:
+      return Number::invalid;
+  }
+}
+
+std::string I32TexelFormat::String(MatchState&) const {
+  return "rgba8sint, rgba16sint, r32sint, rg32sint or rgba32sint";
+}
+
+/// EnumMatcher for 'match u32_texel_format'
+/// @see src/builtins.def:128:7
+class U32TexelFormat : public NumberMatcher {
+ public:
+  /// Checks whether the given number matches the enum matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param number the enum value as a Number
+  /// @return true if the enum value matches the set
+  Number Match(MatchState& state, Number number) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+Number U32TexelFormat::Match(MatchState&, Number number) const {
+  switch (static_cast<TexelFormat>(number.Value())) {
+    case TexelFormat::kRgba8Uint:
+    case TexelFormat::kRgba16Uint:
+    case TexelFormat::kR32Uint:
+    case TexelFormat::kRg32Uint:
+    case TexelFormat::kRgba32Uint:
+      return number;
+    default:
+      return Number::invalid;
+  }
+}
+
+std::string U32TexelFormat::String(MatchState&) const {
+  return "rgba8uint, rgba16uint, r32uint, rg32uint or rgba32uint";
+}
+
+/// EnumMatcher for 'match write_only'
+/// @see src/builtins.def:131:7
+class WriteOnly : public NumberMatcher {
+ public:
+  /// Checks whether the given number matches the enum matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param number the enum value as a Number
+  /// @return true if the enum value matches the set
+  Number Match(MatchState& state, Number number) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+Number WriteOnly::Match(MatchState&, Number number) const {
+  if (number.IsAny() || number.Value() == static_cast<uint32_t>(Access::kWrite)) {
+    return Number(static_cast<uint32_t>(Access::kWrite));
+  }
+  return Number::invalid;
+}
+
+std::string WriteOnly::String(MatchState&) const {
+  return "write";
+}
+
+/// EnumMatcher for 'match function_private_workgroup'
+/// @see src/builtins.def:133:7
+class FunctionPrivateWorkgroup : public NumberMatcher {
+ public:
+  /// Checks whether the given number matches the enum matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param number the enum value as a Number
+  /// @return true if the enum value matches the set
+  Number Match(MatchState& state, Number number) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+Number FunctionPrivateWorkgroup::Match(MatchState&, Number number) const {
+  switch (static_cast<StorageClass>(number.Value())) {
+    case StorageClass::kFunction:
+    case StorageClass::kPrivate:
+    case StorageClass::kWorkgroup:
+      return number;
+    default:
+      return Number::invalid;
+  }
+}
+
+std::string FunctionPrivateWorkgroup::String(MatchState&) const {
+  return "function, private or workgroup";
+}
+
+/// EnumMatcher for 'match workgroup_or_storage'
+/// @see src/builtins.def:134:7
+class WorkgroupOrStorage : public NumberMatcher {
+ public:
+  /// Checks whether the given number matches the enum matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param number the enum value as a Number
+  /// @return true if the enum value matches the set
+  Number Match(MatchState& state, Number number) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+Number WorkgroupOrStorage::Match(MatchState&, Number number) const {
+  switch (static_cast<StorageClass>(number.Value())) {
+    case StorageClass::kWorkgroup:
+    case StorageClass::kStorage:
+      return number;
+    default:
+      return Number::invalid;
+  }
+}
+
+std::string WorkgroupOrStorage::String(MatchState&) const {
+  return "workgroup or storage";
+}
+
+/// EnumMatcher for 'match storage'
+class Storage : public NumberMatcher {
+ public:
+  /// Checks whether the given number matches the enum matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param number the enum value as a Number
+  /// @return true if the enum value matches the set
+  Number Match(MatchState& state, Number number) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+Number Storage::Match(MatchState&, Number number) const {
+  if (number.IsAny() || number.Value() == static_cast<uint32_t>(StorageClass::kStorage)) {
+    return Number(static_cast<uint32_t>(StorageClass::kStorage));
+  }
+  return Number::invalid;
+}
+
+std::string Storage::String(MatchState&) const {
+  return "storage";
+}
+
+/// EnumMatcher for 'match write'
+class Write : public NumberMatcher {
+ public:
+  /// Checks whether the given number matches the enum matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param number the enum value as a Number
+  /// @return true if the enum value matches the set
+  Number Match(MatchState& state, Number number) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+Number Write::Match(MatchState&, Number number) const {
+  if (number.IsAny() || number.Value() == static_cast<uint32_t>(Access::kWrite)) {
+    return Number(static_cast<uint32_t>(Access::kWrite));
+  }
+  return Number::invalid;
+}
+
+std::string Write::String(MatchState&) const {
+  return "write";
+}
+
+/// EnumMatcher for 'match read_write'
+class ReadWrite : public NumberMatcher {
+ public:
+  /// Checks whether the given number matches the enum matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param number the enum value as a Number
+  /// @return true if the enum value matches the set
+  Number Match(MatchState& state, Number number) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+Number ReadWrite::Match(MatchState&, Number number) const {
+  if (number.IsAny() || number.Value() == static_cast<uint32_t>(Access::kReadWrite)) {
+    return Number(static_cast<uint32_t>(Access::kReadWrite));
+  }
+  return Number::invalid;
+}
+
+std::string ReadWrite::String(MatchState&) const {
+  return "read_write";
+}
+
+/// Matchers holds type and number matchers
+class Matchers {
+ private:
+  OpenTypeMatcher open_type_0_{0};
+  OpenNumberMatcher open_number_0_{0};
+  OpenNumberMatcher open_number_1_{1};
+  Bool Bool_;
+  F32 F32_;
+  I32 I32_;
+  U32 U32_;
+  Vec2 Vec2_;
+  Vec3 Vec3_;
+  Vec4 Vec4_;
+  Vec Vec_;
+  Mat Mat_;
+  Ptr Ptr_;
+  Atomic Atomic_;
+  Array Array_;
+  Sampler Sampler_;
+  SamplerComparison SamplerComparison_;
+  Texture1D Texture1D_;
+  Texture2D Texture2D_;
+  Texture2DArray Texture2DArray_;
+  Texture3D Texture3D_;
+  TextureCube TextureCube_;
+  TextureCubeArray TextureCubeArray_;
+  TextureMultisampled2D TextureMultisampled2D_;
+  TextureDepth2D TextureDepth2D_;
+  TextureDepth2DArray TextureDepth2DArray_;
+  TextureDepthCube TextureDepthCube_;
+  TextureDepthCubeArray TextureDepthCubeArray_;
+  TextureDepthMultisampled2D TextureDepthMultisampled2D_;
+  TextureStorage1D TextureStorage1D_;
+  TextureStorage2D TextureStorage2D_;
+  TextureStorage2DArray TextureStorage2DArray_;
+  TextureStorage3D TextureStorage3D_;
+  TextureExternal TextureExternal_;
+  ModfResult ModfResult_;
+  ModfResultVec ModfResultVec_;
+  FrexpResult FrexpResult_;
+  FrexpResultVec FrexpResultVec_;
+  Fiu32 Fiu32_;
+  Iu32 Iu32_;
+  Scalar Scalar_;
+  F32TexelFormat F32TexelFormat_;
+  I32TexelFormat I32TexelFormat_;
+  U32TexelFormat U32TexelFormat_;
+  WriteOnly WriteOnly_;
+  FunctionPrivateWorkgroup FunctionPrivateWorkgroup_;
+  WorkgroupOrStorage WorkgroupOrStorage_;
+  Storage Storage_;
+  Write Write_;
+  ReadWrite ReadWrite_;
+
+ public:
+  /// Constructor
+  Matchers();
+  /// Destructor
+  ~Matchers();
+
+  /// The open-types, types, and type matchers
+  TypeMatcher const* const type[39] = {
+    /* [0] */ &open_type_0_,
+    /* [1] */ &Bool_,
+    /* [2] */ &F32_,
+    /* [3] */ &I32_,
+    /* [4] */ &U32_,
+    /* [5] */ &Vec2_,
+    /* [6] */ &Vec3_,
+    /* [7] */ &Vec4_,
+    /* [8] */ &Vec_,
+    /* [9] */ &Mat_,
+    /* [10] */ &Ptr_,
+    /* [11] */ &Atomic_,
+    /* [12] */ &Array_,
+    /* [13] */ &Sampler_,
+    /* [14] */ &SamplerComparison_,
+    /* [15] */ &Texture1D_,
+    /* [16] */ &Texture2D_,
+    /* [17] */ &Texture2DArray_,
+    /* [18] */ &Texture3D_,
+    /* [19] */ &TextureCube_,
+    /* [20] */ &TextureCubeArray_,
+    /* [21] */ &TextureMultisampled2D_,
+    /* [22] */ &TextureDepth2D_,
+    /* [23] */ &TextureDepth2DArray_,
+    /* [24] */ &TextureDepthCube_,
+    /* [25] */ &TextureDepthCubeArray_,
+    /* [26] */ &TextureDepthMultisampled2D_,
+    /* [27] */ &TextureStorage1D_,
+    /* [28] */ &TextureStorage2D_,
+    /* [29] */ &TextureStorage2DArray_,
+    /* [30] */ &TextureStorage3D_,
+    /* [31] */ &TextureExternal_,
+    /* [32] */ &ModfResult_,
+    /* [33] */ &ModfResultVec_,
+    /* [34] */ &FrexpResult_,
+    /* [35] */ &FrexpResultVec_,
+    /* [36] */ &Fiu32_,
+    /* [37] */ &Iu32_,
+    /* [38] */ &Scalar_,
+  };
+
+  /// The open-numbers, and number matchers
+  NumberMatcher const* const number[11] = {
+    /* [0] */ &open_number_0_,
+    /* [1] */ &open_number_1_,
+    /* [2] */ &F32TexelFormat_,
+    /* [3] */ &I32TexelFormat_,
+    /* [4] */ &U32TexelFormat_,
+    /* [5] */ &WriteOnly_,
+    /* [6] */ &FunctionPrivateWorkgroup_,
+    /* [7] */ &WorkgroupOrStorage_,
+    /* [8] */ &Storage_,
+    /* [9] */ &Write_,
+    /* [10] */ &ReadWrite_,
+  };
+};
+
+Matchers::Matchers() = default;
+Matchers::~Matchers() = default;
+
+constexpr MatcherIndex kMatcherIndices[] = {
+  /* [0] */ 10,
+  /* [1] */ 0,
+  /* [2] */ 11,
+  /* [3] */ 0,
+  /* [4] */ 10,
+  /* [5] */ 8,
+  /* [6] */ 12,
+  /* [7] */ 0,
+  /* [8] */ 0,
+  /* [9] */ 9,
+  /* [10] */ 1,
+  /* [11] */ 0,
+  /* [12] */ 2,
+  /* [13] */ 9,
+  /* [14] */ 0,
+  /* [15] */ 1,
+  /* [16] */ 2,
+  /* [17] */ 9,
+  /* [18] */ 0,
+  /* [19] */ 0,
+  /* [20] */ 2,
+  /* [21] */ 8,
+  /* [22] */ 0,
+  /* [23] */ 2,
+  /* [24] */ 8,
+  /* [25] */ 0,
+  /* [26] */ 1,
+  /* [27] */ 29,
+  /* [28] */ 0,
+  /* [29] */ 1,
+  /* [30] */ 30,
+  /* [31] */ 0,
+  /* [32] */ 1,
+  /* [33] */ 28,
+  /* [34] */ 0,
+  /* [35] */ 1,
+  /* [36] */ 27,
+  /* [37] */ 0,
+  /* [38] */ 1,
+  /* [39] */ 8,
+  /* [40] */ 0,
+  /* [41] */ 0,
+  /* [42] */ 30,
+  /* [43] */ 4,
+  /* [44] */ 9,
+  /* [45] */ 29,
+  /* [46] */ 4,
+  /* [47] */ 9,
+  /* [48] */ 28,
+  /* [49] */ 4,
+  /* [50] */ 9,
+  /* [51] */ 27,
+  /* [52] */ 4,
+  /* [53] */ 9,
+  /* [54] */ 30,
+  /* [55] */ 3,
+  /* [56] */ 9,
+  /* [57] */ 29,
+  /* [58] */ 3,
+  /* [59] */ 9,
+  /* [60] */ 28,
+  /* [61] */ 3,
+  /* [62] */ 9,
+  /* [63] */ 27,
+  /* [64] */ 3,
+  /* [65] */ 9,
+  /* [66] */ 30,
+  /* [67] */ 2,
+  /* [68] */ 9,
+  /* [69] */ 29,
+  /* [70] */ 2,
+  /* [71] */ 9,
+  /* [72] */ 28,
+  /* [73] */ 2,
+  /* [74] */ 9,
+  /* [75] */ 27,
+  /* [76] */ 2,
+  /* [77] */ 9,
+  /* [78] */ 8,
+  /* [79] */ 0,
+  /* [80] */ 3,
+  /* [81] */ 7,
+  /* [82] */ 4,
+  /* [83] */ 18,
+  /* [84] */ 2,
+  /* [85] */ 7,
+  /* [86] */ 2,
+  /* [87] */ 6,
+  /* [88] */ 2,
+  /* [89] */ 5,
+  /* [90] */ 3,
+  /* [91] */ 5,
+  /* [92] */ 2,
+  /* [93] */ 17,
+  /* [94] */ 2,
+  /* [95] */ 6,
+  /* [96] */ 3,
+  /* [97] */ 19,
+  /* [98] */ 2,
+  /* [99] */ 16,
+  /* [100] */ 2,
+  /* [101] */ 20,
+  /* [102] */ 2,
+  /* [103] */ 33,
+  /* [104] */ 0,
+  /* [105] */ 5,
+  /* [106] */ 0,
+  /* [107] */ 35,
+  /* [108] */ 0,
+  /* [109] */ 15,
+  /* [110] */ 0,
+  /* [111] */ 7,
+  /* [112] */ 3,
+  /* [113] */ 7,
+  /* [114] */ 0,
+  /* [115] */ 16,
+  /* [116] */ 0,
+  /* [117] */ 17,
+  /* [118] */ 0,
+  /* [119] */ 18,
+  /* [120] */ 0,
+  /* [121] */ 21,
+  /* [122] */ 0,
+  /* [123] */ 19,
+  /* [124] */ 0,
+  /* [125] */ 20,
+  /* [126] */ 0,
+  /* [127] */ 15,
+  /* [128] */ 2,
+  /* [129] */ 25,
+  /* [130] */ 23,
+  /* [131] */ 22,
+  /* [132] */ 24,
+  /* [133] */ 26,
+  /* [134] */ 13,
+  /* [135] */ 14,
+  /* [136] */ 31,
+  /* [137] */ 32,
+  /* [138] */ 34,
+};
+
+// Assert that the MatcherIndex is big enough to index all the matchers, plus
+// kNoMatcher.
+static_assert(static_cast<int>(sizeof(kMatcherIndices) / sizeof(kMatcherIndices[0])) <
+              static_cast<int>(std::numeric_limits<MatcherIndex>::max() - 1),
+              "MatcherIndex is not large enough to index kMatcherIndices");
+
+constexpr ParameterInfo kParameters[] = {
+  {
+    /* [0] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[93],
+  },
+  {
+    /* [1] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [2] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [3] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [4] */
+    /* usage */ ParameterUsage::kDdx,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [5] */
+    /* usage */ ParameterUsage::kDdy,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [6] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [7] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [8] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [9] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [10] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [11] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [12] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [13] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[101],
+  },
+  {
+    /* [14] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [15] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [16] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [17] */
+    /* usage */ ParameterUsage::kDdx,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [18] */
+    /* usage */ ParameterUsage::kDdy,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [19] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[93],
+  },
+  {
+    /* [20] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [21] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [22] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [23] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [24] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [25] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[93],
+  },
+  {
+    /* [26] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [27] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [28] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [29] */
+    /* usage */ ParameterUsage::kBias,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [30] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [31] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[93],
+  },
+  {
+    /* [32] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [33] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [34] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [35] */
+    /* usage */ ParameterUsage::kDdx,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [36] */
+    /* usage */ ParameterUsage::kDdy,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [37] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[99],
+  },
+  {
+    /* [38] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [39] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [40] */
+    /* usage */ ParameterUsage::kDdx,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [41] */
+    /* usage */ ParameterUsage::kDdy,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [42] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [43] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [44] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [45] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [46] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [47] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [48] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [49] */
+    /* usage */ ParameterUsage::kComponent,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [50] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[117],
+  },
+  {
+    /* [51] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [52] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [53] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [54] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [55] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [56] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [57] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [58] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [59] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [60] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [61] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [62] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [63] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [64] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [65] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [66] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [67] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[83],
+  },
+  {
+    /* [68] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [69] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [70] */
+    /* usage */ ParameterUsage::kDdx,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [71] */
+    /* usage */ ParameterUsage::kDdy,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [72] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[95],
+  },
+  {
+    /* [73] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [74] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [75] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [76] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [77] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [78] */
+    /* usage */ ParameterUsage::kComponent,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [79] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[125],
+  },
+  {
+    /* [80] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [81] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [82] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [83] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [84] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [85] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [86] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [87] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [88] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[129],
+  },
+  {
+    /* [89] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [90] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [91] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [92] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [93] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [94] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [95] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [96] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [97] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [98] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[93],
+  },
+  {
+    /* [99] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [100] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [101] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [102] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [103] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [104] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [105] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [106] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [107] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [108] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [109] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [110] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [111] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [112] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [113] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[101],
+  },
+  {
+    /* [114] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [115] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [116] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [117] */
+    /* usage */ ParameterUsage::kBias,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [118] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [119] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [120] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [121] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [122] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [123] */
+    /* usage */ ParameterUsage::kComponent,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [124] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[117],
+  },
+  {
+    /* [125] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [126] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [127] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [128] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[129],
+  },
+  {
+    /* [129] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [130] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [131] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [132] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [133] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[129],
+  },
+  {
+    /* [134] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [135] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [136] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [137] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [138] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[129],
+  },
+  {
+    /* [139] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [140] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [141] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [142] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [143] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[99],
+  },
+  {
+    /* [144] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [145] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [146] */
+    /* usage */ ParameterUsage::kDdx,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [147] */
+    /* usage */ ParameterUsage::kDdy,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [148] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [149] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [150] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [151] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [152] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [153] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [154] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [155] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [156] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [157] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [158] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [159] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [160] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [161] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [162] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [163] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[101],
+  },
+  {
+    /* [164] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [165] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [166] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [167] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [168] */
+    /* usage */ ParameterUsage::kComponent,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [169] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[115],
+  },
+  {
+    /* [170] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [171] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [172] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [173] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[83],
+  },
+  {
+    /* [174] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [175] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [176] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [177] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[95],
+  },
+  {
+    /* [178] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[83],
+  },
+  {
+    /* [179] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [180] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [181] */
+    /* usage */ ParameterUsage::kBias,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [182] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[95],
+  },
+  {
+    /* [183] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[93],
+  },
+  {
+    /* [184] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [185] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [186] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [187] */
+    /* usage */ ParameterUsage::kBias,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [188] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[93],
+  },
+  {
+    /* [189] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [190] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [191] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [192] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [193] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[99],
+  },
+  {
+    /* [194] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [195] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [196] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [197] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [198] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[83],
+  },
+  {
+    /* [199] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [200] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [201] */
+    /* usage */ ParameterUsage::kDdx,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [202] */
+    /* usage */ ParameterUsage::kDdy,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [203] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[99],
+  },
+  {
+    /* [204] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [205] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [206] */
+    /* usage */ ParameterUsage::kBias,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [207] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [208] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[97],
+  },
+  {
+    /* [209] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [210] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [211] */
+    /* usage */ ParameterUsage::kDdx,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [212] */
+    /* usage */ ParameterUsage::kDdy,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [213] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [214] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [215] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [216] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [217] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [218] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[99],
+  },
+  {
+    /* [219] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [220] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [221] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [222] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[83],
+  },
+  {
+    /* [223] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [224] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [225] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [226] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[97],
+  },
+  {
+    /* [227] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [228] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [229] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [230] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [231] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [232] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [233] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [234] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[99],
+  },
+  {
+    /* [235] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [236] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [237] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [238] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[132],
+  },
+  {
+    /* [239] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [240] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [241] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [242] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[132],
+  },
+  {
+    /* [243] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [244] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [245] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [246] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[93],
+  },
+  {
+    /* [247] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [248] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [249] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [250] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[69],
+  },
+  {
+    /* [251] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [252] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [253] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[85],
+  },
+  {
+    /* [254] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [255] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [256] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [257] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [258] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[129],
+  },
+  {
+    /* [259] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [260] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [261] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [262] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[83],
+  },
+  {
+    /* [263] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [264] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [265] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[95],
+  },
+  {
+    /* [266] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[97],
+  },
+  {
+    /* [267] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [268] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [269] */
+    /* usage */ ParameterUsage::kBias,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [270] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [271] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [272] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [273] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [274] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [275] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [276] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [277] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [278] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[132],
+  },
+  {
+    /* [279] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [280] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [281] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [282] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[57],
+  },
+  {
+    /* [283] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [284] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [285] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[111],
+  },
+  {
+    /* [286] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [287] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [288] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [289] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [290] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[45],
+  },
+  {
+    /* [291] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [292] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [293] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[81],
+  },
+  {
+    /* [294] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [295] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [296] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [297] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [298] */
+    /* usage */ ParameterUsage::kComponent,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [299] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[123],
+  },
+  {
+    /* [300] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [301] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [302] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[117],
+  },
+  {
+    /* [303] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [304] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [305] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [306] */
+    /* usage */ ParameterUsage::kComponent,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [307] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[115],
+  },
+  {
+    /* [308] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [309] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [310] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[101],
+  },
+  {
+    /* [311] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [312] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [313] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [314] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[83],
+  },
+  {
+    /* [315] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [316] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [317] */
+    /* usage */ ParameterUsage::kBias,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [318] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [319] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [320] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [321] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [322] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[132],
+  },
+  {
+    /* [323] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[135],
+  },
+  {
+    /* [324] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [325] */
+    /* usage */ ParameterUsage::kDepthRef,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [326] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[99],
+  },
+  {
+    /* [327] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [328] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [329] */
+    /* usage */ ParameterUsage::kBias,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [330] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[129],
+  },
+  {
+    /* [331] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [332] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [333] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [334] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [335] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [336] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [337] */
+    /* usage */ ParameterUsage::kOffset,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [338] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [339] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [340] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [341] */
+    /* usage */ ParameterUsage::kArrayIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [342] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[54],
+  },
+  {
+    /* [343] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[95],
+  },
+  {
+    /* [344] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[111],
+  },
+  {
+    /* [345] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[132],
+  },
+  {
+    /* [346] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [347] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [348] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [349] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [350] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [351] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [352] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [353] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [354] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[97],
+  },
+  {
+    /* [355] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [356] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [357] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [358] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [359] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [360] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[83],
+  },
+  {
+    /* [361] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [362] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [363] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [364] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [365] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [366] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [367] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [368] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [369] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [370] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [371] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [372] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[99],
+  },
+  {
+    /* [373] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [374] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [375] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[127],
+  },
+  {
+    /* [376] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [377] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [378] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[136],
+  },
+  {
+    /* [379] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [380] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [381] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [382] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [383] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [384] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [385] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [386] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [387] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [388] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [389] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [390] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[75],
+  },
+  {
+    /* [391] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [392] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[85],
+  },
+  {
+    /* [393] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[72],
+  },
+  {
+    /* [394] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [395] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[85],
+  },
+  {
+    /* [396] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[66],
+  },
+  {
+    /* [397] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[95],
+  },
+  {
+    /* [398] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[85],
+  },
+  {
+    /* [399] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [400] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [401] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [402] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [403] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [404] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [405] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[132],
+  },
+  {
+    /* [406] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [407] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [408] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[63],
+  },
+  {
+    /* [409] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [410] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[111],
+  },
+  {
+    /* [411] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[60],
+  },
+  {
+    /* [412] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [413] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[111],
+  },
+  {
+    /* [414] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[51],
+  },
+  {
+    /* [415] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [416] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[81],
+  },
+  {
+    /* [417] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [418] */
+    /* usage */ ParameterUsage::kSampler,
+    /* matcher indices */ &kMatcherIndices[134],
+  },
+  {
+    /* [419] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [420] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[48],
+  },
+  {
+    /* [421] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [422] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[81],
+  },
+  {
+    /* [423] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[42],
+  },
+  {
+    /* [424] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[95],
+  },
+  {
+    /* [425] */
+    /* usage */ ParameterUsage::kValue,
+    /* matcher indices */ &kMatcherIndices[81],
+  },
+  {
+    /* [426] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[109],
+  },
+  {
+    /* [427] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [428] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [429] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [430] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [431] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [432] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[115],
+  },
+  {
+    /* [433] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [434] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [435] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[119],
+  },
+  {
+    /* [436] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[95],
+  },
+  {
+    /* [437] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [438] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[121],
+  },
+  {
+    /* [439] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [440] */
+    /* usage */ ParameterUsage::kSampleIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [441] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [442] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [443] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [444] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [445] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [446] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[10],
+  },
+  {
+    /* [447] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [448] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [449] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[10],
+  },
+  {
+    /* [450] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[133],
+  },
+  {
+    /* [451] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [452] */
+    /* usage */ ParameterUsage::kSampleIndex,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [453] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [454] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [455] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [456] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [457] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [458] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[24],
+  },
+  {
+    /* [459] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [460] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [461] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [462] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [463] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [464] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [465] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [466] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [467] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [468] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [469] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [470] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [471] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [472] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [473] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [474] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [475] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [476] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [477] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [478] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [479] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [480] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [481] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[136],
+  },
+  {
+    /* [482] */
+    /* usage */ ParameterUsage::kCoords,
+    /* matcher indices */ &kMatcherIndices[89],
+  },
+  {
+    /* [483] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [484] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [485] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [486] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [487] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [488] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[87],
+  },
+  {
+    /* [489] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [490] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [491] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [492] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [493] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [494] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [495] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [496] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [497] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [498] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[78],
+  },
+  {
+    /* [499] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [500] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [501] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [502] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [503] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[129],
+  },
+  {
+    /* [504] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [505] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [506] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [507] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [508] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [509] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[109],
+  },
+  {
+    /* [510] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [511] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [512] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [513] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[115],
+  },
+  {
+    /* [514] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [515] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [516] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [517] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[117],
+  },
+  {
+    /* [518] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [519] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [520] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [521] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[119],
+  },
+  {
+    /* [522] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [523] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [524] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [525] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[123],
+  },
+  {
+    /* [526] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [527] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[132],
+  },
+  {
+    /* [528] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [529] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[125],
+  },
+  {
+    /* [530] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [531] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [532] */
+    /* usage */ ParameterUsage::kLevel,
+    /* matcher indices */ &kMatcherIndices[55],
+  },
+  {
+    /* [533] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[43],
+  },
+  {
+    /* [534] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [535] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [536] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[121],
+  },
+  {
+    /* [537] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[132],
+  },
+  {
+    /* [538] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[125],
+  },
+  {
+    /* [539] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[129],
+  },
+  {
+    /* [540] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [541] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[133],
+  },
+  {
+    /* [542] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[36],
+  },
+  {
+    /* [543] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[33],
+  },
+  {
+    /* [544] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[27],
+  },
+  {
+    /* [545] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[30],
+  },
+  {
+    /* [546] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[136],
+  },
+  {
+    /* [547] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [548] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [549] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [550] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [551] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [552] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [553] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[119],
+  },
+  {
+    /* [554] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[117],
+  },
+  {
+    /* [555] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[85],
+  },
+  {
+    /* [556] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[85],
+  },
+  {
+    /* [557] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [558] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [559] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[91],
+  },
+  {
+    /* [560] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [561] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [562] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[115],
+  },
+  {
+    /* [563] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[123],
+  },
+  {
+    /* [564] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[109],
+  },
+  {
+    /* [565] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[117],
+  },
+  {
+    /* [566] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[125],
+  },
+  {
+    /* [567] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [568] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[129],
+  },
+  {
+    /* [569] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[27],
+  },
+  {
+    /* [570] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[109],
+  },
+  {
+    /* [571] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[115],
+  },
+  {
+    /* [572] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[117],
+  },
+  {
+    /* [573] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[119],
+  },
+  {
+    /* [574] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[123],
+  },
+  {
+    /* [575] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[125],
+  },
+  {
+    /* [576] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[131],
+  },
+  {
+    /* [577] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[130],
+  },
+  {
+    /* [578] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[132],
+  },
+  {
+    /* [579] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[129],
+  },
+  {
+    /* [580] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[121],
+  },
+  {
+    /* [581] */
+    /* usage */ ParameterUsage::kTexture,
+    /* matcher indices */ &kMatcherIndices[133],
+  },
+  {
+    /* [582] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[43],
+  },
+  {
+    /* [583] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[43],
+  },
+  {
+    /* [584] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [585] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [586] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [587] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [588] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [589] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [590] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [591] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[43],
+  },
+  {
+    /* [592] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[43],
+  },
+  {
+    /* [593] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [594] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [595] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [596] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [597] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [598] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [599] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [600] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [601] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [602] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [603] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [604] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [605] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [606] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [607] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [608] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [609] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [610] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [611] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [612] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [613] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [614] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [615] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [616] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [617] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [618] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [619] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [620] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [621] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [622] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [623] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [624] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [625] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [626] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [627] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [628] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [629] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [630] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [631] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [632] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [633] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[13],
+  },
+  {
+    /* [634] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[17],
+  },
+  {
+    /* [635] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [636] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [637] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [638] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [639] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+  {
+    /* [640] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [641] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [642] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [643] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [644] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [645] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [646] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [647] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [648] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [649] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [650] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [651] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [652] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[4],
+  },
+  {
+    /* [653] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[24],
+  },
+  {
+    /* [654] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[10],
+  },
+  {
+    /* [655] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[24],
+  },
+  {
+    /* [656] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[10],
+  },
+  {
+    /* [657] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [658] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [659] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[39],
+  },
+  {
+    /* [660] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [661] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[0],
+  },
+  {
+    /* [662] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [663] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [664] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [665] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [666] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [667] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[12],
+  },
+  {
+    /* [668] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[21],
+  },
+  {
+    /* [669] */
+    /* usage */ ParameterUsage::kNone,
+    /* matcher indices */ &kMatcherIndices[1],
+  },
+};
+
+constexpr OpenTypeInfo kOpenTypes[] = {
+  {
+    /* [0] */
+    /* name */ "T",
+    /* matcher index */ 36,
+  },
+  {
+    /* [1] */
+    /* name */ "T",
+    /* matcher index */ 37,
+  },
+  {
+    /* [2] */
+    /* name */ "T",
+    /* matcher index */ kNoMatcher,
+  },
+  {
+    /* [3] */
+    /* name */ "T",
+    /* matcher index */ 38,
+  },
+};
+
+constexpr OpenNumberInfo kOpenNumbers[] = {
+  {
+    /* [0] */
+    /* name */ "F",
+    /* matcher index */ kNoMatcher,
+  },
+  {
+    /* [1] */
+    /* name */ "A",
+    /* matcher index */ 5,
+  },
+  {
+    /* [2] */
+    /* name */ "M",
+    /* matcher index */ kNoMatcher,
+  },
+  {
+    /* [3] */
+    /* name */ "N",
+    /* matcher index */ kNoMatcher,
+  },
+  {
+    /* [4] */
+    /* name */ "A",
+    /* matcher index */ kNoMatcher,
+  },
+  {
+    /* [5] */
+    /* name */ "S",
+    /* matcher index */ 7,
+  },
+};
+
+constexpr OverloadInfo kOverloads[] = {
+  {
+    /* [0] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[564],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [1] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[509],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [2] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[562],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [3] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[513],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [4] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[554],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [5] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[517],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [6] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[553],
+    /* return matcher indices */ &kMatcherIndices[95],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [7] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[521],
+    /* return matcher indices */ &kMatcherIndices[95],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [8] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[563],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [9] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[525],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [10] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[538],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [11] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[529],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [12] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[536],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [13] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[534],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [14] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[459],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [15] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[535],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [16] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[531],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [17] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[537],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [18] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[527],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [19] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[539],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [20] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[503],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [21] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[541],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [22] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 2,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[0],
+    /* parameters */ &kParameters[542],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [23] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 2,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[0],
+    /* parameters */ &kParameters[543],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [24] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 2,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[0],
+    /* parameters */ &kParameters[544],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [25] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 2,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[0],
+    /* parameters */ &kParameters[545],
+    /* return matcher indices */ &kMatcherIndices[95],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [26] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[546],
+    /* return matcher indices */ &kMatcherIndices[89],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [27] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[375],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [28] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[372],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [29] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[234],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [30] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[246],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [31] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[98],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [32] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[360],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [33] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[262],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [34] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[354],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [35] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[310],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [36] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[348],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [37] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[334],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [38] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[338],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [39] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[158],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [40] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[345],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [41] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[330],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [42] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[218],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [43] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[193],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [44] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[188],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [45] */
+    /* num parameters */ 6,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[19],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [46] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[222],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [47] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[173],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [48] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[226],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [49] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[163],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [50] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[230],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [51] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[153],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [52] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[148],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [53] */
+    /* num parameters */ 6,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[7],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [54] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[238],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [55] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[133],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [56] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[378],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [57] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[390],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [58] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[393],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [59] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[250],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [60] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[396],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [61] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[408],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [62] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[411],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [63] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[282],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [64] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[342],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [65] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[414],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [66] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[420],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [67] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[290],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [68] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[423],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [69] */
+    /* num parameters */ 4,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[306],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [70] */
+    /* num parameters */ 5,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[168],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [71] */
+    /* num parameters */ 5,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[123],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [72] */
+    /* num parameters */ 6,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[49],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [73] */
+    /* num parameters */ 4,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[298],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [74] */
+    /* num parameters */ 5,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[78],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [75] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[417],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [76] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[286],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [77] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[274],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [78] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[93],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [79] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[405],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [80] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[258],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [81] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[570],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [82] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[571],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [83] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[572],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [84] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[573],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [85] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[574],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [86] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[575],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [87] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[576],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [88] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[577],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [89] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[578],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [90] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[579],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [91] */
+    /* num parameters */ 3,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[426],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [92] */
+    /* num parameters */ 3,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[432],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [93] */
+    /* num parameters */ 4,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[302],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [94] */
+    /* num parameters */ 3,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[435],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [95] */
+    /* num parameters */ 3,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[438],
+    /* return matcher indices */ &kMatcherIndices[113],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [96] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[441],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [97] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[318],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [98] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[450],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [99] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[481],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [100] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[326],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [101] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[203],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [102] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[183],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [103] */
+    /* num parameters */ 6,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[25],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [104] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[314],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [105] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[178],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [106] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[266],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [107] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[113],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [108] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[143],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [109] */
+    /* num parameters */ 6,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[37],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [110] */
+    /* num parameters */ 6,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[31],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [111] */
+    /* num parameters */ 7,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[0],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [112] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[198],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [113] */
+    /* num parameters */ 6,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[67],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [114] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[208],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [115] */
+    /* num parameters */ 6,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[13],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [116] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[254],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [117] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[108],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [118] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[118],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [119] */
+    /* num parameters */ 6,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[43],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [120] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[322],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [121] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[128],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [122] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[294],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [123] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[83],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [124] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[73],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [125] */
+    /* num parameters */ 6,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[61],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [126] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[278],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [127] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[88],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [128] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[270],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [129] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[213],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [130] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[103],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [131] */
+    /* num parameters */ 6,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[55],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [132] */
+    /* num parameters */ 4,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[242],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [133] */
+    /* num parameters */ 5,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[138],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [134] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[565],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [135] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[566],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [136] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[567],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [137] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[568],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [138] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 2,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[0],
+    /* parameters */ &kParameters[569],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [139] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[381],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [140] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[384],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [141] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[387],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [142] */
+    /* num parameters */ 3,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[3],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[444],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [143] */
+    /* num parameters */ 3,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[3],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[447],
+    /* return matcher indices */ &kMatcherIndices[39],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [144] */
+    /* num parameters */ 3,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[3],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[456],
+    /* return matcher indices */ &kMatcherIndices[39],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [145] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[602],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [146] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[601],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [147] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[489],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [148] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[491],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [149] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[636],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [150] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[635],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [151] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[630],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [152] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[629],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [153] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[628],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [154] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[627],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [155] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[626],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [156] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[625],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [157] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[624],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [158] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[623],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [159] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[622],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [160] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[621],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [161] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[620],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [162] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[619],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [163] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[618],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [164] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[617],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [165] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[616],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [166] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[615],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [167] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[639],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [168] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[638],
+    /* return matcher indices */ &kMatcherIndices[39],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [169] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[614],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [170] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[613],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [171] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[363],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [172] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[357],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [173] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[612],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [174] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[611],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [175] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[610],
+    /* return matcher indices */ &kMatcherIndices[138],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [176] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[609],
+    /* return matcher indices */ &kMatcherIndices[107],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [177] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[608],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [178] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[607],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [179] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[606],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [180] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[605],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [181] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[604],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [182] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[603],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [183] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[641],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [184] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[640],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [185] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[600],
+    /* return matcher indices */ &kMatcherIndices[10],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ true,
+  },
+  {
+    /* [186] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[599],
+    /* return matcher indices */ &kMatcherIndices[24],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ true,
+  },
+  {
+    /* [187] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[598],
+    /* return matcher indices */ &kMatcherIndices[10],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ true,
+  },
+  {
+    /* [188] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[597],
+    /* return matcher indices */ &kMatcherIndices[24],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ true,
+  },
+  {
+    /* [189] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[596],
+    /* return matcher indices */ &kMatcherIndices[10],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ true,
+  },
+  {
+    /* [190] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[595],
+    /* return matcher indices */ &kMatcherIndices[24],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ true,
+  },
+  {
+    /* [191] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[594],
+    /* return matcher indices */ &kMatcherIndices[10],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ true,
+  },
+  {
+    /* [192] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[593],
+    /* return matcher indices */ &kMatcherIndices[24],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ true,
+  },
+  {
+    /* [193] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[495],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [194] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[497],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [195] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[590],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [196] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[589],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [197] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[588],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [198] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[587],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [199] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[586],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [200] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[585],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [201] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[511],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [202] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[499],
+    /* return matcher indices */ &kMatcherIndices[39],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [203] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[501],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [204] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[507],
+    /* return matcher indices */ &kMatcherIndices[39],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [205] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[643],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [206] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[642],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [207] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[584],
+    /* return matcher indices */ &kMatcherIndices[137],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [208] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[561],
+    /* return matcher indices */ &kMatcherIndices[103],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [209] */
+    /* num parameters */ 3,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[402],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [210] */
+    /* num parameters */ 3,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[399],
+    /* return matcher indices */ &kMatcherIndices[39],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [211] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[645],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [212] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[644],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [213] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[483],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [214] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[485],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [215] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[580],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [216] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[581],
+    /* return matcher indices */ &kMatcherIndices[55],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [217] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[660],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [218] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[647],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [219] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[649],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [220] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[648],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [221] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[515],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [222] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[519],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [223] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[552],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [224] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[551],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [225] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[651],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [226] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[650],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [227] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[654],
+    /* return matcher indices */ &kMatcherIndices[10],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [228] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[653],
+    /* return matcher indices */ &kMatcherIndices[10],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [229] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[549],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [230] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[548],
+    /* return matcher indices */ &kMatcherIndices[39],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [231] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[547],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [232] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[550],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [233] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[656],
+    /* return matcher indices */ &kMatcherIndices[10],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [234] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[655],
+    /* return matcher indices */ &kMatcherIndices[10],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [235] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[664],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [236] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[665],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [237] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[540],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [238] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[668],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [239] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[667],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [240] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[666],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [241] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[658],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [242] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[657],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [243] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[663],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [244] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[662],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [245] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[475],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [246] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[477],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [247] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[632],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [248] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[631],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [249] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[646],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [250] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[637],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [251] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[369],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [252] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[453],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [253] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[669],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [254] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[659],
+    /* return matcher indices */ &kMatcherIndices[39],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [255] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[560],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [256] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[592],
+    /* return matcher indices */ &kMatcherIndices[91],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [257] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[591],
+    /* return matcher indices */ &kMatcherIndices[91],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [258] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[583],
+    /* return matcher indices */ &kMatcherIndices[91],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [259] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[582],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [260] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[533],
+    /* return matcher indices */ &kMatcherIndices[85],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [261] */
+    /* num parameters */ 0,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[670],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [262] */
+    /* num parameters */ 3,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[351],
+    /* return matcher indices */ &kMatcherIndices[105],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [263] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[556],
+    /* return matcher indices */ &kMatcherIndices[43],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [264] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[429],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [265] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[523],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [266] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[555],
+    /* return matcher indices */ &kMatcherIndices[43],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [267] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[557],
+    /* return matcher indices */ &kMatcherIndices[43],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [268] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[558],
+    /* return matcher indices */ &kMatcherIndices[43],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [269] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[559],
+    /* return matcher indices */ &kMatcherIndices[43],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [270] */
+    /* num parameters */ 0,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[670],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [271] */
+    /* num parameters */ 3,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[366],
+    /* return matcher indices */ &kMatcherIndices[21],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [272] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[0],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[493],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [273] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[3],
+    /* parameters */ &kParameters[634],
+    /* return matcher indices */ &kMatcherIndices[12],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [274] */
+    /* num parameters */ 2,
+    /* num open types */ 0,
+    /* num open numbers */ 0,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[6],
+    /* parameters */ &kParameters[487],
+    /* return matcher indices */ &kMatcherIndices[87],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [275] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[2],
+    /* open numbers */ &kOpenNumbers[4],
+    /* parameters */ &kParameters[652],
+    /* return matcher indices */ &kMatcherIndices[43],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [276] */
+    /* num parameters */ 1,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[661],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [277] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[473],
+    /* return matcher indices */ nullptr,
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [278] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[471],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [279] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[469],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [280] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[467],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [281] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[465],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [282] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[463],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [283] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[461],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [284] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[505],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [285] */
+    /* num parameters */ 2,
+    /* num open types */ 1,
+    /* num open numbers */ 1,
+    /* open types */ &kOpenTypes[1],
+    /* open numbers */ &kOpenNumbers[5],
+    /* parameters */ &kParameters[479],
+    /* return matcher indices */ &kMatcherIndices[1],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+  {
+    /* [286] */
+    /* num parameters */ 1,
+    /* num open types */ 0,
+    /* num open numbers */ 2,
+    /* open types */ &kOpenTypes[4],
+    /* open numbers */ &kOpenNumbers[2],
+    /* parameters */ &kParameters[633],
+    /* return matcher indices */ &kMatcherIndices[9],
+    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
+    /* is_deprecated */ false,
+  },
+};
+
+constexpr BuiltinInfo kBuiltins[] = {
+  {
+    /* [0] */
+    /* fn abs<T : fiu32>(T) -> T */
+    /* fn abs<N : num, T : fiu32>(vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[253],
+  },
+  {
+    /* [1] */
+    /* fn acos(f32) -> f32 */
+    /* fn acos<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[241],
+  },
+  {
+    /* [2] */
+    /* fn all(bool) -> bool */
+    /* fn all<N : num>(vec<N, bool>) -> bool */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[233],
+  },
+  {
+    /* [3] */
+    /* fn any(bool) -> bool */
+    /* fn any<N : num>(vec<N, bool>) -> bool */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[227],
+  },
+  {
+    /* [4] */
+    /* fn arrayLength<T, A : access>(ptr<storage, array<T>, A>) -> u32 */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[275],
+  },
+  {
+    /* [5] */
+    /* fn asin(f32) -> f32 */
+    /* fn asin<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[225],
+  },
+  {
+    /* [6] */
+    /* fn atan(f32) -> f32 */
+    /* fn atan<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[219],
+  },
+  {
+    /* [7] */
+    /* fn atan2(f32, f32) -> f32 */
+    /* fn atan2<N : num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[213],
+  },
+  {
+    /* [8] */
+    /* fn ceil(f32) -> f32 */
+    /* fn ceil<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[211],
+  },
+  {
+    /* [9] */
+    /* fn clamp<T : fiu32>(T, T, T) -> T */
+    /* fn clamp<N : num, T : fiu32>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[209],
+  },
+  {
+    /* [10] */
+    /* fn cos(f32) -> f32 */
+    /* fn cos<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[205],
+  },
+  {
+    /* [11] */
+    /* fn cosh(f32) -> f32 */
+    /* fn cosh<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[183],
+  },
+  {
+    /* [12] */
+    /* fn countOneBits<T : iu32>(T) -> T */
+    /* fn countOneBits<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[167],
+  },
+  {
+    /* [13] */
+    /* fn cross(vec3<f32>, vec3<f32>) -> vec3<f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[274],
+  },
+  {
+    /* [14] */
+    /* fn degrees(f32) -> f32 */
+    /* fn degrees<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[149],
+  },
+  {
+    /* [15] */
+    /* fn determinant<N : num>(mat<N, N, f32>) -> f32 */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[273],
+  },
+  {
+    /* [16] */
+    /* fn distance(f32, f32) -> f32 */
+    /* fn distance<N : num>(vec<N, f32>, vec<N, f32>) -> f32 */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[147],
+  },
+  {
+    /* [17] */
+    /* fn dot<N : num, T : fiu32>(vec<N, T>, vec<N, T>) -> T */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[272],
+  },
+  {
+    /* [18] */
+    /* fn dpdx(f32) -> f32 */
+    /* fn dpdx<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[151],
+  },
+  {
+    /* [19] */
+    /* fn dpdxCoarse(f32) -> f32 */
+    /* fn dpdxCoarse<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[153],
+  },
+  {
+    /* [20] */
+    /* fn dpdxFine(f32) -> f32 */
+    /* fn dpdxFine<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[155],
+  },
+  {
+    /* [21] */
+    /* fn dpdy(f32) -> f32 */
+    /* fn dpdy<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[157],
+  },
+  {
+    /* [22] */
+    /* fn dpdyCoarse(f32) -> f32 */
+    /* fn dpdyCoarse<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[159],
+  },
+  {
+    /* [23] */
+    /* fn dpdyFine(f32) -> f32 */
+    /* fn dpdyFine<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[161],
+  },
+  {
+    /* [24] */
+    /* fn exp(f32) -> f32 */
+    /* fn exp<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[163],
+  },
+  {
+    /* [25] */
+    /* fn exp2(f32) -> f32 */
+    /* fn exp2<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[165],
+  },
+  {
+    /* [26] */
+    /* fn faceForward<N : num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[271],
+  },
+  {
+    /* [27] */
+    /* fn floor(f32) -> f32 */
+    /* fn floor<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[169],
+  },
+  {
+    /* [28] */
+    /* fn fma(f32, f32, f32) -> f32 */
+    /* fn fma<N : num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[171],
+  },
+  {
+    /* [29] */
+    /* fn fract(f32) -> f32 */
+    /* fn fract<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[173],
+  },
+  {
+    /* [30] */
+    /* fn frexp(f32) -> __frexp_result */
+    /* fn frexp<N : num>(vec<N, f32>) -> __frexp_result_vec<N> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[175],
+  },
+  {
+    /* [31] */
+    /* fn fwidth(f32) -> f32 */
+    /* fn fwidth<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[177],
+  },
+  {
+    /* [32] */
+    /* fn fwidthCoarse(f32) -> f32 */
+    /* fn fwidthCoarse<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[179],
+  },
+  {
+    /* [33] */
+    /* fn fwidthFine(f32) -> f32 */
+    /* fn fwidthFine<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[181],
+  },
+  {
+    /* [34] */
+    /* fn inverseSqrt(f32) -> f32 */
+    /* fn inverseSqrt<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[145],
+  },
+  {
+    /* [35] */
+    /* fn isFinite(f32) -> bool */
+    /* fn isFinite<N : num>(vec<N, f32>) -> vec<N, bool> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[185],
+  },
+  {
+    /* [36] */
+    /* fn isInf(f32) -> bool */
+    /* fn isInf<N : num>(vec<N, f32>) -> vec<N, bool> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[187],
+  },
+  {
+    /* [37] */
+    /* fn isNan(f32) -> bool */
+    /* fn isNan<N : num>(vec<N, f32>) -> vec<N, bool> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[189],
+  },
+  {
+    /* [38] */
+    /* fn isNormal(f32) -> bool */
+    /* fn isNormal<N : num>(vec<N, f32>) -> vec<N, bool> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[191],
+  },
+  {
+    /* [39] */
+    /* fn ldexp(f32, i32) -> f32 */
+    /* fn ldexp<N : num>(vec<N, f32>, vec<N, i32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[193],
+  },
+  {
+    /* [40] */
+    /* fn length(f32) -> f32 */
+    /* fn length<N : num>(vec<N, f32>) -> f32 */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[195],
+  },
+  {
+    /* [41] */
+    /* fn log(f32) -> f32 */
+    /* fn log<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[197],
+  },
+  {
+    /* [42] */
+    /* fn log2(f32) -> f32 */
+    /* fn log2<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[199],
+  },
+  {
+    /* [43] */
+    /* fn max<T : fiu32>(T, T) -> T */
+    /* fn max<N : num, T : fiu32>(vec<N, T>, vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[201],
+  },
+  {
+    /* [44] */
+    /* fn min<T : fiu32>(T, T) -> T */
+    /* fn min<N : num, T : fiu32>(vec<N, T>, vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[203],
+  },
+  {
+    /* [45] */
+    /* fn mix(f32, f32, f32) -> f32 */
+    /* fn mix<N : num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
+    /* fn mix<N : num>(vec<N, f32>, vec<N, f32>, f32) -> vec<N, f32> */
+    /* num overloads */ 3,
+    /* overloads */ &kOverloads[139],
+  },
+  {
+    /* [46] */
+    /* fn modf(f32) -> __modf_result */
+    /* fn modf<N : num>(vec<N, f32>) -> __modf_result_vec<N> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[207],
+  },
+  {
+    /* [47] */
+    /* fn normalize<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[255],
+  },
+  {
+    /* [48] */
+    /* fn pack2x16float(vec2<f32>) -> u32 */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[269],
+  },
+  {
+    /* [49] */
+    /* fn pack2x16snorm(vec2<f32>) -> u32 */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[268],
+  },
+  {
+    /* [50] */
+    /* fn pack2x16unorm(vec2<f32>) -> u32 */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[267],
+  },
+  {
+    /* [51] */
+    /* fn pack4x8snorm(vec4<f32>) -> u32 */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[263],
+  },
+  {
+    /* [52] */
+    /* fn pack4x8unorm(vec4<f32>) -> u32 */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[266],
+  },
+  {
+    /* [53] */
+    /* fn pow(f32, f32) -> f32 */
+    /* fn pow<N : num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[221],
+  },
+  {
+    /* [54] */
+    /* fn radians(f32) -> f32 */
+    /* fn radians<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[223],
+  },
+  {
+    /* [55] */
+    /* fn reflect<N : num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[265],
+  },
+  {
+    /* [56] */
+    /* fn refract<N : num>(vec<N, f32>, vec<N, f32>, f32) -> vec<N, f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[264],
+  },
+  {
+    /* [57] */
+    /* fn reverseBits<T : iu32>(T) -> T */
+    /* fn reverseBits<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[229],
+  },
+  {
+    /* [58] */
+    /* fn round(f32) -> f32 */
+    /* fn round<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[231],
+  },
+  {
+    /* [59] */
+    /* fn select<T : scalar>(T, T, bool) -> T */
+    /* fn select<T : scalar, N : num>(vec<N, T>, vec<N, T>, bool) -> vec<N, T> */
+    /* fn select<N : num, T : scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T> */
+    /* num overloads */ 3,
+    /* overloads */ &kOverloads[142],
+  },
+  {
+    /* [60] */
+    /* fn sign(f32) -> f32 */
+    /* fn sign<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[235],
+  },
+  {
+    /* [61] */
+    /* fn sin(f32) -> f32 */
+    /* fn sin<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[237],
+  },
+  {
+    /* [62] */
+    /* fn sinh(f32) -> f32 */
+    /* fn sinh<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[239],
+  },
+  {
+    /* [63] */
+    /* fn smoothStep(f32, f32, f32) -> f32 */
+    /* fn smoothStep<N : num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[251],
+  },
+  {
+    /* [64] */
+    /* fn sqrt(f32) -> f32 */
+    /* fn sqrt<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[243],
+  },
+  {
+    /* [65] */
+    /* fn step(f32, f32) -> f32 */
+    /* fn step<N : num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[245],
+  },
+  {
+    /* [66] */
+    /* fn storageBarrier() */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[270],
+  },
+  {
+    /* [67] */
+    /* fn tan(f32) -> f32 */
+    /* fn tan<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[217],
+  },
+  {
+    /* [68] */
+    /* fn tanh(f32) -> f32 */
+    /* fn tanh<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[249],
+  },
+  {
+    /* [69] */
+    /* fn transpose<M : num, N : num>(mat<M, N, f32>) -> mat<N, M, f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[286],
+  },
+  {
+    /* [70] */
+    /* fn trunc(f32) -> f32 */
+    /* fn trunc<N : num>(vec<N, f32>) -> vec<N, f32> */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[247],
+  },
+  {
+    /* [71] */
+    /* fn unpack2x16float(u32) -> vec2<f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[256],
+  },
+  {
+    /* [72] */
+    /* fn unpack2x16snorm(u32) -> vec2<f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[257],
+  },
+  {
+    /* [73] */
+    /* fn unpack2x16unorm(u32) -> vec2<f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[258],
+  },
+  {
+    /* [74] */
+    /* fn unpack4x8snorm(u32) -> vec4<f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[259],
+  },
+  {
+    /* [75] */
+    /* fn unpack4x8unorm(u32) -> vec4<f32> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[260],
+  },
+  {
+    /* [76] */
+    /* fn workgroupBarrier() */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[261],
+  },
+  {
+    /* [77] */
+    /* fn textureDimensions<T : fiu32>(texture: texture_1d<T>) -> i32 */
+    /* fn textureDimensions<T : fiu32>(texture: texture_1d<T>, level: i32) -> i32 */
+    /* fn textureDimensions<T : fiu32>(texture: texture_2d<T>) -> vec2<i32> */
+    /* fn textureDimensions<T : fiu32>(texture: texture_2d<T>, level: i32) -> vec2<i32> */
+    /* fn textureDimensions<T : fiu32>(texture: texture_2d_array<T>) -> vec2<i32> */
+    /* fn textureDimensions<T : fiu32>(texture: texture_2d_array<T>, level: i32) -> vec2<i32> */
+    /* fn textureDimensions<T : fiu32>(texture: texture_3d<T>) -> vec3<i32> */
+    /* fn textureDimensions<T : fiu32>(texture: texture_3d<T>, level: i32) -> vec3<i32> */
+    /* fn textureDimensions<T : fiu32>(texture: texture_cube<T>) -> vec2<i32> */
+    /* fn textureDimensions<T : fiu32>(texture: texture_cube<T>, level: i32) -> vec2<i32> */
+    /* fn textureDimensions<T : fiu32>(texture: texture_cube_array<T>) -> vec2<i32> */
+    /* fn textureDimensions<T : fiu32>(texture: texture_cube_array<T>, level: i32) -> vec2<i32> */
+    /* fn textureDimensions<T : fiu32>(texture: texture_multisampled_2d<T>) -> vec2<i32> */
+    /* fn textureDimensions(texture: texture_depth_2d) -> vec2<i32> */
+    /* fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32> */
+    /* fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32> */
+    /* fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32> */
+    /* fn textureDimensions(texture: texture_depth_cube) -> vec2<i32> */
+    /* fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32> */
+    /* fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32> */
+    /* fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32> */
+    /* fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32> */
+    /* fn textureDimensions<F : texel_format, A : write_only>(texture: texture_storage_1d<F, A>) -> i32 */
+    /* fn textureDimensions<F : texel_format, A : write_only>(texture: texture_storage_2d<F, A>) -> vec2<i32> */
+    /* fn textureDimensions<F : texel_format, A : write_only>(texture: texture_storage_2d_array<F, A>) -> vec2<i32> */
+    /* fn textureDimensions<F : texel_format, A : write_only>(texture: texture_storage_3d<F, A>) -> vec3<i32> */
+    /* fn textureDimensions(texture: texture_external) -> vec2<i32> */
+    /* num overloads */ 27,
+    /* overloads */ &kOverloads[0],
+  },
+  {
+    /* [78] */
+    /* fn textureGather<T : fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
+    /* fn textureGather<T : fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<T> */
+    /* fn textureGather<T : fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<T> */
+    /* fn textureGather<T : fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<T> */
+    /* fn textureGather<T : fiu32>(component: i32, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> */
+    /* fn textureGather<T : fiu32>(component: i32, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<T> */
+    /* fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
+    /* fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> */
+    /* fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
+    /* fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32> */
+    /* num overloads */ 12,
+    /* overloads */ &kOverloads[69],
+  },
+  {
+    /* [79] */
+    /* fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32> */
+    /* fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> vec4<f32> */
+    /* fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32> */
+    /* fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> vec4<f32> */
+    /* num overloads */ 6,
+    /* overloads */ &kOverloads[116],
+  },
+  {
+    /* [80] */
+    /* fn textureNumLayers<T : fiu32>(texture: texture_2d_array<T>) -> i32 */
+    /* fn textureNumLayers<T : fiu32>(texture: texture_cube_array<T>) -> i32 */
+    /* fn textureNumLayers(texture: texture_depth_2d_array) -> i32 */
+    /* fn textureNumLayers(texture: texture_depth_cube_array) -> i32 */
+    /* fn textureNumLayers<F : texel_format, A : write_only>(texture: texture_storage_2d_array<F, A>) -> i32 */
+    /* num overloads */ 5,
+    /* overloads */ &kOverloads[134],
+  },
+  {
+    /* [81] */
+    /* fn textureNumLevels<T : fiu32>(texture: texture_1d<T>) -> i32 */
+    /* fn textureNumLevels<T : fiu32>(texture: texture_2d<T>) -> i32 */
+    /* fn textureNumLevels<T : fiu32>(texture: texture_2d_array<T>) -> i32 */
+    /* fn textureNumLevels<T : fiu32>(texture: texture_3d<T>) -> i32 */
+    /* fn textureNumLevels<T : fiu32>(texture: texture_cube<T>) -> i32 */
+    /* fn textureNumLevels<T : fiu32>(texture: texture_cube_array<T>) -> i32 */
+    /* fn textureNumLevels(texture: texture_depth_2d) -> i32 */
+    /* fn textureNumLevels(texture: texture_depth_2d_array) -> i32 */
+    /* fn textureNumLevels(texture: texture_depth_cube) -> i32 */
+    /* fn textureNumLevels(texture: texture_depth_cube_array) -> i32 */
+    /* num overloads */ 10,
+    /* overloads */ &kOverloads[81],
+  },
+  {
+    /* [82] */
+    /* fn textureNumSamples<T : fiu32>(texture: texture_multisampled_2d<T>) -> i32 */
+    /* fn textureNumSamples(texture: texture_depth_multisampled_2d) -> i32 */
+    /* num overloads */ 2,
+    /* overloads */ &kOverloads[215],
+  },
+  {
+    /* [83] */
+    /* fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32> */
+    /* fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
+    /* fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> */
+    /* fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
+    /* fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, offset: vec3<i32>) -> vec4<f32> */
+    /* fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
+    /* fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32> */
+    /* fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32 */
+    /* fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> f32 */
+    /* fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> f32 */
+    /* fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> f32 */
+    /* fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32 */
+    /* fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> f32 */
+    /* num overloads */ 15,
+    /* overloads */ &kOverloads[27],
+  },
+  {
+    /* [84] */
+    /* fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32> */
+    /* fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32) -> vec4<f32> */
+    /* fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> */
+    /* fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, offset: vec3<i32>) -> vec4<f32> */
+    /* fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> */
+    /* fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, bias: f32) -> vec4<f32> */
+    /* num overloads */ 8,
+    /* overloads */ &kOverloads[100],
+  },
+  {
+    /* [85] */
+    /* fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 */
+    /* fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32 */
+    /* fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32 */
+    /* fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> f32 */
+    /* fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 */
+    /* fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32 */
+    /* num overloads */ 6,
+    /* overloads */ &kOverloads[122],
+  },
+  {
+    /* [86] */
+    /* fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 */
+    /* fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32 */
+    /* fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32 */
+    /* fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> f32 */
+    /* fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 */
+    /* fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32 */
+    /* num overloads */ 6,
+    /* overloads */ &kOverloads[128],
+  },
+  {
+    /* [87] */
+    /* fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
+    /* fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
+    /* fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> */
+    /* fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, offset: vec3<i32>) -> vec4<f32> */
+    /* fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> */
+    /* fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> */
+    /* num overloads */ 8,
+    /* overloads */ &kOverloads[108],
+  },
+  {
+    /* [88] */
+    /* fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32> */
+    /* fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32) -> vec4<f32> */
+    /* fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32, offset: vec2<i32>) -> vec4<f32> */
+    /* fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> */
+    /* fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, offset: vec3<i32>) -> vec4<f32> */
+    /* fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> */
+    /* fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, level: f32) -> vec4<f32> */
+    /* fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32) -> f32 */
+    /* fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32, offset: vec2<i32>) -> f32 */
+    /* fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32) -> f32 */
+    /* fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32, offset: vec2<i32>) -> f32 */
+    /* fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: i32) -> f32 */
+    /* fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32, level: i32) -> f32 */
+    /* fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
+    /* num overloads */ 15,
+    /* overloads */ &kOverloads[42],
+  },
+  {
+    /* [89] */
+    /* fn textureStore(texture: texture_storage_1d<f32_texel_format, write>, coords: i32, value: vec4<f32>) */
+    /* fn textureStore(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<i32>, value: vec4<f32>) */
+    /* fn textureStore(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>) */
+    /* fn textureStore(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<i32>, value: vec4<f32>) */
+    /* fn textureStore(texture: texture_storage_1d<i32_texel_format, write>, coords: i32, value: vec4<i32>) */
+    /* fn textureStore(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<i32>, value: vec4<i32>) */
+    /* fn textureStore(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>) */
+    /* fn textureStore(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<i32>, value: vec4<i32>) */
+    /* fn textureStore(texture: texture_storage_1d<u32_texel_format, write>, coords: i32, value: vec4<u32>) */
+    /* fn textureStore(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<i32>, value: vec4<u32>) */
+    /* fn textureStore(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>) */
+    /* fn textureStore(texture: texture_storage_3d<u32_texel_format, write>, coords: vec3<i32>, value: vec4<u32>) */
+    /* num overloads */ 12,
+    /* overloads */ &kOverloads[57],
+  },
+  {
+    /* [90] */
+    /* fn textureLoad<T : fiu32>(texture: texture_1d<T>, coords: i32, level: i32) -> vec4<T> */
+    /* fn textureLoad<T : fiu32>(texture: texture_2d<T>, coords: vec2<i32>, level: i32) -> vec4<T> */
+    /* fn textureLoad<T : fiu32>(texture: texture_2d_array<T>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<T> */
+    /* fn textureLoad<T : fiu32>(texture: texture_3d<T>, coords: vec3<i32>, level: i32) -> vec4<T> */
+    /* fn textureLoad<T : fiu32>(texture: texture_multisampled_2d<T>, coords: vec2<i32>, sample_index: i32) -> vec4<T> */
+    /* fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32 */
+    /* fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: i32, level: i32) -> f32 */
+    /* fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<i32>, sample_index: i32) -> f32 */
+    /* fn textureLoad(texture: texture_external, coords: vec2<i32>) -> vec4<f32> */
+    /* num overloads */ 9,
+    /* overloads */ &kOverloads[91],
+  },
+  {
+    /* [91] */
+    /* fn atomicLoad<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[276],
+  },
+  {
+    /* [92] */
+    /* fn atomicStore<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[277],
+  },
+  {
+    /* [93] */
+    /* fn atomicAdd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[278],
+  },
+  {
+    /* [94] */
+    /* fn atomicSub<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[279],
+  },
+  {
+    /* [95] */
+    /* fn atomicMax<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[280],
+  },
+  {
+    /* [96] */
+    /* fn atomicMin<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[281],
+  },
+  {
+    /* [97] */
+    /* fn atomicAnd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[282],
+  },
+  {
+    /* [98] */
+    /* fn atomicOr<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[283],
+  },
+  {
+    /* [99] */
+    /* fn atomicXor<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[284],
+  },
+  {
+    /* [100] */
+    /* fn atomicExchange<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[285],
+  },
+  {
+    /* [101] */
+    /* fn atomicCompareExchangeWeak<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T, T) -> vec2<T> */
+    /* num overloads */ 1,
+    /* overloads */ &kOverloads[262],
+  },
+};
+
+// clang-format on
diff --git a/src/builtin_table.inl.tmpl b/src/builtin_table.inl.tmpl
new file mode 100644
index 0000000..b7604b8
--- /dev/null
+++ b/src/builtin_table.inl.tmpl
@@ -0,0 +1,401 @@
+{{- /*
+--------------------------------------------------------------------------------
+Template file for use with tools/builtin-gen to generate builtin_table.inl
+Used by BuiltinTable.cc for builtin overload resolution.
+
+See:
+* tools/cmd/builtin-gen/gen for structures used by this template
+* https://golang.org/pkg/text/template/ for documentation on the template syntax
+--------------------------------------------------------------------------------
+*/ -}}
+
+// clang-format off
+
+{{  with .Sem -}}
+{{    range .Types -}}
+{{      template "Type" . }}
+{{    end -}}
+{{    range .TypeMatchers -}}
+{{      template "TypeMatcher" . }}
+{{    end -}}
+{{    range .EnumMatchers -}}
+{{      template "EnumMatcher" . }}
+{{    end -}}
+{{- end -}}
+
+{{- with BuiltinTable -}}
+{{- template "Matchers" . }}
+
+constexpr MatcherIndex kMatcherIndices[] = {
+{{- range $i, $idx := .MatcherIndices }}
+  /* [{{$i}}] */ {{$idx}},
+{{- end }}
+};
+
+// Assert that the MatcherIndex is big enough to index all the matchers, plus
+// kNoMatcher.
+static_assert(static_cast<int>(sizeof(kMatcherIndices) / sizeof(kMatcherIndices[0])) <
+              static_cast<int>(std::numeric_limits<MatcherIndex>::max() - 1),
+              "MatcherIndex is not large enough to index kMatcherIndices");
+
+constexpr ParameterInfo kParameters[] = {
+{{- range $i, $p := .Parameters }}
+  {
+    /* [{{$i}}] */
+    /* usage */ ParameterUsage::
+{{-   if $p.Usage }}k{{PascalCase $p.Usage}}
+{{-   else        }}kNone
+{{-   end         }},
+    /* matcher indices */ &kMatcherIndices[{{$p.MatcherIndicesOffset}}],
+  },
+{{- end }}
+};
+
+constexpr OpenTypeInfo kOpenTypes[] = {
+{{- range $i, $o := .OpenTypes }}
+  {
+    /* [{{$i}}] */
+    /* name */ "{{$o.Name}}",
+    /* matcher index */
+{{-   if ge $o.MatcherIndex 0 }} {{$o.MatcherIndex}}
+{{-   else                    }} kNoMatcher
+{{-   end                     }},
+  },
+{{- end }}
+};
+
+constexpr OpenNumberInfo kOpenNumbers[] = {
+{{- range $i, $o := .OpenNumbers }}
+  {
+    /* [{{$i}}] */
+    /* name */ "{{$o.Name}}",
+    /* matcher index */
+{{-   if ge $o.MatcherIndex 0 }} {{$o.MatcherIndex}}
+{{-   else                    }} kNoMatcher
+{{-   end                     }},
+  },
+{{- end }}
+};
+
+constexpr OverloadInfo kOverloads[] = {
+{{- range $i, $o := .Overloads }}
+  {
+    /* [{{$i}}] */
+    /* num parameters */ {{$o.NumParameters}},
+    /* num open types */ {{$o.NumOpenTypes}},
+    /* num open numbers */ {{$o.NumOpenNumbers}},
+    /* open types */
+{{-   if $o.OpenTypesOffset }} &kOpenTypes[{{$o.OpenTypesOffset}}],
+{{-   else                  }} nullptr,
+{{-   end }}
+    /* open numbers */
+{{-   if $o.OpenNumbersOffset }} &kOpenNumbers[{{$o.OpenNumbersOffset}}]
+{{-   else                    }} nullptr
+{{-   end }},
+    /* parameters */ &kParameters[{{$o.ParametersOffset}}],
+    /* return matcher indices */
+{{-   if $o.ReturnMatcherIndicesOffset }} &kMatcherIndices[{{$o.ReturnMatcherIndicesOffset}}]
+{{-   else                             }} nullptr
+{{-   end }},
+    /* supported_stages */ PipelineStageSet(
+{{-   range $i, $u := $o.CanBeUsedInStage.List -}}
+{{-     if $i -}}, {{end}}PipelineStage::k{{Title $u}}
+{{-   end }}),
+    /* is_deprecated */ {{$o.IsDeprecated}},
+  },
+{{- end }}
+};
+
+constexpr BuiltinInfo kBuiltins[] = {
+{{- range $i, $f := .Functions }}
+  {
+    /* [{{$i}}] */
+{{-   range $f.OverloadDescriptions }}
+    /* {{.}} */
+{{-   end }}
+    /* num overloads */ {{$f.NumOverloads}},
+    /* overloads */ &kOverloads[{{$f.OverloadsOffset}}],
+  },
+{{- end }}
+};
+
+// clang-format on
+{{ end -}}
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                              define "Type"                               -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{- $class := PascalCase .Name -}}
+/// TypeMatcher for 'type {{.Name}}'
+{{- if .Decl.Source.S.Filepath  }}
+/// @see {{.Decl.Source}}
+{{- end  }}
+class {{$class}} : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* {{$class}}::Match(MatchState& state, const sem::Type* ty) const {
+{{- range .TemplateParams }}
+{{-   template "DeclareLocalTemplateParam" . }}
+{{- end  }}
+  if (!match_{{TrimLeft .Name "_"}}(ty{{range .TemplateParams}}, {{.GetName}}{{end}})) {
+    return nullptr;
+  }
+{{- range .TemplateParams }}
+  {{.Name}} = {{ template "MatchTemplateParam" .}}({{.Name}});
+  if ({{ template "IsTemplateParamInvalid" .}}) {
+    return nullptr;
+  }
+{{- end  }}
+  return build_{{TrimLeft .Name "_"}}(state{{range .TemplateParams}}, {{.GetName}}{{end}});
+}
+
+std::string {{$class}}::String(MatchState&{{if .TemplateParams}} state{{end}}) const {
+{{- range .TemplateParams }}
+{{-   template "DeclareLocalTemplateParamName" . }}
+{{- end  }}
+
+{{- if .DisplayName }}
+  std::stringstream ss;
+  ss{{range SplitDisplayName .DisplayName}} << {{.}}{{end}};
+  return ss.str();
+{{- else if .TemplateParams }}
+  return "{{.Name}}<"{{template "AppendTemplateParamNames" .TemplateParams}} + ">";
+{{- else }}
+  return "{{.Name}}";
+{{- end  }}
+}
+{{  end -}}
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                          define "TypeMatcher"                            -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{- $class := PascalCase .Name -}}
+/// TypeMatcher for 'match {{.Name}}'
+{{- if .Decl.Source.S.Filepath  }}
+/// @see {{.Decl.Source}}
+{{- end  }}
+class {{$class}} : public TypeMatcher {
+ public:
+  /// Checks whether the given type matches the matcher rules, and returns the
+  /// expected, canonicalized type on success.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param type the type to match
+  /// @returns the canonicalized type on match, otherwise nullptr
+  const sem::Type* Match(MatchState& state,
+                         const sem::Type* type) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+const sem::Type* {{$class}}::Match(MatchState& state, const sem::Type* ty) const {
+{{- range .Types }}
+  if (match_{{.Name}}(ty)) {
+    return build_{{.Name}}(state);
+  }
+{{- end }}
+  return nullptr;
+}
+
+std::string {{$class}}::String(MatchState&) const {
+  return "
+{{- range .Types -}}
+{{-   if      IsFirstIn . $.Types }}{{.Name}}
+{{-   else if IsLastIn  . $.Types }} or {{.Name}}
+{{-   else                        }}, {{.Name}}
+{{-   end -}}
+{{- end -}}
+  ";
+}
+{{  end -}}
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                          define "EnumMatcher"                            -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{- $class := PascalCase .Name -}}
+{{- $enum := PascalCase .Enum.Name -}}
+/// EnumMatcher for 'match {{.Name}}'
+{{- if .Decl.Source.S.Filepath  }}
+/// @see {{.Decl.Source}}
+{{- end  }}
+class {{$class}} : public NumberMatcher {
+ public:
+  /// Checks whether the given number matches the enum matcher rules.
+  /// Match may close open types and numbers in state.
+  /// @param state the MatchState
+  /// @param number the enum value as a Number
+  /// @return true if the enum value matches the set
+  Number Match(MatchState& state, Number number) const override;
+  /// @param state the MatchState
+  /// @return a string representation of the matcher.
+  std::string String(MatchState& state) const override;
+};
+
+{{ if eq 1 (len .Options) -}}
+{{-   $option := index .Options 0 }}
+{{-   $entry := printf "k%v" (PascalCase $option.Name) -}}
+Number {{$class}}::Match(MatchState&, Number number) const {
+  if (number.IsAny() || number.Value() == static_cast<uint32_t>({{$enum}}::{{$entry}})) {
+    return Number(static_cast<uint32_t>({{$enum}}::{{$entry}}));
+  }
+  return Number::invalid;
+}
+{{- else -}}
+Number {{$class}}::Match(MatchState&, Number number) const {
+  switch (static_cast<{{$enum}}>(number.Value())) {
+{{-   range .Options }}
+    case {{$enum}}::k{{PascalCase .Name}}:
+{{-   end }}
+      return number;
+    default:
+      return Number::invalid;
+  }
+}
+{{- end }}
+
+std::string {{$class}}::String(MatchState&) const {
+  return "
+{{- range .Options -}}
+{{-   if      IsFirstIn . $.Options }}{{.Name}}
+{{-   else if IsLastIn  . $.Options }} or {{.Name}}
+{{-   else                          }}, {{.Name}}
+{{-   end -}}
+{{- end -}}
+";
+}
+{{  end -}}
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                            define "Matchers"                             -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+/// Matchers holds type and number matchers
+class Matchers {
+ private:
+{{- $t_names := Map -}}
+{{- $n_names := Map -}}
+{{- range Iterate .Sem.MaxOpenTypes -}}
+{{-   $name := printf "open_type_%v" . -}}
+{{-   $t_names.Put . $name }}
+  OpenTypeMatcher {{$name}}_{ {{- . -}} };
+{{- end }}
+{{- range Iterate .Sem.MaxOpenNumbers -}}
+{{-   $name := printf "open_number_%v" . -}}
+{{-   $n_names.Put . $name }}
+  OpenNumberMatcher {{$name}}_{ {{- . -}} };
+{{- end }}
+{{- range .Sem.Types -}}
+{{-   $name := PascalCase .Name -}}
+{{-   $t_names.Put . $name }}
+  {{$name}} {{$name}}_;
+{{- end }}
+{{- range .Sem.TypeMatchers -}}
+{{-   $name := PascalCase .Name -}}
+{{-   $t_names.Put . $name }}
+  {{$name}} {{$name}}_;
+{{- end }}
+{{- range .Sem.EnumMatchers -}}
+{{-   $name := PascalCase .Name -}}
+{{-   $n_names.Put . $name }}
+  {{$name}} {{$name}}_;
+{{- end }}
+
+ public:
+  /// Constructor
+  Matchers();
+  /// Destructor
+  ~Matchers();
+
+  /// The open-types, types, and type matchers
+  TypeMatcher const* const type[{{len .TMatchers}}] = {
+{{- range $i, $m := .TMatchers }}
+    /* [{{$i}}] */
+{{-   if $m }} &{{$t_names.Get $m}}_,
+{{-   else  }} &{{$t_names.Get $i}}_,
+{{-   end   }}
+{{- end }}
+  };
+
+  /// The open-numbers, and number matchers
+  NumberMatcher const* const number[{{len .NMatchers}}] = {
+{{- range $i, $m := .NMatchers }}
+    /* [{{$i}}] */
+{{-   if $m }} &{{$n_names.Get $m}}_,
+{{-   else  }} &{{$n_names.Get $i}}_,
+{{-   end   }}
+{{- end }}
+  };
+};
+
+Matchers::Matchers() = default;
+Matchers::~Matchers() = default;
+{{- end -}}
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                     define "DeclareLocalTemplateParam"                   -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   if      IsTemplateTypeParam . }}
+  const sem::Type* {{.Name}} = nullptr;
+{{-   else if IsTemplateNumberParam . }}
+  Number {{.Name}} = Number::invalid;
+{{-   else if IsTemplateEnumParam . }}
+  Number {{.Name}} = Number::invalid;
+{{-   end -}}
+{{- end -}}
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                   define "DeclareLocalTemplateParamName"                 -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   if      IsTemplateTypeParam . }}
+  const std::string {{.Name}} = state.TypeName();
+{{-   else if IsTemplateNumberParam . }}
+  const std::string {{.Name}} = state.NumName();
+{{-   else if IsTemplateEnumParam . }}
+  const std::string {{.Name}} = state.NumName();
+{{-   end -}}
+{{- end -}}
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                       define "MatchTemplateParam"                        -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   if      IsTemplateTypeParam . -}}
+  state.Type
+{{-   else if IsTemplateNumberParam . -}}
+  state.Num
+{{-   else if IsTemplateEnumParam . -}}
+  state.Num
+{{-   end -}}
+{{- end -}}
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                       define "IsTemplateParamInvalid"                    -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   if      IsTemplateTypeParam . -}}
+  {{.Name}} == nullptr
+{{-   else if IsTemplateNumberParam . -}}
+  !{{.Name}}.IsValid()
+{{-   else if IsTemplateEnumParam . -}}
+  !{{.Name}}.IsValid()
+{{-   end -}}
+{{- end -}}
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                      define "AppendTemplateParamNames"                   -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   range $i, $ := . -}}
+{{-     if $i }} + ", " + {{.Name}}
+{{-     else }} + {{.Name}}
+{{-     end -}}
+{{-   end -}}
+{{- end -}}
diff --git a/src/builtin_table_test.cc b/src/builtin_table_test.cc
new file mode 100644
index 0000000..a9ceff0
--- /dev/null
+++ b/src/builtin_table_test.cc
@@ -0,0 +1,601 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/builtin_table.h"
+
+#include "gmock/gmock.h"
+#include "src/program_builder.h"
+#include "src/sem/atomic_type.h"
+#include "src/sem/depth_multisampled_texture_type.h"
+#include "src/sem/depth_texture_type.h"
+#include "src/sem/external_texture_type.h"
+#include "src/sem/multisampled_texture_type.h"
+#include "src/sem/reference_type.h"
+#include "src/sem/sampled_texture_type.h"
+#include "src/sem/storage_texture_type.h"
+
+namespace tint {
+namespace {
+
+using ::testing::HasSubstr;
+
+using BuiltinType = sem::BuiltinType;
+using Parameter = sem::Parameter;
+using ParameterUsage = sem::ParameterUsage;
+
+class BuiltinTableTest : public testing::Test, public ProgramBuilder {
+ public:
+  std::unique_ptr<BuiltinTable> table = BuiltinTable::Create(*this);
+};
+
+TEST_F(BuiltinTableTest, MatchF32) {
+  auto* f32 = create<sem::F32>();
+  auto* result = table->Lookup(BuiltinType::kCos, {f32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kCos);
+  EXPECT_EQ(result->ReturnType(), f32);
+  ASSERT_EQ(result->Parameters().size(), 1u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), f32);
+}
+
+TEST_F(BuiltinTableTest, MismatchF32) {
+  auto* i32 = create<sem::I32>();
+  auto* result = table->Lookup(BuiltinType::kCos, {i32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchU32) {
+  auto* f32 = create<sem::F32>();
+  auto* u32 = create<sem::U32>();
+  auto* vec2_f32 = create<sem::Vector>(f32, 2);
+  auto* result = table->Lookup(BuiltinType::kUnpack2x16float, {u32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kUnpack2x16float);
+  EXPECT_EQ(result->ReturnType(), vec2_f32);
+  ASSERT_EQ(result->Parameters().size(), 1u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), u32);
+}
+
+TEST_F(BuiltinTableTest, MismatchU32) {
+  auto* f32 = create<sem::F32>();
+  auto* result = table->Lookup(BuiltinType::kUnpack2x16float, {f32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchI32) {
+  auto* f32 = create<sem::F32>();
+  auto* i32 = create<sem::I32>();
+  auto* vec4_f32 = create<sem::Vector>(f32, 4);
+  auto* tex = create<sem::SampledTexture>(ast::TextureDimension::k1d, f32);
+  auto* result =
+      table->Lookup(BuiltinType::kTextureLoad, {tex, i32, i32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kTextureLoad);
+  EXPECT_EQ(result->ReturnType(), vec4_f32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
+  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
+  EXPECT_EQ(result->Parameters()[1]->Type(), i32);
+  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
+  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
+  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kLevel);
+}
+
+TEST_F(BuiltinTableTest, MismatchI32) {
+  auto* f32 = create<sem::F32>();
+  auto* tex = create<sem::SampledTexture>(ast::TextureDimension::k1d, f32);
+  auto* result = table->Lookup(BuiltinType::kTextureLoad, {tex, f32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchIU32AsI32) {
+  auto* i32 = create<sem::I32>();
+  auto* result = table->Lookup(BuiltinType::kCountOneBits, {i32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kCountOneBits);
+  EXPECT_EQ(result->ReturnType(), i32);
+  ASSERT_EQ(result->Parameters().size(), 1u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), i32);
+}
+
+TEST_F(BuiltinTableTest, MatchIU32AsU32) {
+  auto* u32 = create<sem::U32>();
+  auto* result = table->Lookup(BuiltinType::kCountOneBits, {u32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kCountOneBits);
+  EXPECT_EQ(result->ReturnType(), u32);
+  ASSERT_EQ(result->Parameters().size(), 1u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), u32);
+}
+
+TEST_F(BuiltinTableTest, MismatchIU32) {
+  auto* f32 = create<sem::F32>();
+  auto* result = table->Lookup(BuiltinType::kCountOneBits, {f32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchFIU32AsI32) {
+  auto* i32 = create<sem::I32>();
+  auto* result = table->Lookup(BuiltinType::kClamp, {i32, i32, i32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kClamp);
+  EXPECT_EQ(result->ReturnType(), i32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), i32);
+  EXPECT_EQ(result->Parameters()[1]->Type(), i32);
+  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
+}
+
+TEST_F(BuiltinTableTest, MatchFIU32AsU32) {
+  auto* u32 = create<sem::U32>();
+  auto* result = table->Lookup(BuiltinType::kClamp, {u32, u32, u32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kClamp);
+  EXPECT_EQ(result->ReturnType(), u32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), u32);
+  EXPECT_EQ(result->Parameters()[1]->Type(), u32);
+  EXPECT_EQ(result->Parameters()[2]->Type(), u32);
+}
+
+TEST_F(BuiltinTableTest, MatchFIU32AsF32) {
+  auto* f32 = create<sem::F32>();
+  auto* result = table->Lookup(BuiltinType::kClamp, {f32, f32, f32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kClamp);
+  EXPECT_EQ(result->ReturnType(), f32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), f32);
+  EXPECT_EQ(result->Parameters()[1]->Type(), f32);
+  EXPECT_EQ(result->Parameters()[2]->Type(), f32);
+}
+
+TEST_F(BuiltinTableTest, MismatchFIU32) {
+  auto* bool_ = create<sem::Bool>();
+  auto* result =
+      table->Lookup(BuiltinType::kClamp, {bool_, bool_, bool_}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchBool) {
+  auto* f32 = create<sem::F32>();
+  auto* bool_ = create<sem::Bool>();
+  auto* result =
+      table->Lookup(BuiltinType::kSelect, {f32, f32, bool_}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kSelect);
+  EXPECT_EQ(result->ReturnType(), f32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), f32);
+  EXPECT_EQ(result->Parameters()[1]->Type(), f32);
+  EXPECT_EQ(result->Parameters()[2]->Type(), bool_);
+}
+
+TEST_F(BuiltinTableTest, MismatchBool) {
+  auto* f32 = create<sem::F32>();
+  auto* result = table->Lookup(BuiltinType::kSelect, {f32, f32, f32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchPointer) {
+  auto* i32 = create<sem::I32>();
+  auto* atomicI32 = create<sem::Atomic>(i32);
+  auto* ptr = create<sem::Pointer>(atomicI32, ast::StorageClass::kWorkgroup,
+                                   ast::Access::kReadWrite);
+  auto* result = table->Lookup(BuiltinType::kAtomicLoad, {ptr}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kAtomicLoad);
+  EXPECT_EQ(result->ReturnType(), i32);
+  ASSERT_EQ(result->Parameters().size(), 1u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), ptr);
+}
+
+TEST_F(BuiltinTableTest, MismatchPointer) {
+  auto* i32 = create<sem::I32>();
+  auto* atomicI32 = create<sem::Atomic>(i32);
+  auto* result = table->Lookup(BuiltinType::kAtomicLoad, {atomicI32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchArray) {
+  auto* arr = create<sem::Array>(create<sem::U32>(), 0, 4, 4, 4, 4);
+  auto* arr_ptr = create<sem::Pointer>(arr, ast::StorageClass::kStorage,
+                                       ast::Access::kReadWrite);
+  auto* result = table->Lookup(BuiltinType::kArrayLength, {arr_ptr}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kArrayLength);
+  EXPECT_TRUE(result->ReturnType()->Is<sem::U32>());
+  ASSERT_EQ(result->Parameters().size(), 1u);
+  auto* param_type = result->Parameters()[0]->Type();
+  ASSERT_TRUE(param_type->Is<sem::Pointer>());
+  EXPECT_TRUE(param_type->As<sem::Pointer>()->StoreType()->Is<sem::Array>());
+}
+
+TEST_F(BuiltinTableTest, MismatchArray) {
+  auto* f32 = create<sem::F32>();
+  auto* result = table->Lookup(BuiltinType::kArrayLength, {f32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchSampler) {
+  auto* f32 = create<sem::F32>();
+  auto* vec2_f32 = create<sem::Vector>(f32, 2);
+  auto* vec4_f32 = create<sem::Vector>(f32, 4);
+  auto* tex = create<sem::SampledTexture>(ast::TextureDimension::k2d, f32);
+  auto* sampler = create<sem::Sampler>(ast::SamplerKind::kSampler);
+  auto* result = table->Lookup(BuiltinType::kTextureSample,
+                               {tex, sampler, vec2_f32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kTextureSample);
+  EXPECT_EQ(result->ReturnType(), vec4_f32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
+  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
+  EXPECT_EQ(result->Parameters()[1]->Type(), sampler);
+  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kSampler);
+  EXPECT_EQ(result->Parameters()[2]->Type(), vec2_f32);
+  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kCoords);
+}
+
+TEST_F(BuiltinTableTest, MismatchSampler) {
+  auto* f32 = create<sem::F32>();
+  auto* vec2_f32 = create<sem::Vector>(f32, 2);
+  auto* tex = create<sem::SampledTexture>(ast::TextureDimension::k2d, f32);
+  auto* result = table->Lookup(BuiltinType::kTextureSample,
+                               {tex, f32, vec2_f32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchSampledTexture) {
+  auto* i32 = create<sem::I32>();
+  auto* f32 = create<sem::F32>();
+  auto* vec2_i32 = create<sem::Vector>(i32, 2);
+  auto* vec4_f32 = create<sem::Vector>(f32, 4);
+  auto* tex = create<sem::SampledTexture>(ast::TextureDimension::k2d, f32);
+  auto* result =
+      table->Lookup(BuiltinType::kTextureLoad, {tex, vec2_i32, i32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kTextureLoad);
+  EXPECT_EQ(result->ReturnType(), vec4_f32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
+  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
+  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
+  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
+  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
+  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kLevel);
+}
+
+TEST_F(BuiltinTableTest, MatchMultisampledTexture) {
+  auto* i32 = create<sem::I32>();
+  auto* f32 = create<sem::F32>();
+  auto* vec2_i32 = create<sem::Vector>(i32, 2);
+  auto* vec4_f32 = create<sem::Vector>(f32, 4);
+  auto* tex = create<sem::MultisampledTexture>(ast::TextureDimension::k2d, f32);
+  auto* result =
+      table->Lookup(BuiltinType::kTextureLoad, {tex, vec2_i32, i32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kTextureLoad);
+  EXPECT_EQ(result->ReturnType(), vec4_f32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
+  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
+  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
+  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
+  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
+  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kSampleIndex);
+}
+
+TEST_F(BuiltinTableTest, MatchDepthTexture) {
+  auto* f32 = create<sem::F32>();
+  auto* i32 = create<sem::I32>();
+  auto* vec2_i32 = create<sem::Vector>(i32, 2);
+  auto* tex = create<sem::DepthTexture>(ast::TextureDimension::k2d);
+  auto* result =
+      table->Lookup(BuiltinType::kTextureLoad, {tex, vec2_i32, i32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kTextureLoad);
+  EXPECT_EQ(result->ReturnType(), f32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
+  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
+  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
+  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
+  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
+  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kLevel);
+}
+
+TEST_F(BuiltinTableTest, MatchDepthMultisampledTexture) {
+  auto* f32 = create<sem::F32>();
+  auto* i32 = create<sem::I32>();
+  auto* vec2_i32 = create<sem::Vector>(i32, 2);
+  auto* tex = create<sem::DepthMultisampledTexture>(ast::TextureDimension::k2d);
+  auto* result =
+      table->Lookup(BuiltinType::kTextureLoad, {tex, vec2_i32, i32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kTextureLoad);
+  EXPECT_EQ(result->ReturnType(), f32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
+  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
+  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
+  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
+  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
+  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kSampleIndex);
+}
+
+TEST_F(BuiltinTableTest, MatchExternalTexture) {
+  auto* f32 = create<sem::F32>();
+  auto* i32 = create<sem::I32>();
+  auto* vec2_i32 = create<sem::Vector>(i32, 2);
+  auto* vec4_f32 = create<sem::Vector>(f32, 4);
+  auto* tex = create<sem::ExternalTexture>();
+  auto* result =
+      table->Lookup(BuiltinType::kTextureLoad, {tex, vec2_i32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kTextureLoad);
+  EXPECT_EQ(result->ReturnType(), vec4_f32);
+  ASSERT_EQ(result->Parameters().size(), 2u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
+  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
+  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
+  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
+}
+
+TEST_F(BuiltinTableTest, MatchWOStorageTexture) {
+  auto* f32 = create<sem::F32>();
+  auto* i32 = create<sem::I32>();
+  auto* vec2_i32 = create<sem::Vector>(i32, 2);
+  auto* vec4_f32 = create<sem::Vector>(f32, 4);
+  auto* subtype =
+      sem::StorageTexture::SubtypeFor(ast::TexelFormat::kR32Float, Types());
+  auto* tex = create<sem::StorageTexture>(ast::TextureDimension::k2d,
+                                          ast::TexelFormat::kR32Float,
+                                          ast::Access::kWrite, subtype);
+
+  auto* result = table->Lookup(BuiltinType::kTextureStore,
+                               {tex, vec2_i32, vec4_f32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kTextureStore);
+  EXPECT_TRUE(result->ReturnType()->Is<sem::Void>());
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
+  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
+  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
+  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
+  EXPECT_EQ(result->Parameters()[2]->Type(), vec4_f32);
+  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kValue);
+}
+
+TEST_F(BuiltinTableTest, MismatchTexture) {
+  auto* f32 = create<sem::F32>();
+  auto* i32 = create<sem::I32>();
+  auto* vec2_i32 = create<sem::Vector>(i32, 2);
+  auto* result =
+      table->Lookup(BuiltinType::kTextureLoad, {f32, vec2_i32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, ImplicitLoadOnReference) {
+  auto* f32 = create<sem::F32>();
+  auto* result =
+      table->Lookup(BuiltinType::kCos,
+                    {create<sem::Reference>(f32, ast::StorageClass::kFunction,
+                                            ast::Access::kReadWrite)},
+                    Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kCos);
+  EXPECT_EQ(result->ReturnType(), f32);
+  ASSERT_EQ(result->Parameters().size(), 1u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), f32);
+}
+
+TEST_F(BuiltinTableTest, MatchOpenType) {
+  auto* f32 = create<sem::F32>();
+  auto* result = table->Lookup(BuiltinType::kClamp, {f32, f32, f32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kClamp);
+  EXPECT_EQ(result->ReturnType(), f32);
+  EXPECT_EQ(result->Parameters()[0]->Type(), f32);
+  EXPECT_EQ(result->Parameters()[1]->Type(), f32);
+  EXPECT_EQ(result->Parameters()[2]->Type(), f32);
+}
+
+TEST_F(BuiltinTableTest, MismatchOpenType) {
+  auto* f32 = create<sem::F32>();
+  auto* u32 = create<sem::U32>();
+  auto* result = table->Lookup(BuiltinType::kClamp, {f32, u32, f32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchOpenSizeVector) {
+  auto* f32 = create<sem::F32>();
+  auto* vec2_f32 = create<sem::Vector>(f32, 2);
+  auto* result = table->Lookup(BuiltinType::kClamp,
+                               {vec2_f32, vec2_f32, vec2_f32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kClamp);
+  EXPECT_EQ(result->ReturnType(), vec2_f32);
+  ASSERT_EQ(result->Parameters().size(), 3u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), vec2_f32);
+  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_f32);
+  EXPECT_EQ(result->Parameters()[2]->Type(), vec2_f32);
+}
+
+TEST_F(BuiltinTableTest, MismatchOpenSizeVector) {
+  auto* f32 = create<sem::F32>();
+  auto* u32 = create<sem::U32>();
+  auto* vec2_f32 = create<sem::Vector>(f32, 2);
+  auto* result =
+      table->Lookup(BuiltinType::kClamp, {vec2_f32, u32, vec2_f32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, MatchOpenSizeMatrix) {
+  auto* f32 = create<sem::F32>();
+  auto* vec3_f32 = create<sem::Vector>(f32, 3);
+  auto* mat3_f32 = create<sem::Matrix>(vec3_f32, 3);
+  auto* result = table->Lookup(BuiltinType::kDeterminant, {mat3_f32}, Source{});
+  ASSERT_NE(result, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+  EXPECT_EQ(result->Type(), BuiltinType::kDeterminant);
+  EXPECT_EQ(result->ReturnType(), f32);
+  ASSERT_EQ(result->Parameters().size(), 1u);
+  EXPECT_EQ(result->Parameters()[0]->Type(), mat3_f32);
+}
+
+TEST_F(BuiltinTableTest, MismatchOpenSizeMatrix) {
+  auto* f32 = create<sem::F32>();
+  auto* vec2_f32 = create<sem::Vector>(f32, 2);
+  auto* mat3x2_f32 = create<sem::Matrix>(vec2_f32, 3);
+  auto* result =
+      table->Lookup(BuiltinType::kDeterminant, {mat3x2_f32}, Source{});
+  ASSERT_EQ(result, nullptr);
+  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+}
+
+TEST_F(BuiltinTableTest, OverloadOrderByNumberOfParameters) {
+  // None of the arguments match, so expect the overloads with 2 parameters to
+  // come first
+  auto* bool_ = create<sem::Bool>();
+  table->Lookup(BuiltinType::kTextureDimensions, {bool_, bool_}, Source{});
+  ASSERT_EQ(Diagnostics().str(),
+            R"(error: no matching call to textureDimensions(bool, bool)
+
+27 candidate functions:
+  textureDimensions(texture: texture_1d<T>, level: i32) -> i32  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_2d<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_2d_array<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_3d<T>, level: i32) -> vec3<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_cube<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_cube_array<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
+  textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
+  textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
+  textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
+  textureDimensions(texture: texture_1d<T>) -> i32  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_2d<T>) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_2d_array<T>) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_3d<T>) -> vec3<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_cube<T>) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_cube_array<T>) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_depth_2d) -> vec2<i32>
+  textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
+  textureDimensions(texture: texture_depth_cube) -> vec2<i32>
+  textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
+  textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
+  textureDimensions(texture: texture_storage_1d<F, A>) -> i32  where: A is write
+  textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<i32>  where: A is write
+  textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<i32>  where: A is write
+  textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<i32>  where: A is write
+  textureDimensions(texture: texture_external) -> vec2<i32>
+)");
+}
+
+TEST_F(BuiltinTableTest, OverloadOrderByMatchingParameter) {
+  auto* tex = create<sem::DepthTexture>(ast::TextureDimension::k2d);
+  auto* bool_ = create<sem::Bool>();
+  table->Lookup(BuiltinType::kTextureDimensions, {tex, bool_}, Source{});
+  ASSERT_EQ(
+      Diagnostics().str(),
+      R"(error: no matching call to textureDimensions(texture_depth_2d, bool)
+
+27 candidate functions:
+  textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
+  textureDimensions(texture: texture_depth_2d) -> vec2<i32>
+  textureDimensions(texture: texture_1d<T>, level: i32) -> i32  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_2d<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_2d_array<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_3d<T>, level: i32) -> vec3<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_cube<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_cube_array<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
+  textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
+  textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
+  textureDimensions(texture: texture_1d<T>) -> i32  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_2d<T>) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_2d_array<T>) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_3d<T>) -> vec3<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_cube<T>) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_cube_array<T>) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<i32>  where: T is f32, i32 or u32
+  textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
+  textureDimensions(texture: texture_depth_cube) -> vec2<i32>
+  textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
+  textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
+  textureDimensions(texture: texture_storage_1d<F, A>) -> i32  where: A is write
+  textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<i32>  where: A is write
+  textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<i32>  where: A is write
+  textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<i32>  where: A is write
+  textureDimensions(texture: texture_external) -> vec2<i32>
+)");
+}
+
+TEST_F(BuiltinTableTest, SameOverloadReturnsSameBuiltinPointer) {
+  auto* f32 = create<sem::F32>();
+  auto* vec2_f32 = create<sem::Vector>(create<sem::F32>(), 2);
+  auto* bool_ = create<sem::Bool>();
+  auto* a = table->Lookup(BuiltinType::kSelect, {f32, f32, bool_}, Source{});
+  ASSERT_NE(a, nullptr) << Diagnostics().str();
+
+  auto* b = table->Lookup(BuiltinType::kSelect, {f32, f32, bool_}, Source{});
+  ASSERT_NE(b, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+
+  auto* c = table->Lookup(BuiltinType::kSelect, {vec2_f32, vec2_f32, bool_},
+                          Source{});
+  ASSERT_NE(c, nullptr) << Diagnostics().str();
+  ASSERT_EQ(Diagnostics().str(), "");
+
+  EXPECT_EQ(a, b);
+  EXPECT_NE(a, c);
+  EXPECT_NE(b, c);
+}
+
+}  // namespace
+}  // namespace tint
diff --git a/src/builtins.def b/src/builtins.def
new file mode 100644
index 0000000..ceec3b6
--- /dev/null
+++ b/src/builtins.def
@@ -0,0 +1,554 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// WGSL builtin definition file                                               //
+//                                                                            //
+// This file is used to generate parts of the Tint BuiltinTable, various      //
+// enum definition files, as well as test .wgsl files.                        //
+////////////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////
+// Enumerators                                                                //
+////////////////////////////////////////////////////////////////////////////////
+
+// https://gpuweb.github.io/gpuweb/wgsl/#storage-class
+enum storage_class {
+  function
+  private
+  workgroup
+  uniform
+  storage
+  [[internal]] handle
+}
+
+// https://gpuweb.github.io/gpuweb/wgsl/#memory-access-mode
+enum access {
+  read
+  write
+  read_write
+}
+
+// https://gpuweb.github.io/gpuweb/wgsl/#texel-formats
+enum texel_format {
+  rgba8unorm
+  rgba8snorm
+  rgba8uint
+  rgba8sint
+  rgba16uint
+  rgba16sint
+  rgba16float
+  r32uint
+  r32sint
+  r32float
+  rg32uint
+  rg32sint
+  rg32float
+  rgba32uint
+  rgba32sint
+  rgba32float
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// WGSL primitive types                                                       //
+////////////////////////////////////////////////////////////////////////////////
+
+// https://gpuweb.github.io/gpuweb/wgsl/#plain-types-section
+type bool
+type f32
+type i32
+type u32
+type vec2<T>
+type vec3<T>
+type vec4<T>
+[[display("vec{N}<{T}>")]]     type vec<N: num, T>
+[[display("mat{N}x{M}<{T}>")]] type mat<N: num, M: num, T>
+type ptr<S: storage_class, T, A: access>
+type atomic<T>
+type array<T>
+type sampler
+type sampler_comparison
+type texture_1d<T>
+type texture_2d<T>
+type texture_2d_array<T>
+type texture_3d<T>
+type texture_cube<T>
+type texture_cube_array<T>
+type texture_multisampled_2d<T>
+type texture_depth_2d
+type texture_depth_2d_array
+type texture_depth_cube
+type texture_depth_cube_array
+type texture_depth_multisampled_2d
+type texture_storage_1d<F: texel_format, A: access>
+type texture_storage_2d<F: texel_format, A: access>
+type texture_storage_2d_array<F: texel_format, A: access>
+type texture_storage_3d<F: texel_format, A: access>
+type texture_external
+
+type __modf_result
+[[display("__modf_result_vec{N}")]] type __modf_result_vec<N: num>
+type __frexp_result
+[[display("__frexp_result_vec{N}")]] type __frexp_result_vec<N: num>
+
+////////////////////////////////////////////////////////////////////////////////
+// Type matchers                                                              //
+//                                                                            //
+// A type matcher that can match one or more types.                           //
+////////////////////////////////////////////////////////////////////////////////
+
+match fiu32: f32 | i32 | u32
+match iu32: i32 | u32
+match scalar: f32 | i32 | u32 | bool
+
+////////////////////////////////////////////////////////////////////////////////
+// Enum matchers                                                              //
+//                                                                            //
+// A number matcher that can match one or more enumerator values.             //
+// All enumerator values listed in the match declaration need to be from the  //
+// same enum.                                                                 //
+////////////////////////////////////////////////////////////////////////////////
+
+// https://gpuweb.github.io/gpuweb/wgsl/#texel-formats
+match f32_texel_format:
+  rgba8unorm | rgba8snorm | rgba16float | r32float | rg32float | rgba32float
+match i32_texel_format:
+  rgba8sint | rgba16sint | r32sint | rg32sint | rgba32sint
+match u32_texel_format:
+  rgba8uint | rgba16uint | r32uint | rg32uint | rgba32uint
+
+match write_only: write
+
+match function_private_workgroup: function | private | workgroup
+match workgroup_or_storage: workgroup | storage
+
+////////////////////////////////////////////////////////////////////////////////
+// Builtin Functions                                                          //
+//                                                                            //
+// The builtin function declarations below declare all the built-in           //
+// functions supported by the WGSL language. This builtin definition          //
+// language supports simple static-type function declarations, as well as     //
+// single overload declarations that can match a number of different          //
+// argument types via the use of 'open-types' and 'open-numbers'.             //
+//                                                                            //
+// * Basic example:                                                           //
+//                                                                            //
+//    fn isInf(f32) -> bool                                                   //
+//                                                                            //
+//   Declares an overload of the function 'isInf' that accepts a single       //
+//   parameter of type 'f32' and returns a 'bool'.                            //
+//                                                                            //
+// An 'open-type' can be thought as a template type that is determined by the //
+// arguments to the builtin.                                                  //
+//                                                                            //
+// * Open-type example without constraint:                                    //
+//                                                                            //
+//    fn arrayLength<T>(array<T>) -> u32                                      //
+//                                                                            //
+//    Declares an overload of the function 'arrayLength' that accepts a       //
+//    single argument of an array type with no constraints on the array       //
+//    element type. This overload will always return a value of the same type //
+//    as its single argument.                                                 //
+//                                                                            //
+// * Open-type example with constraint:                                       //
+//                                                                            //
+//    fn abs<T: fiu32>(T) -> T                                                //
+//                                                                            //
+//    Declares an overload of the function 'abs' that accepts a single        //
+//    argument of type 'f32', 'i32' or 'u32', which returns a value of the    //
+//    same argument type.                                                     //
+//                                                                            //
+// Similarly an 'open-number' can be thought as a template number or          //
+// enumerator that is determined by the arguments to the builtin.             //
+//                                                                            //
+// * Open-number example:                                                     //
+//                                                                            //
+//    fn dpdx<N: num>(vec<N, f32>) -> vec<N, f32>                             //
+//                                                                            //
+//    Declares an overload of the function 'dpdx' that accepts a single       //
+//    argument of a variable-sized vector of 'f32', which returns a value of  //
+//    the same argument type.                                                 //
+//                                                                            //
+//                                                                            //
+// Matching algorithm:                                                        //
+// -------------------                                                        //
+//                                                                            //
+// Prior to matching an overload, all open-types are undefined.               //
+//                                                                            //
+// Open-types become closed-types (pinned to a fixed type) on the first       //
+// attempt to match an argument to that open-type.                            //
+// Once open-types are closed, they remain that type for the rest of the      //
+// overload evaluation.                                                       //
+//                                                                            //
+// To better understand, let's consider the following hypothetical overload   //
+// declaration:                                                               //
+//                                                                            //
+//    fn foo<T: scalar>(T, T);                                                //
+//                                                                            //
+//    T           - is the open-type                                          //
+//    scalar      - is a matcher for the types 'f32', 'i32', 'u32' or 'bool'  //
+//                  (declared above)                                          //
+//    <T: scalar> - declares the open-type T, with the constraint that T must //
+//                  match one of 'f32', 'i32', 'u32' or 'bool'.               //
+//                                                                            //
+// The process for resolving this overload is as follows:                     //
+//                                                                            //
+//   (1) The overload resolver begins by attempting to match the argument     //
+//       types from left to right.                                            //
+//       The first parameter type is compared against the argument type.      //
+//       As the open-type T has not been closed yet, T is closed as the type  //
+//       of the first argument.                                               //
+//       There's no verification that the T type is a scalar at this stage.   //
+//   (2) The second parameter is then compared against the second argument.   //
+//       As the open-type T is now closed, the argument type is compared      //
+//       against the value of the closed-type of T. If the types match, then  //
+//       the overload is still a candidate for matching, otherwise the        //
+//       overload is no longer considered.                                    //
+//   (3) If all the parameters matched, constraints on the open-types need    //
+//       to be checked next. If the closed-type does not match the 'match'    //
+//       constraint, then the overload is no longer considered.               //
+//                                                                            //
+// The algorithm for matching open-numbers is almost identical to open-types, //
+// except of course, they match against integer numbers or enumerators        //
+// instead of types.                                                          //
+//                                                                            //
+//                                                                            //
+// * More examples:                                                           //
+//                                                                            //
+//   fn F()                                                                   //
+//     - Function called F.                                                   //
+//       No open types or numbers, no parameters, no return value             //
+//                                                                            //
+//   fn F() -> RETURN_TYPE                                                    //
+//     - Function with RETURN_TYPE as the return type value                   //
+//                                                                            //
+//   fn F(f32, i32)                                                           //
+//     - Two fixed-type, anonymous parameters                                 //
+//                                                                            //
+//   fn F(USAGE : f32)                                                        //
+//     - Single parameter with name USAGE.                                    //
+//       Note: Parameter names are used by Tint to infer parameter order for  //
+//       some builtin functions                                               //
+//                                                                            //
+//   fn F<T>(T)                                                               //
+//     - Single parameter of unconstrained open-type T (any type)             //
+//                                                                            //
+//   fn F<T: scalar>(T)                                                       //
+//     - Single parameter of constrained open-type T (must be a scalar)       //
+//                                                                            //
+//   fn F<T: fiu32>(T) -> T                                                   //
+//     - Single parameter of constrained open-type T (must be a one of fiu32) //
+//       Return type matches parameter type                                   //
+//                                                                            //
+//   fn F<T, N: num>(vec<N, T>)                                               //
+//     - Single parameter of vector type with open-number size N and element  //
+//       open-type T                                                          //
+//                                                                            //
+//   fn F<A: access>(texture_storage_1d<f32_texel_format, A>)                 //
+//     - Single parameter of texture_storage_1d type with open-number         //
+//       access-control C, and of a texel format that is listed in            //
+//       f32_texel_format                                                     //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+
+// https://gpuweb.github.io/gpuweb/wgsl/#builtin-functions
+fn abs<T: fiu32>(T) -> T
+fn abs<N: num, T: fiu32>(vec<N, T>) -> vec<N, T>
+fn acos(f32) -> f32
+fn acos<N: num>(vec<N, f32>) -> vec<N, f32>
+fn all(bool) -> bool
+fn all<N: num>(vec<N, bool>) -> bool
+fn any(bool) -> bool
+fn any<N: num>(vec<N, bool>) -> bool
+fn arrayLength<T, A: access>(ptr<storage, array<T>, A>) -> u32
+fn asin(f32) -> f32
+fn asin<N: num>(vec<N, f32>) -> vec<N, f32>
+fn atan(f32) -> f32
+fn atan<N: num>(vec<N, f32>) -> vec<N, f32>
+fn atan2(f32, f32) -> f32
+fn atan2<N: num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32>
+fn ceil(f32) -> f32
+fn ceil<N: num>(vec<N, f32>) -> vec<N, f32>
+fn clamp<T: fiu32>(T, T, T) -> T
+fn clamp<N: num, T: fiu32>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
+fn cos(f32) -> f32
+fn cos<N: num>(vec<N, f32>) -> vec<N, f32>
+fn cosh(f32) -> f32
+fn cosh<N: num>(vec<N, f32>) -> vec<N, f32>
+fn countOneBits<T: iu32>(T) -> T
+fn countOneBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
+fn cross(vec3<f32>, vec3<f32>) -> vec3<f32>
+fn degrees(f32) -> f32
+fn degrees<N: num>(vec<N, f32>) -> vec<N, f32>
+fn determinant<N: num>(mat<N, N, f32>) -> f32
+fn distance(f32, f32) -> f32
+fn distance<N: num>(vec<N, f32>, vec<N, f32>) -> f32
+fn dot<N: num, T: fiu32>(vec<N, T>, vec<N, T>) -> T
+[[stage("fragment")]] fn dpdx(f32) -> f32
+[[stage("fragment")]] fn dpdx<N: num>(vec<N, f32>) -> vec<N, f32>
+[[stage("fragment")]] fn dpdxCoarse(f32) -> f32
+[[stage("fragment")]] fn dpdxCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
+[[stage("fragment")]] fn dpdxFine(f32) -> f32
+[[stage("fragment")]] fn dpdxFine<N: num>(vec<N, f32>) -> vec<N, f32>
+[[stage("fragment")]] fn dpdy(f32) -> f32
+[[stage("fragment")]] fn dpdy<N: num>(vec<N, f32>) -> vec<N, f32>
+[[stage("fragment")]] fn dpdyCoarse(f32) -> f32
+[[stage("fragment")]] fn dpdyCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
+[[stage("fragment")]] fn dpdyFine(f32) -> f32
+[[stage("fragment")]] fn dpdyFine<N: num>(vec<N, f32>) -> vec<N, f32>
+fn exp(f32) -> f32
+fn exp<N: num>(vec<N, f32>) -> vec<N, f32>
+fn exp2(f32) -> f32
+fn exp2<N: num>(vec<N, f32>) -> vec<N, f32>
+fn faceForward<N: num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32>
+fn floor(f32) -> f32
+fn floor<N: num>(vec<N, f32>) -> vec<N, f32>
+fn fma(f32, f32, f32) -> f32
+fn fma<N: num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32>
+fn fract(f32) -> f32
+fn fract<N: num>(vec<N, f32>) -> vec<N, f32>
+fn frexp(f32) -> __frexp_result
+fn frexp<N: num>(vec<N, f32>) -> __frexp_result_vec<N>
+[[stage("fragment")]] fn fwidth(f32) -> f32
+[[stage("fragment")]] fn fwidth<N: num>(vec<N, f32>) -> vec<N, f32>
+[[stage("fragment")]] fn fwidthCoarse(f32) -> f32
+[[stage("fragment")]] fn fwidthCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
+[[stage("fragment")]] fn fwidthFine(f32) -> f32
+[[stage("fragment")]] fn fwidthFine<N: num>(vec<N, f32>) -> vec<N, f32>
+fn inverseSqrt(f32) -> f32
+fn inverseSqrt<N: num>(vec<N, f32>) -> vec<N, f32>
+[[deprecated]] fn isFinite(f32) -> bool
+[[deprecated]] fn isFinite<N: num>(vec<N, f32>) -> vec<N, bool>
+[[deprecated]] fn isInf(f32) -> bool
+[[deprecated]] fn isInf<N: num>(vec<N, f32>) -> vec<N, bool>
+[[deprecated]] fn isNan(f32) -> bool
+[[deprecated]] fn isNan<N: num>(vec<N, f32>) -> vec<N, bool>
+[[deprecated]] fn isNormal(f32) -> bool
+[[deprecated]] fn isNormal<N: num>(vec<N, f32>) -> vec<N, bool>
+fn ldexp(f32, i32) -> f32
+fn ldexp<N: num>(vec<N, f32>, vec<N, i32>) -> vec<N, f32>
+fn length(f32) -> f32
+fn length<N: num>(vec<N, f32>) -> f32
+fn log(f32) -> f32
+fn log<N: num>(vec<N, f32>) -> vec<N, f32>
+fn log2(f32) -> f32
+fn log2<N: num>(vec<N, f32>) -> vec<N, f32>
+fn max<T: fiu32>(T, T) -> T
+fn max<N: num, T: fiu32>(vec<N, T>, vec<N, T>) -> vec<N, T>
+fn min<T: fiu32>(T, T) -> T
+fn min<N: num, T: fiu32>(vec<N, T>, vec<N, T>) -> vec<N, T>
+fn mix(f32, f32, f32) -> f32
+fn mix<N: num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32>
+fn mix<N: num>(vec<N, f32>, vec<N, f32>, f32) -> vec<N, f32>
+fn modf(f32) -> __modf_result
+fn modf<N: num>(vec<N, f32>) -> __modf_result_vec<N>
+fn normalize<N: num>(vec<N, f32>) -> vec<N, f32>
+fn pack2x16float(vec2<f32>) -> u32
+fn pack2x16snorm(vec2<f32>) -> u32
+fn pack2x16unorm(vec2<f32>) -> u32
+fn pack4x8snorm(vec4<f32>) -> u32
+fn pack4x8unorm(vec4<f32>) -> u32
+fn pow(f32, f32) -> f32
+fn pow<N: num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32>
+fn radians(f32) -> f32
+fn radians<N: num>(vec<N, f32>) -> vec<N, f32>
+fn reflect<N: num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32>
+fn refract<N: num>(vec<N, f32>, vec<N, f32>, f32) -> vec<N, f32>
+fn reverseBits<T: iu32>(T) -> T
+fn reverseBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
+fn round(f32) -> f32
+fn round<N: num>(vec<N, f32>) -> vec<N, f32>
+fn select<T: scalar>(T, T, bool) -> T
+fn select<T: scalar, N: num>(vec<N, T>, vec<N, T>, bool) -> vec<N, T>
+fn select<N: num, T: scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T>
+fn sign(f32) -> f32
+fn sign<N: num>(vec<N, f32>) -> vec<N, f32>
+fn sin(f32) -> f32
+fn sin<N: num>(vec<N, f32>) -> vec<N, f32>
+fn sinh(f32) -> f32
+fn sinh<N: num>(vec<N, f32>) -> vec<N, f32>
+fn smoothStep(f32, f32, f32) -> f32
+fn smoothStep<N: num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32>
+fn sqrt(f32) -> f32
+fn sqrt<N: num>(vec<N, f32>) -> vec<N, f32>
+fn step(f32, f32) -> f32
+fn step<N: num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32>
+[[stage("compute")]] fn storageBarrier()
+fn tan(f32) -> f32
+fn tan<N: num>(vec<N, f32>) -> vec<N, f32>
+fn tanh(f32) -> f32
+fn tanh<N: num>(vec<N, f32>) -> vec<N, f32>
+fn transpose<M: num, N: num>(mat<M, N, f32>) -> mat<N, M, f32>
+fn trunc(f32) -> f32
+fn trunc<N: num>(vec<N, f32>) -> vec<N, f32>
+fn unpack2x16float(u32) -> vec2<f32>
+fn unpack2x16snorm(u32) -> vec2<f32>
+fn unpack2x16unorm(u32) -> vec2<f32>
+fn unpack4x8snorm(u32) -> vec4<f32>
+fn unpack4x8unorm(u32) -> vec4<f32>
+[[stage("compute")]] fn workgroupBarrier()
+
+fn textureDimensions<T: fiu32>(texture: texture_1d<T>) -> i32
+fn textureDimensions<T: fiu32>(texture: texture_1d<T>, level: i32) -> i32
+fn textureDimensions<T: fiu32>(texture: texture_2d<T>) -> vec2<i32>
+fn textureDimensions<T: fiu32>(texture: texture_2d<T>, level: i32) -> vec2<i32>
+fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>) -> vec2<i32>
+fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>, level: i32) -> vec2<i32>
+fn textureDimensions<T: fiu32>(texture: texture_3d<T>) -> vec3<i32>
+fn textureDimensions<T: fiu32>(texture: texture_3d<T>, level: i32) -> vec3<i32>
+fn textureDimensions<T: fiu32>(texture: texture_cube<T>) -> vec2<i32>
+fn textureDimensions<T: fiu32>(texture: texture_cube<T>, level: i32) -> vec2<i32>
+fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>) -> vec2<i32>
+fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>, level: i32) -> vec2<i32>
+fn textureDimensions<T: fiu32>(texture: texture_multisampled_2d<T>) -> vec2<i32>
+fn textureDimensions(texture: texture_depth_2d) -> vec2<i32>
+fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
+fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
+fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
+fn textureDimensions(texture: texture_depth_cube) -> vec2<i32>
+fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
+fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
+fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
+fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
+fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_1d<F, A>) -> i32
+fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_2d<F, A>) -> vec2<i32>
+fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_2d_array<F, A>) -> vec2<i32>
+fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_3d<F, A>) -> vec3<i32>
+fn textureDimensions(texture: texture_external) -> vec2<i32>
+fn textureGather<T: fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T>
+fn textureGather<T: fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<T>
+fn textureGather<T: fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<T>
+fn textureGather<T: fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<T>
+fn textureGather<T: fiu32>(component: i32, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T>
+fn textureGather<T: fiu32>(component: i32, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<T>
+fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
+fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
+fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32>
+fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
+fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> vec4<f32>
+fn textureNumLayers<T: fiu32>(texture: texture_2d_array<T>) -> i32
+fn textureNumLayers<T: fiu32>(texture: texture_cube_array<T>) -> i32
+fn textureNumLayers(texture: texture_depth_2d_array) -> i32
+fn textureNumLayers(texture: texture_depth_cube_array) -> i32
+fn textureNumLayers<F: texel_format, A: write_only>(texture: texture_storage_2d_array<F, A>) -> i32
+fn textureNumLevels<T: fiu32>(texture: texture_1d<T>) -> i32
+fn textureNumLevels<T: fiu32>(texture: texture_2d<T>) -> i32
+fn textureNumLevels<T: fiu32>(texture: texture_2d_array<T>) -> i32
+fn textureNumLevels<T: fiu32>(texture: texture_3d<T>) -> i32
+fn textureNumLevels<T: fiu32>(texture: texture_cube<T>) -> i32
+fn textureNumLevels<T: fiu32>(texture: texture_cube_array<T>) -> i32
+fn textureNumLevels(texture: texture_depth_2d) -> i32
+fn textureNumLevels(texture: texture_depth_2d_array) -> i32
+fn textureNumLevels(texture: texture_depth_cube) -> i32
+fn textureNumLevels(texture: texture_depth_cube_array) -> i32
+fn textureNumSamples<T: fiu32>(texture: texture_multisampled_2d<T>) -> i32
+fn textureNumSamples(texture: texture_depth_multisampled_2d) -> i32
+[[stage("fragment")]] fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32>
+[[stage("fragment")]] fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+[[stage("fragment")]] fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
+[[stage("fragment")]] fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
+[[stage("fragment")]] fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32>
+[[stage("fragment")]] fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+[[stage("fragment")]] fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, offset: vec3<i32>) -> vec4<f32>
+[[stage("fragment")]] fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+[[stage("fragment")]] fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
+[[stage("fragment")]] fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32
+[[stage("fragment")]] fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> f32
+[[stage("fragment")]] fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> f32
+[[stage("fragment")]] fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> f32
+[[stage("fragment")]] fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32
+[[stage("fragment")]] fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> f32
+[[stage("fragment")]] fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32>
+[[stage("fragment")]] fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, offset: vec2<i32>) -> vec4<f32>
+[[stage("fragment")]] fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32) -> vec4<f32>
+[[stage("fragment")]] fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32, offset: vec2<i32>) -> vec4<f32>
+[[stage("fragment")]] fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
+[[stage("fragment")]] fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, offset: vec3<i32>) -> vec4<f32>
+[[stage("fragment")]] fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
+[[stage("fragment")]] fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, bias: f32) -> vec4<f32>
+[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
+[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32
+[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32
+[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> f32
+[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
+[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
+fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32
+fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> f32
+fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
+fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32
+fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
+fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
+fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
+fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
+fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, offset: vec3<i32>) -> vec4<f32>
+fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32>
+fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32) -> vec4<f32>
+fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
+fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, offset: vec3<i32>) -> vec4<f32>
+fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
+fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, level: f32) -> vec4<f32>
+fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32) -> f32
+fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32, offset: vec2<i32>) -> f32
+fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32) -> f32
+fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32, offset: vec2<i32>) -> f32
+fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: i32) -> f32
+fn textureSampleLevel(texture: texture_depth_cube_array,sampler: sampler, coords: vec3<f32>, array_index: i32, level: i32) -> f32
+fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+fn textureStore(texture: texture_storage_1d<f32_texel_format, write>, coords: i32, value: vec4<f32>)
+fn textureStore(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<i32>, value: vec4<f32>)
+fn textureStore(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
+fn textureStore(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<i32>, value: vec4<f32>)
+fn textureStore(texture: texture_storage_1d<i32_texel_format, write>, coords: i32, value: vec4<i32>)
+fn textureStore(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<i32>, value: vec4<i32>)
+fn textureStore(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
+fn textureStore(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<i32>, value: vec4<i32>)
+fn textureStore(texture: texture_storage_1d<u32_texel_format, write>, coords: i32, value: vec4<u32>)
+fn textureStore(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<i32>, value: vec4<u32>)
+fn textureStore(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
+fn textureStore(texture: texture_storage_3d<u32_texel_format, write>, coords: vec3<i32>, value: vec4<u32>)
+fn textureLoad<T: fiu32>(texture: texture_1d<T>, coords: i32, level: i32) -> vec4<T>
+fn textureLoad<T: fiu32>(texture: texture_2d<T>, coords: vec2<i32>, level: i32) -> vec4<T>
+fn textureLoad<T: fiu32>(texture: texture_2d_array<T>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<T>
+fn textureLoad<T: fiu32>(texture: texture_3d<T>, coords: vec3<i32>, level: i32) -> vec4<T>
+fn textureLoad<T: fiu32>(texture: texture_multisampled_2d<T>, coords: vec2<i32>, sample_index: i32) -> vec4<T>
+fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32
+fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: i32, level: i32) -> f32
+fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<i32>, sample_index: i32) -> f32
+fn textureLoad(texture: texture_external, coords: vec2<i32>) -> vec4<f32>
+
+[[stage("fragment", "compute")]] fn atomicLoad<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T
+[[stage("fragment", "compute")]] fn atomicStore<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T)
+[[stage("fragment", "compute")]] fn atomicAdd<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
+[[stage("fragment", "compute")]] fn atomicSub<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
+[[stage("fragment", "compute")]] fn atomicMax<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
+[[stage("fragment", "compute")]] fn atomicMin<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
+[[stage("fragment", "compute")]] fn atomicAnd<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
+[[stage("fragment", "compute")]] fn atomicOr<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
+[[stage("fragment", "compute")]] fn atomicXor<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
+[[stage("fragment", "compute")]] fn atomicExchange<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
+[[stage("fragment", "compute")]] fn atomicCompareExchangeWeak<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T, T) -> vec2<T>
diff --git a/src/inspector/inspector.cc b/src/inspector/inspector.cc
index 6fd4588..57db711 100644
--- a/src/inspector/inspector.cc
+++ b/src/inspector/inspector.cc
@@ -785,7 +785,7 @@
       continue;
     }
 
-    auto* i = call->Target()->As<sem::Intrinsic>();
+    auto* i = call->Target()->As<sem::Builtin>();
     if (!i) {
       continue;
     }
diff --git a/src/intrinsic_table.cc b/src/intrinsic_table.cc
deleted file mode 100644
index 23c9e30..0000000
--- a/src/intrinsic_table.cc
+++ /dev/null
@@ -1,1169 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/intrinsic_table.h"
-
-#include <algorithm>
-#include <limits>
-#include <unordered_map>
-#include <utility>
-
-#include "src/program_builder.h"
-#include "src/sem/atomic_type.h"
-#include "src/sem/depth_multisampled_texture_type.h"
-#include "src/sem/depth_texture_type.h"
-#include "src/sem/external_texture_type.h"
-#include "src/sem/multisampled_texture_type.h"
-#include "src/sem/pipeline_stage_set.h"
-#include "src/sem/sampled_texture_type.h"
-#include "src/sem/storage_texture_type.h"
-#include "src/utils/hash.h"
-#include "src/utils/map.h"
-#include "src/utils/math.h"
-#include "src/utils/scoped_assignment.h"
-
-namespace tint {
-namespace {
-
-// Forward declarations
-struct OverloadInfo;
-class Matchers;
-class NumberMatcher;
-class TypeMatcher;
-
-/// A special type that matches all TypeMatchers
-class Any : public Castable<Any, sem::Type> {
- public:
-  Any() = default;
-  ~Any() override = default;
-  std::string type_name() const override { return "<any>"; }
-  std::string FriendlyName(const SymbolTable&) const override {
-    return "<any>";
-  }
-};
-
-/// Number is an 32 bit unsigned integer, which can be in one of three states:
-/// * Invalid - Number has not been assigned a value
-/// * Valid   - a fixed integer value
-/// * Any     - matches any other non-invalid number
-struct Number {
-  static const Number any;
-  static const Number invalid;
-
-  /// Constructed as a valid number with the value v
-  explicit Number(uint32_t v) : value_(v), state_(kValid) {}
-
-  /// @returns the value of the number
-  inline uint32_t Value() const { return value_; }
-
-  /// @returns the true if the number is valid
-  inline bool IsValid() const { return state_ == kValid; }
-
-  /// @returns the true if the number is any
-  inline bool IsAny() const { return state_ == kAny; }
-
-  /// Assignment operator.
-  /// The number becomes valid, with the value n
-  inline Number& operator=(uint32_t n) {
-    value_ = n;
-    state_ = kValid;
-    return *this;
-  }
-
- private:
-  enum State {
-    kInvalid,
-    kValid,
-    kAny,
-  };
-
-  constexpr explicit Number(State state) : state_(state) {}
-
-  uint32_t value_ = 0;
-  State state_ = kInvalid;
-};
-
-const Number Number::any{Number::kAny};
-const Number Number::invalid{Number::kInvalid};
-
-/// ClosedState holds the state of the open / closed numbers and types.
-/// Used by the MatchState.
-class ClosedState {
- public:
-  explicit ClosedState(ProgramBuilder& b) : builder(b) {}
-
-  /// If the type with index `idx` is open, then it is closed with type `ty` and
-  /// Type() returns true. If the type is closed, then `Type()` returns true iff
-  /// it is equal to `ty`.
-  bool Type(uint32_t idx, const sem::Type* ty) {
-    auto res = types_.emplace(idx, ty);
-    return res.second || res.first->second == ty;
-  }
-
-  /// If the number with index `idx` is open, then it is closed with number
-  /// `number` and Num() returns true. If the number is closed, then `Num()`
-  /// returns true iff it is equal to `ty`.
-  bool Num(uint32_t idx, Number number) {
-    auto res = numbers_.emplace(idx, number.Value());
-    return res.second || res.first->second == number.Value();
-  }
-
-  /// Type returns the closed type with index `idx`.
-  /// An ICE is raised if the type is not closed.
-  const sem::Type* Type(uint32_t idx) const {
-    auto it = types_.find(idx);
-    if (it == types_.end()) {
-      TINT_ICE(Resolver, builder.Diagnostics())
-          << "type with index " << idx << " is not closed";
-      return nullptr;
-    }
-    TINT_ASSERT(Resolver, it != types_.end());
-    return it->second;
-  }
-
-  /// Type returns the number type with index `idx`.
-  /// An ICE is raised if the number is not closed.
-  Number Num(uint32_t idx) const {
-    auto it = numbers_.find(idx);
-    if (it == numbers_.end()) {
-      TINT_ICE(Resolver, builder.Diagnostics())
-          << "number with index " << idx << " is not closed";
-      return Number::invalid;
-    }
-    return Number(it->second);
-  }
-
- private:
-  ProgramBuilder& builder;
-  std::unordered_map<uint32_t, const sem::Type*> types_;
-  std::unordered_map<uint32_t, uint32_t> numbers_;
-};
-
-/// Index type used for matcher indices
-using MatcherIndex = uint8_t;
-
-/// Index value used for open types / numbers that do not have a constraint
-constexpr MatcherIndex kNoMatcher = std::numeric_limits<MatcherIndex>::max();
-
-/// MatchState holds the state used to match an overload.
-class MatchState {
- public:
-  MatchState(ProgramBuilder& b,
-             ClosedState& c,
-             const Matchers& m,
-             const OverloadInfo& o,
-             MatcherIndex const* matcher_indices)
-      : builder(b),
-        closed(c),
-        matchers(m),
-        overload(o),
-        matcher_indices_(matcher_indices) {}
-
-  /// The program builder
-  ProgramBuilder& builder;
-  /// The open / closed types and numbers
-  ClosedState& closed;
-  /// The type and number matchers
-  Matchers const& matchers;
-  /// The current overload being evaluated
-  OverloadInfo const& overload;
-
-  /// Type uses the next TypeMatcher from the matcher indices to match the type
-  /// `ty`. If the type matches, the canonical expected type is returned. If the
-  /// type `ty` does not match, then nullptr is returned.
-  /// @note: The matcher indices are progressed on calling.
-  const sem::Type* Type(const sem::Type* ty);
-
-  /// Num uses the next NumMatcher from the matcher indices to match the number
-  /// `num`. If the number matches, the canonical expected number is returned.
-  /// If the number `num` does not match, then an invalid number is returned.
-  /// @note: The matcher indices are progressed on calling.
-  Number Num(Number num);
-
-  /// @returns a string representation of the next TypeMatcher from the matcher
-  /// indices.
-  /// @note: The matcher indices are progressed on calling.
-  std::string TypeName();
-
-  /// @returns a string representation of the next NumberMatcher from the
-  /// matcher indices.
-  /// @note: The matcher indices are progressed on calling.
-  std::string NumName();
-
- private:
-  MatcherIndex const* matcher_indices_ = nullptr;
-};
-
-/// A TypeMatcher is the interface used to match an type used as part of an
-/// overload's parameter or return type.
-class TypeMatcher {
- public:
-  /// Destructor
-  virtual ~TypeMatcher() = default;
-
-  /// Checks whether the given type matches the matcher rules, and returns the
-  /// expected, canonicalized type on success.
-  /// Match may close open types and numbers in state.
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  virtual const sem::Type* Match(MatchState& state,
-                                 const sem::Type* type) const = 0;
-
-  /// @return a string representation of the matcher. Used for printing error
-  /// messages when no overload is found.
-  virtual std::string String(MatchState& state) const = 0;
-};
-
-/// A NumberMatcher is the interface used to match a number or enumerator used
-/// as part of an overload's parameter or return type.
-class NumberMatcher {
- public:
-  /// Destructor
-  virtual ~NumberMatcher() = default;
-
-  /// Checks whether the given number matches the matcher rules.
-  /// Match may close open numbers in state.
-  /// @param number the number to match
-  /// @returns true if the argument type is as expected.
-  virtual Number Match(MatchState& state, Number number) const = 0;
-
-  /// @return a string representation of the matcher. Used for printing error
-  /// messages when no overload is found.
-  virtual std::string String(MatchState& state) const = 0;
-};
-
-/// OpenTypeMatcher is a Matcher for an open type.
-/// The OpenTypeMatcher will match against any type (so long as it is consistent
-/// across all uses in the overload)
-class OpenTypeMatcher : public TypeMatcher {
- public:
-  /// Constructor
-  explicit OpenTypeMatcher(uint32_t index) : index_(index) {}
-
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override {
-    if (type->Is<Any>()) {
-      return state.closed.Type(index_);
-    }
-    return state.closed.Type(index_, type) ? type : nullptr;
-  }
-
-  std::string String(MatchState& state) const override;
-
- private:
-  uint32_t index_;
-};
-
-/// OpenNumberMatcher is a Matcher for an open number.
-/// The OpenNumberMatcher will match against any number (so long as it is
-/// consistent for the overload)
-class OpenNumberMatcher : public NumberMatcher {
- public:
-  explicit OpenNumberMatcher(uint32_t index) : index_(index) {}
-
-  Number Match(MatchState& state, Number number) const override {
-    if (number.IsAny()) {
-      return state.closed.Num(index_);
-    }
-    return state.closed.Num(index_, number) ? number : Number::invalid;
-  }
-
-  std::string String(MatchState& state) const override;
-
- private:
-  uint32_t index_;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// Binding functions for use in the generated intrinsic_table.inl
-// TODO(bclayton): See if we can move more of this hand-rolled code to the
-// template
-////////////////////////////////////////////////////////////////////////////////
-using TexelFormat = ast::TexelFormat;
-using Access = ast::Access;
-using StorageClass = ast::StorageClass;
-using ParameterUsage = sem::ParameterUsage;
-using PipelineStageSet = sem::PipelineStageSet;
-using PipelineStage = ast::PipelineStage;
-
-bool match_bool(const sem::Type* ty) {
-  return ty->IsAnyOf<Any, sem::Bool>();
-}
-
-const sem::Bool* build_bool(MatchState& state) {
-  return state.builder.create<sem::Bool>();
-}
-
-bool match_f32(const sem::Type* ty) {
-  return ty->IsAnyOf<Any, sem::F32>();
-}
-
-const sem::I32* build_i32(MatchState& state) {
-  return state.builder.create<sem::I32>();
-}
-
-bool match_i32(const sem::Type* ty) {
-  return ty->IsAnyOf<Any, sem::I32>();
-}
-
-const sem::U32* build_u32(MatchState& state) {
-  return state.builder.create<sem::U32>();
-}
-
-bool match_u32(const sem::Type* ty) {
-  return ty->IsAnyOf<Any, sem::U32>();
-}
-
-const sem::F32* build_f32(MatchState& state) {
-  return state.builder.create<sem::F32>();
-}
-
-bool match_vec(const sem::Type* ty, Number& N, const sem::Type*& T) {
-  if (ty->Is<Any>()) {
-    N = Number::any;
-    T = ty;
-    return true;
-  }
-
-  if (auto* v = ty->As<sem::Vector>()) {
-    N = v->Width();
-    T = v->type();
-    return true;
-  }
-  return false;
-}
-
-const sem::Vector* build_vec(MatchState& state, Number N, const sem::Type* el) {
-  return state.builder.create<sem::Vector>(el, N.Value());
-}
-
-template <int N>
-bool match_vec(const sem::Type* ty, const sem::Type*& T) {
-  if (ty->Is<Any>()) {
-    T = ty;
-    return true;
-  }
-
-  if (auto* v = ty->As<sem::Vector>()) {
-    if (v->Width() == N) {
-      T = v->type();
-      return true;
-    }
-  }
-  return false;
-}
-
-bool match_vec2(const sem::Type* ty, const sem::Type*& T) {
-  return match_vec<2>(ty, T);
-}
-
-const sem::Vector* build_vec2(MatchState& state, const sem::Type* T) {
-  return build_vec(state, Number(2), T);
-}
-
-bool match_vec3(const sem::Type* ty, const sem::Type*& T) {
-  return match_vec<3>(ty, T);
-}
-
-const sem::Vector* build_vec3(MatchState& state, const sem::Type* T) {
-  return build_vec(state, Number(3), T);
-}
-
-bool match_vec4(const sem::Type* ty, const sem::Type*& T) {
-  return match_vec<4>(ty, T);
-}
-
-const sem::Vector* build_vec4(MatchState& state, const sem::Type* T) {
-  return build_vec(state, Number(4), T);
-}
-
-bool match_mat(const sem::Type* ty, Number& M, Number& N, const sem::Type*& T) {
-  if (ty->Is<Any>()) {
-    M = Number::any;
-    N = Number::any;
-    T = ty;
-    return true;
-  }
-  if (auto* m = ty->As<sem::Matrix>()) {
-    M = m->columns();
-    N = m->ColumnType()->Width();
-    T = m->type();
-    return true;
-  }
-  return false;
-}
-
-const sem::Matrix* build_mat(MatchState& state,
-                             Number N,
-                             Number M,
-                             const sem::Type* T) {
-  auto* column_type = state.builder.create<sem::Vector>(T, M.Value());
-  return state.builder.create<sem::Matrix>(column_type, N.Value());
-}
-
-bool match_array(const sem::Type* ty, const sem::Type*& T) {
-  if (ty->Is<Any>()) {
-    T = ty;
-    return true;
-  }
-
-  if (auto* a = ty->As<sem::Array>()) {
-    if (a->Count() == 0) {
-      T = a->ElemType();
-      return true;
-    }
-  }
-  return false;
-}
-
-const sem::Array* build_array(MatchState& state, const sem::Type* el) {
-  return state.builder.create<sem::Array>(el,
-                                          /* count */ 0,
-                                          /* align */ 0,
-                                          /* size */ 0,
-                                          /* stride */ 0,
-                                          /* stride_implicit */ 0);
-}
-
-bool match_ptr(const sem::Type* ty, Number& S, const sem::Type*& T, Number& A) {
-  if (ty->Is<Any>()) {
-    S = Number::any;
-    T = ty;
-    A = Number::any;
-    return true;
-  }
-
-  if (auto* p = ty->As<sem::Pointer>()) {
-    S = Number(static_cast<uint32_t>(p->StorageClass()));
-    T = p->StoreType();
-    A = Number(static_cast<uint32_t>(p->Access()));
-    return true;
-  }
-  return false;
-}
-
-const sem::Pointer* build_ptr(MatchState& state,
-                              Number S,
-                              const sem::Type* T,
-                              Number& A) {
-  return state.builder.create<sem::Pointer>(
-      T, static_cast<ast::StorageClass>(S.Value()),
-      static_cast<ast::Access>(A.Value()));
-}
-
-bool match_atomic(const sem::Type* ty, const sem::Type*& T) {
-  if (ty->Is<Any>()) {
-    T = ty;
-    return true;
-  }
-
-  if (auto* a = ty->As<sem::Atomic>()) {
-    T = a->Type();
-    return true;
-  }
-  return false;
-}
-
-const sem::Atomic* build_atomic(MatchState& state, const sem::Type* T) {
-  return state.builder.create<sem::Atomic>(T);
-}
-
-bool match_sampler(const sem::Type* ty) {
-  if (ty->Is<Any>()) {
-    return true;
-  }
-  return ty->Is([](const sem::Sampler* s) {
-    return s->kind() == ast::SamplerKind::kSampler;
-  });
-}
-
-const sem::Sampler* build_sampler(MatchState& state) {
-  return state.builder.create<sem::Sampler>(ast::SamplerKind::kSampler);
-}
-
-bool match_sampler_comparison(const sem::Type* ty) {
-  if (ty->Is<Any>()) {
-    return true;
-  }
-  return ty->Is([](const sem::Sampler* s) {
-    return s->kind() == ast::SamplerKind::kComparisonSampler;
-  });
-}
-
-const sem::Sampler* build_sampler_comparison(MatchState& state) {
-  return state.builder.create<sem::Sampler>(
-      ast::SamplerKind::kComparisonSampler);
-}
-
-bool match_texture(const sem::Type* ty,
-                   ast::TextureDimension dim,
-                   const sem::Type*& T) {
-  if (ty->Is<Any>()) {
-    T = ty;
-    return true;
-  }
-  if (auto* v = ty->As<sem::SampledTexture>()) {
-    if (v->dim() == dim) {
-      T = v->type();
-      return true;
-    }
-  }
-  return false;
-}
-
-#define JOIN(a, b) a##b
-
-#define DECLARE_SAMPLED_TEXTURE(suffix, dim)                  \
-  bool JOIN(match_texture_, suffix)(const sem::Type* ty,      \
-                                    const sem::Type*& T) {    \
-    return match_texture(ty, dim, T);                         \
-  }                                                           \
-  const sem::SampledTexture* JOIN(build_texture_, suffix)(    \
-      MatchState & state, const sem::Type* T) {               \
-    return state.builder.create<sem::SampledTexture>(dim, T); \
-  }
-
-DECLARE_SAMPLED_TEXTURE(1d, ast::TextureDimension::k1d)
-DECLARE_SAMPLED_TEXTURE(2d, ast::TextureDimension::k2d)
-DECLARE_SAMPLED_TEXTURE(2d_array, ast::TextureDimension::k2dArray)
-DECLARE_SAMPLED_TEXTURE(3d, ast::TextureDimension::k3d)
-DECLARE_SAMPLED_TEXTURE(cube, ast::TextureDimension::kCube)
-DECLARE_SAMPLED_TEXTURE(cube_array, ast::TextureDimension::kCubeArray)
-#undef DECLARE_SAMPLED_TEXTURE
-
-bool match_texture_multisampled(const sem::Type* ty,
-                                ast::TextureDimension dim,
-                                const sem::Type*& T) {
-  if (ty->Is<Any>()) {
-    T = ty;
-    return true;
-  }
-  if (auto* v = ty->As<sem::MultisampledTexture>()) {
-    if (v->dim() == dim) {
-      T = v->type();
-      return true;
-    }
-  }
-  return false;
-}
-
-#define DECLARE_MULTISAMPLED_TEXTURE(suffix, dim)                            \
-  bool JOIN(match_texture_multisampled_, suffix)(const sem::Type* ty,        \
-                                                 const sem::Type*& T) {      \
-    return match_texture_multisampled(ty, dim, T);                           \
-  }                                                                          \
-  const sem::MultisampledTexture* JOIN(build_texture_multisampled_, suffix)( \
-      MatchState & state, const sem::Type* T) {                              \
-    return state.builder.create<sem::MultisampledTexture>(dim, T);           \
-  }
-
-DECLARE_MULTISAMPLED_TEXTURE(2d, ast::TextureDimension::k2d)
-#undef DECLARE_MULTISAMPLED_TEXTURE
-
-bool match_texture_depth(const sem::Type* ty, ast::TextureDimension dim) {
-  if (ty->Is<Any>()) {
-    return true;
-  }
-  return ty->Is([&](const sem::DepthTexture* t) { return t->dim() == dim; });
-}
-
-#define DECLARE_DEPTH_TEXTURE(suffix, dim)                       \
-  bool JOIN(match_texture_depth_, suffix)(const sem::Type* ty) { \
-    return match_texture_depth(ty, dim);                         \
-  }                                                              \
-  const sem::DepthTexture* JOIN(build_texture_depth_,            \
-                                suffix)(MatchState & state) {    \
-    return state.builder.create<sem::DepthTexture>(dim);         \
-  }
-
-DECLARE_DEPTH_TEXTURE(2d, ast::TextureDimension::k2d)
-DECLARE_DEPTH_TEXTURE(2d_array, ast::TextureDimension::k2dArray)
-DECLARE_DEPTH_TEXTURE(cube, ast::TextureDimension::kCube)
-DECLARE_DEPTH_TEXTURE(cube_array, ast::TextureDimension::kCubeArray)
-#undef DECLARE_DEPTH_TEXTURE
-
-bool match_texture_depth_multisampled_2d(const sem::Type* ty) {
-  if (ty->Is<Any>()) {
-    return true;
-  }
-  return ty->Is([&](const sem::DepthMultisampledTexture* t) {
-    return t->dim() == ast::TextureDimension::k2d;
-  });
-}
-
-sem::DepthMultisampledTexture* build_texture_depth_multisampled_2d(
-    MatchState& state) {
-  return state.builder.create<sem::DepthMultisampledTexture>(
-      ast::TextureDimension::k2d);
-}
-
-bool match_texture_storage(const sem::Type* ty,
-                           ast::TextureDimension dim,
-                           Number& F,
-                           Number& A) {
-  if (ty->Is<Any>()) {
-    F = Number::any;
-    A = Number::any;
-    return true;
-  }
-  if (auto* v = ty->As<sem::StorageTexture>()) {
-    if (v->dim() == dim) {
-      F = Number(static_cast<uint32_t>(v->texel_format()));
-      A = Number(static_cast<uint32_t>(v->access()));
-      return true;
-    }
-  }
-  return false;
-}
-
-#define DECLARE_STORAGE_TEXTURE(suffix, dim)                                  \
-  bool JOIN(match_texture_storage_, suffix)(const sem::Type* ty, Number& F,   \
-                                            Number& A) {                      \
-    return match_texture_storage(ty, dim, F, A);                              \
-  }                                                                           \
-  const sem::StorageTexture* JOIN(build_texture_storage_, suffix)(            \
-      MatchState & state, Number F, Number A) {                               \
-    auto format = static_cast<TexelFormat>(F.Value());                        \
-    auto access = static_cast<Access>(A.Value());                             \
-    auto* T = sem::StorageTexture::SubtypeFor(format, state.builder.Types()); \
-    return state.builder.create<sem::StorageTexture>(dim, format, access, T); \
-  }
-
-DECLARE_STORAGE_TEXTURE(1d, ast::TextureDimension::k1d)
-DECLARE_STORAGE_TEXTURE(2d, ast::TextureDimension::k2d)
-DECLARE_STORAGE_TEXTURE(2d_array, ast::TextureDimension::k2dArray)
-DECLARE_STORAGE_TEXTURE(3d, ast::TextureDimension::k3d)
-#undef DECLARE_STORAGE_TEXTURE
-
-bool match_texture_external(const sem::Type* ty) {
-  return ty->IsAnyOf<Any, sem::ExternalTexture>();
-}
-
-const sem::ExternalTexture* build_texture_external(MatchState& state) {
-  return state.builder.create<sem::ExternalTexture>();
-}
-
-// Builtin types starting with a _ prefix cannot be declared in WGSL, so they
-// can only be used as return types. Because of this, they must only match Any,
-// which is used as the return type matcher.
-bool match_modf_result(const sem::Type* ty) {
-  return ty->Is<Any>();
-}
-bool match_modf_result_vec(const sem::Type* ty, Number& N) {
-  if (!ty->Is<Any>()) {
-    return false;
-  }
-  N = Number::any;
-  return true;
-}
-bool match_frexp_result(const sem::Type* ty) {
-  return ty->Is<Any>();
-}
-bool match_frexp_result_vec(const sem::Type* ty, Number& N) {
-  if (!ty->Is<Any>()) {
-    return false;
-  }
-  N = Number::any;
-  return true;
-}
-
-struct NameAndType {
-  std::string name;
-  sem::Type* type;
-};
-const sem::Struct* build_struct(
-    MatchState& state,
-    std::string name,
-    std::initializer_list<NameAndType> member_names_and_types) {
-  uint32_t offset = 0;
-  uint32_t max_align = 0;
-  sem::StructMemberList members;
-  for (auto& m : member_names_and_types) {
-    uint32_t align = m.type->Align();
-    uint32_t size = m.type->Size();
-    offset = utils::RoundUp(align, offset);
-    max_align = std::max(max_align, align);
-    members.emplace_back(state.builder.create<sem::StructMember>(
-        /* declaration */ nullptr,
-        /* name */ state.builder.Sym(m.name),
-        /* type */ m.type,
-        /* index */ static_cast<uint32_t>(members.size()),
-        /* offset */ offset,
-        /* align */ align,
-        /* size */ size));
-    offset += size;
-  }
-  uint32_t size_without_padding = offset;
-  uint32_t size_with_padding = utils::RoundUp(max_align, offset);
-  return state.builder.create<sem::Struct>(
-      /* declaration */ nullptr,
-      /* name */ state.builder.Sym(name),
-      /* members */ members,
-      /* align */ max_align,
-      /* size */ size_with_padding,
-      /* size_no_padding */ size_without_padding);
-}
-
-const sem::Struct* build_modf_result(MatchState& state) {
-  auto* f32 = state.builder.create<sem::F32>();
-  return build_struct(state, "__modf_result", {{"fract", f32}, {"whole", f32}});
-}
-const sem::Struct* build_modf_result_vec(MatchState& state, Number& n) {
-  auto* vec_f32 = state.builder.create<sem::Vector>(
-      state.builder.create<sem::F32>(), n.Value());
-  return build_struct(state, "__modf_result_vec" + std::to_string(n.Value()),
-                      {{"fract", vec_f32}, {"whole", vec_f32}});
-}
-const sem::Struct* build_frexp_result(MatchState& state) {
-  auto* f32 = state.builder.create<sem::F32>();
-  auto* i32 = state.builder.create<sem::I32>();
-  return build_struct(state, "__frexp_result", {{"sig", f32}, {"exp", i32}});
-}
-const sem::Struct* build_frexp_result_vec(MatchState& state, Number& n) {
-  auto* vec_f32 = state.builder.create<sem::Vector>(
-      state.builder.create<sem::F32>(), n.Value());
-  auto* vec_i32 = state.builder.create<sem::Vector>(
-      state.builder.create<sem::I32>(), n.Value());
-  return build_struct(state, "__frexp_result_vec" + std::to_string(n.Value()),
-                      {{"sig", vec_f32}, {"exp", vec_i32}});
-}
-
-/// ParameterInfo describes a parameter
-struct ParameterInfo {
-  /// The parameter usage (parameter name in definition file)
-  const ParameterUsage usage;
-
-  /// Pointer to a list of indices that are used to match the parameter type.
-  /// The matcher indices index on Matchers::type and / or Matchers::number.
-  /// These indices are consumed by the matchers themselves.
-  /// The first index is always a TypeMatcher.
-  MatcherIndex const* const matcher_indices;
-};
-
-/// OpenTypeInfo describes an open type
-struct OpenTypeInfo {
-  /// Name of the open type (e.g. 'T')
-  const char* name;
-  /// Optional type matcher constraint.
-  /// Either an index in Matchers::type, or kNoMatcher
-  const MatcherIndex matcher_index;
-};
-
-/// OpenNumberInfo describes an open number
-struct OpenNumberInfo {
-  /// Name of the open number (e.g. 'N')
-  const char* name;
-  /// Optional number matcher constraint.
-  /// Either an index in Matchers::number, or kNoMatcher
-  const MatcherIndex matcher_index;
-};
-
-/// OverloadInfo describes a single function overload
-struct OverloadInfo {
-  /// Total number of parameters for the overload
-  const uint8_t num_parameters;
-  /// Total number of open types for the overload
-  const uint8_t num_open_types;
-  /// Total number of open numbers for the overload
-  const uint8_t num_open_numbers;
-  /// Pointer to the first open type
-  OpenTypeInfo const* const open_types;
-  /// Pointer to the first open number
-  OpenNumberInfo const* const open_numbers;
-  /// Pointer to the first parameter
-  ParameterInfo const* const parameters;
-  /// Pointer to a list of matcher indices that index on Matchers::type and
-  /// Matchers::number, used to build the return type. If the function has no
-  /// return type then this is null
-  MatcherIndex const* const return_matcher_indices;
-  /// The pipeline stages that this overload can be used in
-  PipelineStageSet supported_stages;
-  /// True if the overload is marked as deprecated
-  bool is_deprecated;
-};
-
-/// IntrinsicInfo describes an intrinsic function
-struct IntrinsicInfo {
-  /// Number of overloads of the intrinsic function
-  const uint8_t num_overloads;
-  /// Pointer to the start of the overloads for the function
-  OverloadInfo const* const overloads;
-};
-
-#include "intrinsic_table.inl"
-
-/// IntrinsicPrototype describes a fully matched intrinsic function, which is
-/// used as a lookup for building unique sem::Intrinsic instances.
-struct IntrinsicPrototype {
-  /// Parameter describes a single parameter
-  struct Parameter {
-    /// Parameter type
-    const sem::Type* const type;
-    /// Parameter usage
-    ParameterUsage const usage = ParameterUsage::kNone;
-  };
-
-  /// Hasher provides a hash function for the IntrinsicPrototype
-  struct Hasher {
-    /// @param i the IntrinsicPrototype to create a hash for
-    /// @return the hash value
-    inline std::size_t operator()(const IntrinsicPrototype& i) const {
-      size_t hash = utils::Hash(i.parameters.size());
-      for (auto& p : i.parameters) {
-        utils::HashCombine(&hash, p.type, p.usage);
-      }
-      return utils::Hash(hash, i.type, i.return_type, i.supported_stages,
-                         i.is_deprecated);
-    }
-  };
-
-  sem::IntrinsicType type = sem::IntrinsicType::kNone;
-  std::vector<Parameter> parameters;
-  sem::Type const* return_type = nullptr;
-  PipelineStageSet supported_stages;
-  bool is_deprecated = false;
-};
-
-/// Equality operator for IntrinsicPrototype
-bool operator==(const IntrinsicPrototype& a, const IntrinsicPrototype& b) {
-  if (a.type != b.type || a.supported_stages != b.supported_stages ||
-      a.return_type != b.return_type || a.is_deprecated != b.is_deprecated ||
-      a.parameters.size() != b.parameters.size()) {
-    return false;
-  }
-  for (size_t i = 0; i < a.parameters.size(); i++) {
-    auto& pa = a.parameters[i];
-    auto& pb = b.parameters[i];
-    if (pa.type != pb.type || pa.usage != pb.usage) {
-      return false;
-    }
-  }
-  return true;
-}
-
-/// Impl is the private implementation of the IntrinsicTable interface.
-class Impl : public IntrinsicTable {
- public:
-  explicit Impl(ProgramBuilder& builder);
-
-  const sem::Intrinsic* Lookup(sem::IntrinsicType intrinsic_type,
-                               const std::vector<const sem::Type*>& args,
-                               const Source& source) override;
-
- private:
-  const sem::Intrinsic* Match(sem::IntrinsicType intrinsic_type,
-                              const OverloadInfo& overload,
-                              const std::vector<const sem::Type*>& args,
-                              int& match_score);
-
-  MatchState Match(ClosedState& closed,
-                   const OverloadInfo& overload,
-                   MatcherIndex const* matcher_indices) const;
-
-  void PrintOverload(std::ostream& ss,
-                     const OverloadInfo& overload,
-                     sem::IntrinsicType intrinsic_type) const;
-
-  ProgramBuilder& builder;
-  Matchers matchers;
-  std::unordered_map<IntrinsicPrototype,
-                     sem::Intrinsic*,
-                     IntrinsicPrototype::Hasher>
-      intrinsics;
-};
-
-/// @return a string representing a call to an intrinsic with the given argument
-/// types.
-std::string CallSignature(ProgramBuilder& builder,
-                          sem::IntrinsicType intrinsic_type,
-                          const std::vector<const sem::Type*>& args) {
-  std::stringstream ss;
-  ss << sem::str(intrinsic_type) << "(";
-  {
-    bool first = true;
-    for (auto* arg : args) {
-      if (!first) {
-        ss << ", ";
-      }
-      first = false;
-      ss << arg->UnwrapRef()->FriendlyName(builder.Symbols());
-    }
-  }
-  ss << ")";
-
-  return ss.str();
-}
-
-std::string OpenTypeMatcher::String(MatchState& state) const {
-  return state.overload.open_types[index_].name;
-}
-
-std::string OpenNumberMatcher::String(MatchState& state) const {
-  return state.overload.open_numbers[index_].name;
-}
-
-Impl::Impl(ProgramBuilder& b) : builder(b) {}
-
-const sem::Intrinsic* Impl::Lookup(sem::IntrinsicType intrinsic_type,
-                                   const std::vector<const sem::Type*>& args,
-                                   const Source& source) {
-  // Candidate holds information about a mismatched overload that could be what
-  // the user intended to call.
-  struct Candidate {
-    const OverloadInfo* overload;
-    int score;
-  };
-
-  // The list of failed matches that had promise.
-  std::vector<Candidate> candidates;
-
-  auto& intrinsic = kIntrinsics[static_cast<uint32_t>(intrinsic_type)];
-  for (uint32_t o = 0; o < intrinsic.num_overloads; o++) {
-    int match_score = 1000;
-    auto& overload = intrinsic.overloads[o];
-    if (auto* match = Match(intrinsic_type, overload, args, match_score)) {
-      return match;
-    }
-    if (match_score > 0) {
-      candidates.emplace_back(Candidate{&overload, match_score});
-    }
-  }
-
-  // Sort the candidates with the most promising first
-  std::stable_sort(
-      candidates.begin(), candidates.end(),
-      [](const Candidate& a, const Candidate& b) { return a.score > b.score; });
-
-  // Generate an error message
-  std::stringstream ss;
-  ss << "no matching call to " << CallSignature(builder, intrinsic_type, args)
-     << std::endl;
-  if (!candidates.empty()) {
-    ss << std::endl;
-    ss << candidates.size() << " candidate function"
-       << (candidates.size() > 1 ? "s:" : ":") << std::endl;
-    for (auto& candidate : candidates) {
-      ss << "  ";
-      PrintOverload(ss, *candidate.overload, intrinsic_type);
-      ss << std::endl;
-    }
-  }
-  builder.Diagnostics().add_error(diag::System::Resolver, ss.str(), source);
-  return nullptr;
-}
-
-const sem::Intrinsic* Impl::Match(sem::IntrinsicType intrinsic_type,
-                                  const OverloadInfo& overload,
-                                  const std::vector<const sem::Type*>& args,
-                                  int& match_score) {
-  // Score wait for argument <-> parameter count matches / mismatches
-  constexpr int kScorePerParamArgMismatch = -1;
-  constexpr int kScorePerMatchedParam = 2;
-  constexpr int kScorePerMatchedOpenType = 1;
-  constexpr int kScorePerMatchedOpenNumber = 1;
-
-  auto num_parameters = overload.num_parameters;
-  auto num_arguments = static_cast<decltype(num_parameters)>(args.size());
-
-  bool overload_matched = true;
-
-  if (num_parameters != num_arguments) {
-    match_score +=
-        kScorePerParamArgMismatch * (std::max(num_parameters, num_arguments) -
-                                     std::min(num_parameters, num_arguments));
-    overload_matched = false;
-  }
-
-  ClosedState closed(builder);
-
-  std::vector<IntrinsicPrototype::Parameter> parameters;
-
-  auto num_params = std::min(num_parameters, num_arguments);
-  for (uint32_t p = 0; p < num_params; p++) {
-    auto& parameter = overload.parameters[p];
-    auto* indices = parameter.matcher_indices;
-    auto* type = Match(closed, overload, indices).Type(args[p]->UnwrapRef());
-    if (type) {
-      parameters.emplace_back(
-          IntrinsicPrototype::Parameter{type, parameter.usage});
-      match_score += kScorePerMatchedParam;
-    } else {
-      overload_matched = false;
-    }
-  }
-
-  if (overload_matched) {
-    // Check all constrained open types matched
-    for (uint32_t ot = 0; ot < overload.num_open_types; ot++) {
-      auto& open_type = overload.open_types[ot];
-      if (open_type.matcher_index != kNoMatcher) {
-        auto* index = &open_type.matcher_index;
-        if (Match(closed, overload, index).Type(closed.Type(ot))) {
-          match_score += kScorePerMatchedOpenType;
-        } else {
-          overload_matched = false;
-        }
-      }
-    }
-  }
-
-  if (overload_matched) {
-    // Check all constrained open numbers matched
-    for (uint32_t on = 0; on < overload.num_open_numbers; on++) {
-      auto& open_number = overload.open_numbers[on];
-      if (open_number.matcher_index != kNoMatcher) {
-        auto* index = &open_number.matcher_index;
-        if (Match(closed, overload, index).Num(closed.Num(on)).IsValid()) {
-          match_score += kScorePerMatchedOpenNumber;
-        } else {
-          overload_matched = false;
-        }
-      }
-    }
-  }
-
-  if (!overload_matched) {
-    return nullptr;
-  }
-
-  // Build the return type
-  const sem::Type* return_type = nullptr;
-  if (auto* indices = overload.return_matcher_indices) {
-    Any any;
-    return_type = Match(closed, overload, indices).Type(&any);
-    if (!return_type) {
-      std::stringstream ss;
-      PrintOverload(ss, overload, intrinsic_type);
-      TINT_ICE(Resolver, builder.Diagnostics())
-          << "MatchState.Match() returned null for " << ss.str();
-      return nullptr;
-    }
-  } else {
-    return_type = builder.create<sem::Void>();
-  }
-
-  IntrinsicPrototype intrinsic;
-  intrinsic.type = intrinsic_type;
-  intrinsic.return_type = return_type;
-  intrinsic.parameters = std::move(parameters);
-  intrinsic.supported_stages = overload.supported_stages;
-  intrinsic.is_deprecated = overload.is_deprecated;
-
-  // De-duplicate intrinsics that are identical.
-  return utils::GetOrCreate(intrinsics, intrinsic, [&] {
-    std::vector<sem::Parameter*> params;
-    params.reserve(intrinsic.parameters.size());
-    for (auto& p : intrinsic.parameters) {
-      params.emplace_back(builder.create<sem::Parameter>(
-          nullptr, static_cast<uint32_t>(params.size()), p.type,
-          ast::StorageClass::kNone, ast::Access::kUndefined, p.usage));
-    }
-    return builder.create<sem::Intrinsic>(
-        intrinsic.type, intrinsic.return_type, std::move(params),
-        intrinsic.supported_stages, intrinsic.is_deprecated);
-  });
-}
-
-MatchState Impl::Match(ClosedState& closed,
-                       const OverloadInfo& overload,
-                       MatcherIndex const* matcher_indices) const {
-  return MatchState(builder, closed, matchers, overload, matcher_indices);
-}
-
-void Impl::PrintOverload(std::ostream& ss,
-                         const OverloadInfo& overload,
-                         sem::IntrinsicType intrinsic_type) const {
-  ClosedState closed(builder);
-
-  ss << intrinsic_type << "(";
-  for (uint32_t p = 0; p < overload.num_parameters; p++) {
-    auto& parameter = overload.parameters[p];
-    if (p > 0) {
-      ss << ", ";
-    }
-    if (parameter.usage != ParameterUsage::kNone) {
-      ss << sem::str(parameter.usage) << ": ";
-    }
-    auto* indices = parameter.matcher_indices;
-    ss << Match(closed, overload, indices).TypeName();
-  }
-  ss << ")";
-  if (overload.return_matcher_indices) {
-    ss << " -> ";
-    auto* indices = overload.return_matcher_indices;
-    ss << Match(closed, overload, indices).TypeName();
-  }
-
-  bool first = true;
-  auto separator = [&] {
-    ss << (first ? "  where: " : ", ");
-    first = false;
-  };
-  for (uint32_t i = 0; i < overload.num_open_types; i++) {
-    auto& open_type = overload.open_types[i];
-    if (open_type.matcher_index != kNoMatcher) {
-      separator();
-      ss << open_type.name;
-      auto* index = &open_type.matcher_index;
-      ss << " is " << Match(closed, overload, index).TypeName();
-    }
-  }
-  for (uint32_t i = 0; i < overload.num_open_numbers; i++) {
-    auto& open_number = overload.open_numbers[i];
-    if (open_number.matcher_index != kNoMatcher) {
-      separator();
-      ss << open_number.name;
-      auto* index = &open_number.matcher_index;
-      ss << " is " << Match(closed, overload, index).NumName();
-    }
-  }
-}
-
-const sem::Type* MatchState::Type(const sem::Type* ty) {
-  MatcherIndex matcher_index = *matcher_indices_++;
-  auto* matcher = matchers.type[matcher_index];
-  return matcher->Match(*this, ty);
-}
-
-Number MatchState::Num(Number number) {
-  MatcherIndex matcher_index = *matcher_indices_++;
-  auto* matcher = matchers.number[matcher_index];
-  return matcher->Match(*this, number);
-}
-
-std::string MatchState::TypeName() {
-  MatcherIndex matcher_index = *matcher_indices_++;
-  auto* matcher = matchers.type[matcher_index];
-  return matcher->String(*this);
-}
-
-std::string MatchState::NumName() {
-  MatcherIndex matcher_index = *matcher_indices_++;
-  auto* matcher = matchers.number[matcher_index];
-  return matcher->String(*this);
-}
-
-}  // namespace
-
-std::unique_ptr<IntrinsicTable> IntrinsicTable::Create(
-    ProgramBuilder& builder) {
-  return std::make_unique<Impl>(builder);
-}
-
-IntrinsicTable::~IntrinsicTable() = default;
-
-/// TypeInfo for the Any type declared in the anonymous namespace above
-TINT_INSTANTIATE_TYPEINFO(Any);
-
-}  // namespace tint
diff --git a/src/intrinsic_table.h b/src/intrinsic_table.h
deleted file mode 100644
index 12532b6..0000000
--- a/src/intrinsic_table.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef SRC_INTRINSIC_TABLE_H_
-#define SRC_INTRINSIC_TABLE_H_
-
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "src/sem/intrinsic.h"
-
-namespace tint {
-
-// Forward declarations
-class ProgramBuilder;
-
-/// IntrinsicTable is a lookup table of all the WGSL intrinsic functions
-class IntrinsicTable {
- public:
-  /// @param builder the program builder
-  /// @return a pointer to a newly created IntrinsicTable
-  static std::unique_ptr<IntrinsicTable> Create(ProgramBuilder& builder);
-
-  /// Destructor
-  virtual ~IntrinsicTable();
-
-  /// Lookup looks for the intrinsic overload with the given signature, raising
-  /// an error diagnostic if the intrinsic was not found.
-  /// @param type the intrinsic type
-  /// @param args the argument types passed to the intrinsic function
-  /// @param source the source of the intrinsic call
-  /// @return the semantic intrinsic if found, otherwise nullptr
-  virtual const sem::Intrinsic* Lookup(
-      sem::IntrinsicType type,
-      const std::vector<const sem::Type*>& args,
-      const Source& source) = 0;
-};
-
-}  // namespace tint
-
-#endif  // SRC_INTRINSIC_TABLE_H_
diff --git a/src/intrinsic_table.inl b/src/intrinsic_table.inl
deleted file mode 100644
index a876cb0..0000000
--- a/src/intrinsic_table.inl
+++ /dev/null
@@ -1,9445 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   src/intrinsic_table.inl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-// clang-format off
-
-/// TypeMatcher for 'type bool'
-/// @see src/intrinsics.def:68:6
-class Bool : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Bool::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_bool(ty)) {
-    return nullptr;
-  }
-  return build_bool(state);
-}
-
-std::string Bool::String(MatchState&) const {
-  return "bool";
-}
-
-/// TypeMatcher for 'type f32'
-/// @see src/intrinsics.def:69:6
-class F32 : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* F32::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_f32(ty)) {
-    return nullptr;
-  }
-  return build_f32(state);
-}
-
-std::string F32::String(MatchState&) const {
-  return "f32";
-}
-
-/// TypeMatcher for 'type i32'
-/// @see src/intrinsics.def:70:6
-class I32 : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* I32::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_i32(ty)) {
-    return nullptr;
-  }
-  return build_i32(state);
-}
-
-std::string I32::String(MatchState&) const {
-  return "i32";
-}
-
-/// TypeMatcher for 'type u32'
-/// @see src/intrinsics.def:71:6
-class U32 : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* U32::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_u32(ty)) {
-    return nullptr;
-  }
-  return build_u32(state);
-}
-
-std::string U32::String(MatchState&) const {
-  return "u32";
-}
-
-/// TypeMatcher for 'type vec2'
-/// @see src/intrinsics.def:72:6
-class Vec2 : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Vec2::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_vec2(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_vec2(state, T);
-}
-
-std::string Vec2::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "vec2<" + T + ">";
-}
-
-/// TypeMatcher for 'type vec3'
-/// @see src/intrinsics.def:73:6
-class Vec3 : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Vec3::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_vec3(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_vec3(state, T);
-}
-
-std::string Vec3::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "vec3<" + T + ">";
-}
-
-/// TypeMatcher for 'type vec4'
-/// @see src/intrinsics.def:74:6
-class Vec4 : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Vec4::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_vec4(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_vec4(state, T);
-}
-
-std::string Vec4::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "vec4<" + T + ">";
-}
-
-/// TypeMatcher for 'type vec'
-/// @see src/intrinsics.def:75:37
-class Vec : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Vec::Match(MatchState& state, const sem::Type* ty) const {
-  Number N = Number::invalid;
-  const sem::Type* T = nullptr;
-  if (!match_vec(ty, N, T)) {
-    return nullptr;
-  }
-  N = state.Num(N);
-  if (!N.IsValid()) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_vec(state, N, T);
-}
-
-std::string Vec::String(MatchState& state) const {
-  const std::string N = state.NumName();
-  const std::string T = state.TypeName();
-  std::stringstream ss;
-  ss << "vec" << N << "<" << T << ">";
-  return ss.str();
-}
-
-/// TypeMatcher for 'type mat'
-/// @see src/intrinsics.def:76:37
-class Mat : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Mat::Match(MatchState& state, const sem::Type* ty) const {
-  Number N = Number::invalid;
-  Number M = Number::invalid;
-  const sem::Type* T = nullptr;
-  if (!match_mat(ty, N, M, T)) {
-    return nullptr;
-  }
-  N = state.Num(N);
-  if (!N.IsValid()) {
-    return nullptr;
-  }
-  M = state.Num(M);
-  if (!M.IsValid()) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_mat(state, N, M, T);
-}
-
-std::string Mat::String(MatchState& state) const {
-  const std::string N = state.NumName();
-  const std::string M = state.NumName();
-  const std::string T = state.TypeName();
-  std::stringstream ss;
-  ss << "mat" << N << "x" << M << "<" << T << ">";
-  return ss.str();
-}
-
-/// TypeMatcher for 'type ptr'
-/// @see src/intrinsics.def:77:6
-class Ptr : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Ptr::Match(MatchState& state, const sem::Type* ty) const {
-  Number S = Number::invalid;
-  const sem::Type* T = nullptr;
-  Number A = Number::invalid;
-  if (!match_ptr(ty, S, T, A)) {
-    return nullptr;
-  }
-  S = state.Num(S);
-  if (!S.IsValid()) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  A = state.Num(A);
-  if (!A.IsValid()) {
-    return nullptr;
-  }
-  return build_ptr(state, S, T, A);
-}
-
-std::string Ptr::String(MatchState& state) const {
-  const std::string S = state.NumName();
-  const std::string T = state.TypeName();
-  const std::string A = state.NumName();
-  return "ptr<" + S + ", " + T + ", " + A + ">";
-}
-
-/// TypeMatcher for 'type atomic'
-/// @see src/intrinsics.def:78:6
-class Atomic : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Atomic::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_atomic(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_atomic(state, T);
-}
-
-std::string Atomic::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "atomic<" + T + ">";
-}
-
-/// TypeMatcher for 'type array'
-/// @see src/intrinsics.def:79:6
-class Array : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Array::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_array(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_array(state, T);
-}
-
-std::string Array::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "array<" + T + ">";
-}
-
-/// TypeMatcher for 'type sampler'
-/// @see src/intrinsics.def:80:6
-class Sampler : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Sampler::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_sampler(ty)) {
-    return nullptr;
-  }
-  return build_sampler(state);
-}
-
-std::string Sampler::String(MatchState&) const {
-  return "sampler";
-}
-
-/// TypeMatcher for 'type sampler_comparison'
-/// @see src/intrinsics.def:81:6
-class SamplerComparison : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* SamplerComparison::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_sampler_comparison(ty)) {
-    return nullptr;
-  }
-  return build_sampler_comparison(state);
-}
-
-std::string SamplerComparison::String(MatchState&) const {
-  return "sampler_comparison";
-}
-
-/// TypeMatcher for 'type texture_1d'
-/// @see src/intrinsics.def:82:6
-class Texture1D : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Texture1D::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_texture_1d(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_texture_1d(state, T);
-}
-
-std::string Texture1D::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "texture_1d<" + T + ">";
-}
-
-/// TypeMatcher for 'type texture_2d'
-/// @see src/intrinsics.def:83:6
-class Texture2D : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Texture2D::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_texture_2d(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_texture_2d(state, T);
-}
-
-std::string Texture2D::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "texture_2d<" + T + ">";
-}
-
-/// TypeMatcher for 'type texture_2d_array'
-/// @see src/intrinsics.def:84:6
-class Texture2DArray : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Texture2DArray::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_texture_2d_array(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_texture_2d_array(state, T);
-}
-
-std::string Texture2DArray::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "texture_2d_array<" + T + ">";
-}
-
-/// TypeMatcher for 'type texture_3d'
-/// @see src/intrinsics.def:85:6
-class Texture3D : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Texture3D::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_texture_3d(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_texture_3d(state, T);
-}
-
-std::string Texture3D::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "texture_3d<" + T + ">";
-}
-
-/// TypeMatcher for 'type texture_cube'
-/// @see src/intrinsics.def:86:6
-class TextureCube : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureCube::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_texture_cube(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_texture_cube(state, T);
-}
-
-std::string TextureCube::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "texture_cube<" + T + ">";
-}
-
-/// TypeMatcher for 'type texture_cube_array'
-/// @see src/intrinsics.def:87:6
-class TextureCubeArray : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureCubeArray::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_texture_cube_array(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_texture_cube_array(state, T);
-}
-
-std::string TextureCubeArray::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "texture_cube_array<" + T + ">";
-}
-
-/// TypeMatcher for 'type texture_multisampled_2d'
-/// @see src/intrinsics.def:88:6
-class TextureMultisampled2D : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureMultisampled2D::Match(MatchState& state, const sem::Type* ty) const {
-  const sem::Type* T = nullptr;
-  if (!match_texture_multisampled_2d(ty, T)) {
-    return nullptr;
-  }
-  T = state.Type(T);
-  if (T == nullptr) {
-    return nullptr;
-  }
-  return build_texture_multisampled_2d(state, T);
-}
-
-std::string TextureMultisampled2D::String(MatchState& state) const {
-  const std::string T = state.TypeName();
-  return "texture_multisampled_2d<" + T + ">";
-}
-
-/// TypeMatcher for 'type texture_depth_2d'
-/// @see src/intrinsics.def:89:6
-class TextureDepth2D : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureDepth2D::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_texture_depth_2d(ty)) {
-    return nullptr;
-  }
-  return build_texture_depth_2d(state);
-}
-
-std::string TextureDepth2D::String(MatchState&) const {
-  return "texture_depth_2d";
-}
-
-/// TypeMatcher for 'type texture_depth_2d_array'
-/// @see src/intrinsics.def:90:6
-class TextureDepth2DArray : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureDepth2DArray::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_texture_depth_2d_array(ty)) {
-    return nullptr;
-  }
-  return build_texture_depth_2d_array(state);
-}
-
-std::string TextureDepth2DArray::String(MatchState&) const {
-  return "texture_depth_2d_array";
-}
-
-/// TypeMatcher for 'type texture_depth_cube'
-/// @see src/intrinsics.def:91:6
-class TextureDepthCube : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureDepthCube::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_texture_depth_cube(ty)) {
-    return nullptr;
-  }
-  return build_texture_depth_cube(state);
-}
-
-std::string TextureDepthCube::String(MatchState&) const {
-  return "texture_depth_cube";
-}
-
-/// TypeMatcher for 'type texture_depth_cube_array'
-/// @see src/intrinsics.def:92:6
-class TextureDepthCubeArray : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureDepthCubeArray::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_texture_depth_cube_array(ty)) {
-    return nullptr;
-  }
-  return build_texture_depth_cube_array(state);
-}
-
-std::string TextureDepthCubeArray::String(MatchState&) const {
-  return "texture_depth_cube_array";
-}
-
-/// TypeMatcher for 'type texture_depth_multisampled_2d'
-/// @see src/intrinsics.def:93:6
-class TextureDepthMultisampled2D : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureDepthMultisampled2D::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_texture_depth_multisampled_2d(ty)) {
-    return nullptr;
-  }
-  return build_texture_depth_multisampled_2d(state);
-}
-
-std::string TextureDepthMultisampled2D::String(MatchState&) const {
-  return "texture_depth_multisampled_2d";
-}
-
-/// TypeMatcher for 'type texture_storage_1d'
-/// @see src/intrinsics.def:94:6
-class TextureStorage1D : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureStorage1D::Match(MatchState& state, const sem::Type* ty) const {
-  Number F = Number::invalid;
-  Number A = Number::invalid;
-  if (!match_texture_storage_1d(ty, F, A)) {
-    return nullptr;
-  }
-  F = state.Num(F);
-  if (!F.IsValid()) {
-    return nullptr;
-  }
-  A = state.Num(A);
-  if (!A.IsValid()) {
-    return nullptr;
-  }
-  return build_texture_storage_1d(state, F, A);
-}
-
-std::string TextureStorage1D::String(MatchState& state) const {
-  const std::string F = state.NumName();
-  const std::string A = state.NumName();
-  return "texture_storage_1d<" + F + ", " + A + ">";
-}
-
-/// TypeMatcher for 'type texture_storage_2d'
-/// @see src/intrinsics.def:95:6
-class TextureStorage2D : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureStorage2D::Match(MatchState& state, const sem::Type* ty) const {
-  Number F = Number::invalid;
-  Number A = Number::invalid;
-  if (!match_texture_storage_2d(ty, F, A)) {
-    return nullptr;
-  }
-  F = state.Num(F);
-  if (!F.IsValid()) {
-    return nullptr;
-  }
-  A = state.Num(A);
-  if (!A.IsValid()) {
-    return nullptr;
-  }
-  return build_texture_storage_2d(state, F, A);
-}
-
-std::string TextureStorage2D::String(MatchState& state) const {
-  const std::string F = state.NumName();
-  const std::string A = state.NumName();
-  return "texture_storage_2d<" + F + ", " + A + ">";
-}
-
-/// TypeMatcher for 'type texture_storage_2d_array'
-/// @see src/intrinsics.def:96:6
-class TextureStorage2DArray : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureStorage2DArray::Match(MatchState& state, const sem::Type* ty) const {
-  Number F = Number::invalid;
-  Number A = Number::invalid;
-  if (!match_texture_storage_2d_array(ty, F, A)) {
-    return nullptr;
-  }
-  F = state.Num(F);
-  if (!F.IsValid()) {
-    return nullptr;
-  }
-  A = state.Num(A);
-  if (!A.IsValid()) {
-    return nullptr;
-  }
-  return build_texture_storage_2d_array(state, F, A);
-}
-
-std::string TextureStorage2DArray::String(MatchState& state) const {
-  const std::string F = state.NumName();
-  const std::string A = state.NumName();
-  return "texture_storage_2d_array<" + F + ", " + A + ">";
-}
-
-/// TypeMatcher for 'type texture_storage_3d'
-/// @see src/intrinsics.def:97:6
-class TextureStorage3D : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureStorage3D::Match(MatchState& state, const sem::Type* ty) const {
-  Number F = Number::invalid;
-  Number A = Number::invalid;
-  if (!match_texture_storage_3d(ty, F, A)) {
-    return nullptr;
-  }
-  F = state.Num(F);
-  if (!F.IsValid()) {
-    return nullptr;
-  }
-  A = state.Num(A);
-  if (!A.IsValid()) {
-    return nullptr;
-  }
-  return build_texture_storage_3d(state, F, A);
-}
-
-std::string TextureStorage3D::String(MatchState& state) const {
-  const std::string F = state.NumName();
-  const std::string A = state.NumName();
-  return "texture_storage_3d<" + F + ", " + A + ">";
-}
-
-/// TypeMatcher for 'type texture_external'
-/// @see src/intrinsics.def:98:6
-class TextureExternal : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* TextureExternal::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_texture_external(ty)) {
-    return nullptr;
-  }
-  return build_texture_external(state);
-}
-
-std::string TextureExternal::String(MatchState&) const {
-  return "texture_external";
-}
-
-/// TypeMatcher for 'type __modf_result'
-/// @see src/intrinsics.def:100:6
-class ModfResult : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* ModfResult::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_modf_result(ty)) {
-    return nullptr;
-  }
-  return build_modf_result(state);
-}
-
-std::string ModfResult::String(MatchState&) const {
-  return "__modf_result";
-}
-
-/// TypeMatcher for 'type __modf_result_vec'
-/// @see src/intrinsics.def:101:42
-class ModfResultVec : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* ModfResultVec::Match(MatchState& state, const sem::Type* ty) const {
-  Number N = Number::invalid;
-  if (!match_modf_result_vec(ty, N)) {
-    return nullptr;
-  }
-  N = state.Num(N);
-  if (!N.IsValid()) {
-    return nullptr;
-  }
-  return build_modf_result_vec(state, N);
-}
-
-std::string ModfResultVec::String(MatchState& state) const {
-  const std::string N = state.NumName();
-  std::stringstream ss;
-  ss << "__modf_result_vec" << N;
-  return ss.str();
-}
-
-/// TypeMatcher for 'type __frexp_result'
-/// @see src/intrinsics.def:102:6
-class FrexpResult : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* FrexpResult::Match(MatchState& state, const sem::Type* ty) const {
-  if (!match_frexp_result(ty)) {
-    return nullptr;
-  }
-  return build_frexp_result(state);
-}
-
-std::string FrexpResult::String(MatchState&) const {
-  return "__frexp_result";
-}
-
-/// TypeMatcher for 'type __frexp_result_vec'
-/// @see src/intrinsics.def:103:43
-class FrexpResultVec : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* FrexpResultVec::Match(MatchState& state, const sem::Type* ty) const {
-  Number N = Number::invalid;
-  if (!match_frexp_result_vec(ty, N)) {
-    return nullptr;
-  }
-  N = state.Num(N);
-  if (!N.IsValid()) {
-    return nullptr;
-  }
-  return build_frexp_result_vec(state, N);
-}
-
-std::string FrexpResultVec::String(MatchState& state) const {
-  const std::string N = state.NumName();
-  std::stringstream ss;
-  ss << "__frexp_result_vec" << N;
-  return ss.str();
-}
-
-/// TypeMatcher for 'match fiu32'
-/// @see src/intrinsics.def:111:7
-class Fiu32 : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules, and returns the
-  /// expected, canonicalized type on success.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Fiu32::Match(MatchState& state, const sem::Type* ty) const {
-  if (match_f32(ty)) {
-    return build_f32(state);
-  }
-  if (match_i32(ty)) {
-    return build_i32(state);
-  }
-  if (match_u32(ty)) {
-    return build_u32(state);
-  }
-  return nullptr;
-}
-
-std::string Fiu32::String(MatchState&) const {
-  return "f32, i32 or u32";
-}
-
-/// TypeMatcher for 'match iu32'
-/// @see src/intrinsics.def:112:7
-class Iu32 : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules, and returns the
-  /// expected, canonicalized type on success.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Iu32::Match(MatchState& state, const sem::Type* ty) const {
-  if (match_i32(ty)) {
-    return build_i32(state);
-  }
-  if (match_u32(ty)) {
-    return build_u32(state);
-  }
-  return nullptr;
-}
-
-std::string Iu32::String(MatchState&) const {
-  return "i32 or u32";
-}
-
-/// TypeMatcher for 'match scalar'
-/// @see src/intrinsics.def:113:7
-class Scalar : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules, and returns the
-  /// expected, canonicalized type on success.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* Scalar::Match(MatchState& state, const sem::Type* ty) const {
-  if (match_f32(ty)) {
-    return build_f32(state);
-  }
-  if (match_i32(ty)) {
-    return build_i32(state);
-  }
-  if (match_u32(ty)) {
-    return build_u32(state);
-  }
-  if (match_bool(ty)) {
-    return build_bool(state);
-  }
-  return nullptr;
-}
-
-std::string Scalar::String(MatchState&) const {
-  return "f32, i32, u32 or bool";
-}
-
-/// EnumMatcher for 'match f32_texel_format'
-/// @see src/intrinsics.def:124:7
-class F32TexelFormat : public NumberMatcher {
- public:
-  /// Checks whether the given number matches the enum matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param number the enum value as a Number
-  /// @return true if the enum value matches the set
-  Number Match(MatchState& state, Number number) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-Number F32TexelFormat::Match(MatchState&, Number number) const {
-  switch (static_cast<TexelFormat>(number.Value())) {
-    case TexelFormat::kRgba8Unorm:
-    case TexelFormat::kRgba8Snorm:
-    case TexelFormat::kRgba16Float:
-    case TexelFormat::kR32Float:
-    case TexelFormat::kRg32Float:
-    case TexelFormat::kRgba32Float:
-      return number;
-    default:
-      return Number::invalid;
-  }
-}
-
-std::string F32TexelFormat::String(MatchState&) const {
-  return "rgba8unorm, rgba8snorm, rgba16float, r32float, rg32float or rgba32float";
-}
-
-/// EnumMatcher for 'match i32_texel_format'
-/// @see src/intrinsics.def:126:7
-class I32TexelFormat : public NumberMatcher {
- public:
-  /// Checks whether the given number matches the enum matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param number the enum value as a Number
-  /// @return true if the enum value matches the set
-  Number Match(MatchState& state, Number number) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-Number I32TexelFormat::Match(MatchState&, Number number) const {
-  switch (static_cast<TexelFormat>(number.Value())) {
-    case TexelFormat::kRgba8Sint:
-    case TexelFormat::kRgba16Sint:
-    case TexelFormat::kR32Sint:
-    case TexelFormat::kRg32Sint:
-    case TexelFormat::kRgba32Sint:
-      return number;
-    default:
-      return Number::invalid;
-  }
-}
-
-std::string I32TexelFormat::String(MatchState&) const {
-  return "rgba8sint, rgba16sint, r32sint, rg32sint or rgba32sint";
-}
-
-/// EnumMatcher for 'match u32_texel_format'
-/// @see src/intrinsics.def:128:7
-class U32TexelFormat : public NumberMatcher {
- public:
-  /// Checks whether the given number matches the enum matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param number the enum value as a Number
-  /// @return true if the enum value matches the set
-  Number Match(MatchState& state, Number number) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-Number U32TexelFormat::Match(MatchState&, Number number) const {
-  switch (static_cast<TexelFormat>(number.Value())) {
-    case TexelFormat::kRgba8Uint:
-    case TexelFormat::kRgba16Uint:
-    case TexelFormat::kR32Uint:
-    case TexelFormat::kRg32Uint:
-    case TexelFormat::kRgba32Uint:
-      return number;
-    default:
-      return Number::invalid;
-  }
-}
-
-std::string U32TexelFormat::String(MatchState&) const {
-  return "rgba8uint, rgba16uint, r32uint, rg32uint or rgba32uint";
-}
-
-/// EnumMatcher for 'match write_only'
-/// @see src/intrinsics.def:131:7
-class WriteOnly : public NumberMatcher {
- public:
-  /// Checks whether the given number matches the enum matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param number the enum value as a Number
-  /// @return true if the enum value matches the set
-  Number Match(MatchState& state, Number number) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-Number WriteOnly::Match(MatchState&, Number number) const {
-  if (number.IsAny() || number.Value() == static_cast<uint32_t>(Access::kWrite)) {
-    return Number(static_cast<uint32_t>(Access::kWrite));
-  }
-  return Number::invalid;
-}
-
-std::string WriteOnly::String(MatchState&) const {
-  return "write";
-}
-
-/// EnumMatcher for 'match function_private_workgroup'
-/// @see src/intrinsics.def:133:7
-class FunctionPrivateWorkgroup : public NumberMatcher {
- public:
-  /// Checks whether the given number matches the enum matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param number the enum value as a Number
-  /// @return true if the enum value matches the set
-  Number Match(MatchState& state, Number number) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-Number FunctionPrivateWorkgroup::Match(MatchState&, Number number) const {
-  switch (static_cast<StorageClass>(number.Value())) {
-    case StorageClass::kFunction:
-    case StorageClass::kPrivate:
-    case StorageClass::kWorkgroup:
-      return number;
-    default:
-      return Number::invalid;
-  }
-}
-
-std::string FunctionPrivateWorkgroup::String(MatchState&) const {
-  return "function, private or workgroup";
-}
-
-/// EnumMatcher for 'match workgroup_or_storage'
-/// @see src/intrinsics.def:134:7
-class WorkgroupOrStorage : public NumberMatcher {
- public:
-  /// Checks whether the given number matches the enum matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param number the enum value as a Number
-  /// @return true if the enum value matches the set
-  Number Match(MatchState& state, Number number) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-Number WorkgroupOrStorage::Match(MatchState&, Number number) const {
-  switch (static_cast<StorageClass>(number.Value())) {
-    case StorageClass::kWorkgroup:
-    case StorageClass::kStorage:
-      return number;
-    default:
-      return Number::invalid;
-  }
-}
-
-std::string WorkgroupOrStorage::String(MatchState&) const {
-  return "workgroup or storage";
-}
-
-/// EnumMatcher for 'match storage'
-class Storage : public NumberMatcher {
- public:
-  /// Checks whether the given number matches the enum matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param number the enum value as a Number
-  /// @return true if the enum value matches the set
-  Number Match(MatchState& state, Number number) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-Number Storage::Match(MatchState&, Number number) const {
-  if (number.IsAny() || number.Value() == static_cast<uint32_t>(StorageClass::kStorage)) {
-    return Number(static_cast<uint32_t>(StorageClass::kStorage));
-  }
-  return Number::invalid;
-}
-
-std::string Storage::String(MatchState&) const {
-  return "storage";
-}
-
-/// EnumMatcher for 'match write'
-class Write : public NumberMatcher {
- public:
-  /// Checks whether the given number matches the enum matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param number the enum value as a Number
-  /// @return true if the enum value matches the set
-  Number Match(MatchState& state, Number number) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-Number Write::Match(MatchState&, Number number) const {
-  if (number.IsAny() || number.Value() == static_cast<uint32_t>(Access::kWrite)) {
-    return Number(static_cast<uint32_t>(Access::kWrite));
-  }
-  return Number::invalid;
-}
-
-std::string Write::String(MatchState&) const {
-  return "write";
-}
-
-/// EnumMatcher for 'match read_write'
-class ReadWrite : public NumberMatcher {
- public:
-  /// Checks whether the given number matches the enum matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param number the enum value as a Number
-  /// @return true if the enum value matches the set
-  Number Match(MatchState& state, Number number) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-Number ReadWrite::Match(MatchState&, Number number) const {
-  if (number.IsAny() || number.Value() == static_cast<uint32_t>(Access::kReadWrite)) {
-    return Number(static_cast<uint32_t>(Access::kReadWrite));
-  }
-  return Number::invalid;
-}
-
-std::string ReadWrite::String(MatchState&) const {
-  return "read_write";
-}
-
-/// Matchers holds type and number matchers
-class Matchers {
- private:
-  OpenTypeMatcher open_type_0_{0};
-  OpenNumberMatcher open_number_0_{0};
-  OpenNumberMatcher open_number_1_{1};
-  Bool Bool_;
-  F32 F32_;
-  I32 I32_;
-  U32 U32_;
-  Vec2 Vec2_;
-  Vec3 Vec3_;
-  Vec4 Vec4_;
-  Vec Vec_;
-  Mat Mat_;
-  Ptr Ptr_;
-  Atomic Atomic_;
-  Array Array_;
-  Sampler Sampler_;
-  SamplerComparison SamplerComparison_;
-  Texture1D Texture1D_;
-  Texture2D Texture2D_;
-  Texture2DArray Texture2DArray_;
-  Texture3D Texture3D_;
-  TextureCube TextureCube_;
-  TextureCubeArray TextureCubeArray_;
-  TextureMultisampled2D TextureMultisampled2D_;
-  TextureDepth2D TextureDepth2D_;
-  TextureDepth2DArray TextureDepth2DArray_;
-  TextureDepthCube TextureDepthCube_;
-  TextureDepthCubeArray TextureDepthCubeArray_;
-  TextureDepthMultisampled2D TextureDepthMultisampled2D_;
-  TextureStorage1D TextureStorage1D_;
-  TextureStorage2D TextureStorage2D_;
-  TextureStorage2DArray TextureStorage2DArray_;
-  TextureStorage3D TextureStorage3D_;
-  TextureExternal TextureExternal_;
-  ModfResult ModfResult_;
-  ModfResultVec ModfResultVec_;
-  FrexpResult FrexpResult_;
-  FrexpResultVec FrexpResultVec_;
-  Fiu32 Fiu32_;
-  Iu32 Iu32_;
-  Scalar Scalar_;
-  F32TexelFormat F32TexelFormat_;
-  I32TexelFormat I32TexelFormat_;
-  U32TexelFormat U32TexelFormat_;
-  WriteOnly WriteOnly_;
-  FunctionPrivateWorkgroup FunctionPrivateWorkgroup_;
-  WorkgroupOrStorage WorkgroupOrStorage_;
-  Storage Storage_;
-  Write Write_;
-  ReadWrite ReadWrite_;
-
- public:
-  /// Constructor
-  Matchers();
-  /// Destructor
-  ~Matchers();
-
-  /// The open-types, types, and type matchers
-  TypeMatcher const* const type[39] = {
-    /* [0] */ &open_type_0_,
-    /* [1] */ &Bool_,
-    /* [2] */ &F32_,
-    /* [3] */ &I32_,
-    /* [4] */ &U32_,
-    /* [5] */ &Vec2_,
-    /* [6] */ &Vec3_,
-    /* [7] */ &Vec4_,
-    /* [8] */ &Vec_,
-    /* [9] */ &Mat_,
-    /* [10] */ &Ptr_,
-    /* [11] */ &Atomic_,
-    /* [12] */ &Array_,
-    /* [13] */ &Sampler_,
-    /* [14] */ &SamplerComparison_,
-    /* [15] */ &Texture1D_,
-    /* [16] */ &Texture2D_,
-    /* [17] */ &Texture2DArray_,
-    /* [18] */ &Texture3D_,
-    /* [19] */ &TextureCube_,
-    /* [20] */ &TextureCubeArray_,
-    /* [21] */ &TextureMultisampled2D_,
-    /* [22] */ &TextureDepth2D_,
-    /* [23] */ &TextureDepth2DArray_,
-    /* [24] */ &TextureDepthCube_,
-    /* [25] */ &TextureDepthCubeArray_,
-    /* [26] */ &TextureDepthMultisampled2D_,
-    /* [27] */ &TextureStorage1D_,
-    /* [28] */ &TextureStorage2D_,
-    /* [29] */ &TextureStorage2DArray_,
-    /* [30] */ &TextureStorage3D_,
-    /* [31] */ &TextureExternal_,
-    /* [32] */ &ModfResult_,
-    /* [33] */ &ModfResultVec_,
-    /* [34] */ &FrexpResult_,
-    /* [35] */ &FrexpResultVec_,
-    /* [36] */ &Fiu32_,
-    /* [37] */ &Iu32_,
-    /* [38] */ &Scalar_,
-  };
-
-  /// The open-numbers, and number matchers
-  NumberMatcher const* const number[11] = {
-    /* [0] */ &open_number_0_,
-    /* [1] */ &open_number_1_,
-    /* [2] */ &F32TexelFormat_,
-    /* [3] */ &I32TexelFormat_,
-    /* [4] */ &U32TexelFormat_,
-    /* [5] */ &WriteOnly_,
-    /* [6] */ &FunctionPrivateWorkgroup_,
-    /* [7] */ &WorkgroupOrStorage_,
-    /* [8] */ &Storage_,
-    /* [9] */ &Write_,
-    /* [10] */ &ReadWrite_,
-  };
-};
-
-Matchers::Matchers() = default;
-Matchers::~Matchers() = default;
-
-constexpr MatcherIndex kMatcherIndices[] = {
-  /* [0] */ 10,
-  /* [1] */ 0,
-  /* [2] */ 11,
-  /* [3] */ 0,
-  /* [4] */ 10,
-  /* [5] */ 8,
-  /* [6] */ 12,
-  /* [7] */ 0,
-  /* [8] */ 0,
-  /* [9] */ 9,
-  /* [10] */ 1,
-  /* [11] */ 0,
-  /* [12] */ 2,
-  /* [13] */ 9,
-  /* [14] */ 0,
-  /* [15] */ 1,
-  /* [16] */ 2,
-  /* [17] */ 9,
-  /* [18] */ 0,
-  /* [19] */ 0,
-  /* [20] */ 2,
-  /* [21] */ 8,
-  /* [22] */ 0,
-  /* [23] */ 2,
-  /* [24] */ 8,
-  /* [25] */ 0,
-  /* [26] */ 1,
-  /* [27] */ 29,
-  /* [28] */ 0,
-  /* [29] */ 1,
-  /* [30] */ 30,
-  /* [31] */ 0,
-  /* [32] */ 1,
-  /* [33] */ 28,
-  /* [34] */ 0,
-  /* [35] */ 1,
-  /* [36] */ 27,
-  /* [37] */ 0,
-  /* [38] */ 1,
-  /* [39] */ 8,
-  /* [40] */ 0,
-  /* [41] */ 0,
-  /* [42] */ 30,
-  /* [43] */ 4,
-  /* [44] */ 9,
-  /* [45] */ 29,
-  /* [46] */ 4,
-  /* [47] */ 9,
-  /* [48] */ 28,
-  /* [49] */ 4,
-  /* [50] */ 9,
-  /* [51] */ 27,
-  /* [52] */ 4,
-  /* [53] */ 9,
-  /* [54] */ 30,
-  /* [55] */ 3,
-  /* [56] */ 9,
-  /* [57] */ 29,
-  /* [58] */ 3,
-  /* [59] */ 9,
-  /* [60] */ 28,
-  /* [61] */ 3,
-  /* [62] */ 9,
-  /* [63] */ 27,
-  /* [64] */ 3,
-  /* [65] */ 9,
-  /* [66] */ 30,
-  /* [67] */ 2,
-  /* [68] */ 9,
-  /* [69] */ 29,
-  /* [70] */ 2,
-  /* [71] */ 9,
-  /* [72] */ 28,
-  /* [73] */ 2,
-  /* [74] */ 9,
-  /* [75] */ 27,
-  /* [76] */ 2,
-  /* [77] */ 9,
-  /* [78] */ 8,
-  /* [79] */ 0,
-  /* [80] */ 3,
-  /* [81] */ 7,
-  /* [82] */ 4,
-  /* [83] */ 18,
-  /* [84] */ 2,
-  /* [85] */ 7,
-  /* [86] */ 2,
-  /* [87] */ 6,
-  /* [88] */ 2,
-  /* [89] */ 5,
-  /* [90] */ 3,
-  /* [91] */ 5,
-  /* [92] */ 2,
-  /* [93] */ 17,
-  /* [94] */ 2,
-  /* [95] */ 6,
-  /* [96] */ 3,
-  /* [97] */ 19,
-  /* [98] */ 2,
-  /* [99] */ 16,
-  /* [100] */ 2,
-  /* [101] */ 20,
-  /* [102] */ 2,
-  /* [103] */ 33,
-  /* [104] */ 0,
-  /* [105] */ 5,
-  /* [106] */ 0,
-  /* [107] */ 35,
-  /* [108] */ 0,
-  /* [109] */ 15,
-  /* [110] */ 0,
-  /* [111] */ 7,
-  /* [112] */ 3,
-  /* [113] */ 7,
-  /* [114] */ 0,
-  /* [115] */ 16,
-  /* [116] */ 0,
-  /* [117] */ 17,
-  /* [118] */ 0,
-  /* [119] */ 18,
-  /* [120] */ 0,
-  /* [121] */ 21,
-  /* [122] */ 0,
-  /* [123] */ 19,
-  /* [124] */ 0,
-  /* [125] */ 20,
-  /* [126] */ 0,
-  /* [127] */ 15,
-  /* [128] */ 2,
-  /* [129] */ 25,
-  /* [130] */ 23,
-  /* [131] */ 22,
-  /* [132] */ 24,
-  /* [133] */ 26,
-  /* [134] */ 13,
-  /* [135] */ 14,
-  /* [136] */ 31,
-  /* [137] */ 32,
-  /* [138] */ 34,
-};
-
-// Assert that the MatcherIndex is big enough to index all the matchers, plus
-// kNoMatcher.
-static_assert(static_cast<int>(sizeof(kMatcherIndices) / sizeof(kMatcherIndices[0])) <
-              static_cast<int>(std::numeric_limits<MatcherIndex>::max() - 1),
-              "MatcherIndex is not large enough to index kMatcherIndices");
-
-constexpr ParameterInfo kParameters[] = {
-  {
-    /* [0] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[93],
-  },
-  {
-    /* [1] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [2] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [3] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [4] */
-    /* usage */ ParameterUsage::kDdx,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [5] */
-    /* usage */ ParameterUsage::kDdy,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [6] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [7] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [8] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [9] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [10] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [11] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [12] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [13] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[101],
-  },
-  {
-    /* [14] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [15] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [16] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [17] */
-    /* usage */ ParameterUsage::kDdx,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [18] */
-    /* usage */ ParameterUsage::kDdy,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [19] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[93],
-  },
-  {
-    /* [20] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [21] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [22] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [23] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [24] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [25] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[93],
-  },
-  {
-    /* [26] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [27] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [28] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [29] */
-    /* usage */ ParameterUsage::kBias,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [30] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [31] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[93],
-  },
-  {
-    /* [32] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [33] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [34] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [35] */
-    /* usage */ ParameterUsage::kDdx,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [36] */
-    /* usage */ ParameterUsage::kDdy,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [37] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[99],
-  },
-  {
-    /* [38] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [39] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [40] */
-    /* usage */ ParameterUsage::kDdx,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [41] */
-    /* usage */ ParameterUsage::kDdy,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [42] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [43] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [44] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [45] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [46] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [47] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [48] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [49] */
-    /* usage */ ParameterUsage::kComponent,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [50] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[117],
-  },
-  {
-    /* [51] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [52] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [53] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [54] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [55] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [56] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [57] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [58] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [59] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [60] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [61] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [62] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [63] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [64] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [65] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [66] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [67] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[83],
-  },
-  {
-    /* [68] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [69] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [70] */
-    /* usage */ ParameterUsage::kDdx,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [71] */
-    /* usage */ ParameterUsage::kDdy,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [72] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[95],
-  },
-  {
-    /* [73] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [74] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [75] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [76] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [77] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [78] */
-    /* usage */ ParameterUsage::kComponent,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [79] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[125],
-  },
-  {
-    /* [80] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [81] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [82] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [83] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [84] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [85] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [86] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [87] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [88] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[129],
-  },
-  {
-    /* [89] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [90] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [91] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [92] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [93] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [94] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [95] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [96] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [97] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [98] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[93],
-  },
-  {
-    /* [99] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [100] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [101] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [102] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [103] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [104] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [105] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [106] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [107] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [108] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [109] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [110] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [111] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [112] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [113] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[101],
-  },
-  {
-    /* [114] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [115] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [116] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [117] */
-    /* usage */ ParameterUsage::kBias,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [118] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [119] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [120] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [121] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [122] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [123] */
-    /* usage */ ParameterUsage::kComponent,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [124] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[117],
-  },
-  {
-    /* [125] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [126] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [127] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [128] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[129],
-  },
-  {
-    /* [129] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [130] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [131] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [132] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [133] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[129],
-  },
-  {
-    /* [134] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [135] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [136] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [137] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [138] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[129],
-  },
-  {
-    /* [139] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [140] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [141] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [142] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [143] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[99],
-  },
-  {
-    /* [144] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [145] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [146] */
-    /* usage */ ParameterUsage::kDdx,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [147] */
-    /* usage */ ParameterUsage::kDdy,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [148] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [149] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [150] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [151] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [152] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [153] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [154] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [155] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [156] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [157] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [158] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [159] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [160] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [161] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [162] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [163] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[101],
-  },
-  {
-    /* [164] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [165] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [166] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [167] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [168] */
-    /* usage */ ParameterUsage::kComponent,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [169] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[115],
-  },
-  {
-    /* [170] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [171] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [172] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [173] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[83],
-  },
-  {
-    /* [174] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [175] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [176] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [177] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[95],
-  },
-  {
-    /* [178] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[83],
-  },
-  {
-    /* [179] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [180] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [181] */
-    /* usage */ ParameterUsage::kBias,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [182] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[95],
-  },
-  {
-    /* [183] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[93],
-  },
-  {
-    /* [184] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [185] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [186] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [187] */
-    /* usage */ ParameterUsage::kBias,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [188] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[93],
-  },
-  {
-    /* [189] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [190] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [191] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [192] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [193] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[99],
-  },
-  {
-    /* [194] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [195] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [196] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [197] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [198] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[83],
-  },
-  {
-    /* [199] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [200] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [201] */
-    /* usage */ ParameterUsage::kDdx,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [202] */
-    /* usage */ ParameterUsage::kDdy,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [203] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[99],
-  },
-  {
-    /* [204] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [205] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [206] */
-    /* usage */ ParameterUsage::kBias,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [207] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [208] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[97],
-  },
-  {
-    /* [209] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [210] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [211] */
-    /* usage */ ParameterUsage::kDdx,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [212] */
-    /* usage */ ParameterUsage::kDdy,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [213] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [214] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [215] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [216] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [217] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [218] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[99],
-  },
-  {
-    /* [219] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [220] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [221] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [222] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[83],
-  },
-  {
-    /* [223] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [224] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [225] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [226] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[97],
-  },
-  {
-    /* [227] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [228] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [229] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [230] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [231] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [232] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [233] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [234] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[99],
-  },
-  {
-    /* [235] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [236] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [237] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [238] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[132],
-  },
-  {
-    /* [239] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [240] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [241] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [242] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[132],
-  },
-  {
-    /* [243] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [244] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [245] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [246] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[93],
-  },
-  {
-    /* [247] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [248] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [249] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [250] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[69],
-  },
-  {
-    /* [251] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [252] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [253] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[85],
-  },
-  {
-    /* [254] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [255] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [256] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [257] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [258] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[129],
-  },
-  {
-    /* [259] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [260] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [261] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [262] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[83],
-  },
-  {
-    /* [263] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [264] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [265] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[95],
-  },
-  {
-    /* [266] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[97],
-  },
-  {
-    /* [267] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [268] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [269] */
-    /* usage */ ParameterUsage::kBias,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [270] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [271] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [272] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [273] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [274] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [275] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [276] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [277] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [278] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[132],
-  },
-  {
-    /* [279] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [280] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [281] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [282] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[57],
-  },
-  {
-    /* [283] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [284] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [285] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[111],
-  },
-  {
-    /* [286] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [287] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [288] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [289] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [290] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[45],
-  },
-  {
-    /* [291] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [292] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [293] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[81],
-  },
-  {
-    /* [294] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [295] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [296] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [297] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [298] */
-    /* usage */ ParameterUsage::kComponent,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [299] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[123],
-  },
-  {
-    /* [300] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [301] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [302] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[117],
-  },
-  {
-    /* [303] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [304] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [305] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [306] */
-    /* usage */ ParameterUsage::kComponent,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [307] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[115],
-  },
-  {
-    /* [308] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [309] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [310] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[101],
-  },
-  {
-    /* [311] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [312] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [313] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [314] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[83],
-  },
-  {
-    /* [315] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [316] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [317] */
-    /* usage */ ParameterUsage::kBias,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [318] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [319] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [320] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [321] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [322] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[132],
-  },
-  {
-    /* [323] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[135],
-  },
-  {
-    /* [324] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [325] */
-    /* usage */ ParameterUsage::kDepthRef,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [326] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[99],
-  },
-  {
-    /* [327] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [328] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [329] */
-    /* usage */ ParameterUsage::kBias,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [330] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[129],
-  },
-  {
-    /* [331] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [332] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [333] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [334] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [335] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [336] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [337] */
-    /* usage */ ParameterUsage::kOffset,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [338] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [339] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [340] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [341] */
-    /* usage */ ParameterUsage::kArrayIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [342] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[54],
-  },
-  {
-    /* [343] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[95],
-  },
-  {
-    /* [344] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[111],
-  },
-  {
-    /* [345] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[132],
-  },
-  {
-    /* [346] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [347] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [348] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [349] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [350] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [351] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [352] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [353] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [354] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[97],
-  },
-  {
-    /* [355] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [356] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [357] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [358] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [359] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [360] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[83],
-  },
-  {
-    /* [361] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [362] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [363] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [364] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [365] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [366] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [367] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [368] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [369] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [370] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [371] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [372] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[99],
-  },
-  {
-    /* [373] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [374] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [375] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[127],
-  },
-  {
-    /* [376] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [377] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [378] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[136],
-  },
-  {
-    /* [379] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [380] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [381] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [382] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [383] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [384] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [385] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [386] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [387] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [388] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [389] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [390] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[75],
-  },
-  {
-    /* [391] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [392] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[85],
-  },
-  {
-    /* [393] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[72],
-  },
-  {
-    /* [394] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [395] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[85],
-  },
-  {
-    /* [396] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[66],
-  },
-  {
-    /* [397] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[95],
-  },
-  {
-    /* [398] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[85],
-  },
-  {
-    /* [399] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [400] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [401] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [402] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [403] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [404] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [405] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[132],
-  },
-  {
-    /* [406] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [407] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [408] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[63],
-  },
-  {
-    /* [409] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [410] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[111],
-  },
-  {
-    /* [411] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[60],
-  },
-  {
-    /* [412] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [413] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[111],
-  },
-  {
-    /* [414] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[51],
-  },
-  {
-    /* [415] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [416] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[81],
-  },
-  {
-    /* [417] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [418] */
-    /* usage */ ParameterUsage::kSampler,
-    /* matcher indices */ &kMatcherIndices[134],
-  },
-  {
-    /* [419] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [420] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[48],
-  },
-  {
-    /* [421] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [422] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[81],
-  },
-  {
-    /* [423] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[42],
-  },
-  {
-    /* [424] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[95],
-  },
-  {
-    /* [425] */
-    /* usage */ ParameterUsage::kValue,
-    /* matcher indices */ &kMatcherIndices[81],
-  },
-  {
-    /* [426] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[109],
-  },
-  {
-    /* [427] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [428] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [429] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [430] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [431] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [432] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[115],
-  },
-  {
-    /* [433] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [434] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [435] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[119],
-  },
-  {
-    /* [436] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[95],
-  },
-  {
-    /* [437] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [438] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[121],
-  },
-  {
-    /* [439] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [440] */
-    /* usage */ ParameterUsage::kSampleIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [441] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [442] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [443] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [444] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [445] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [446] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[10],
-  },
-  {
-    /* [447] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [448] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [449] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[10],
-  },
-  {
-    /* [450] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[133],
-  },
-  {
-    /* [451] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [452] */
-    /* usage */ ParameterUsage::kSampleIndex,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [453] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [454] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [455] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [456] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [457] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [458] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[24],
-  },
-  {
-    /* [459] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [460] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [461] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [462] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [463] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [464] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [465] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [466] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [467] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [468] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [469] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [470] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [471] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [472] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [473] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [474] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [475] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [476] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [477] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [478] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [479] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [480] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [481] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[136],
-  },
-  {
-    /* [482] */
-    /* usage */ ParameterUsage::kCoords,
-    /* matcher indices */ &kMatcherIndices[89],
-  },
-  {
-    /* [483] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [484] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [485] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [486] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [487] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [488] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[87],
-  },
-  {
-    /* [489] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [490] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [491] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [492] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [493] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [494] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [495] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [496] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [497] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [498] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[78],
-  },
-  {
-    /* [499] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [500] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [501] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [502] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [503] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[129],
-  },
-  {
-    /* [504] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [505] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [506] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [507] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [508] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [509] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[109],
-  },
-  {
-    /* [510] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [511] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [512] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [513] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[115],
-  },
-  {
-    /* [514] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [515] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [516] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [517] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[117],
-  },
-  {
-    /* [518] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [519] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [520] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [521] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[119],
-  },
-  {
-    /* [522] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [523] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [524] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [525] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[123],
-  },
-  {
-    /* [526] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [527] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[132],
-  },
-  {
-    /* [528] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [529] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[125],
-  },
-  {
-    /* [530] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [531] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [532] */
-    /* usage */ ParameterUsage::kLevel,
-    /* matcher indices */ &kMatcherIndices[55],
-  },
-  {
-    /* [533] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[43],
-  },
-  {
-    /* [534] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [535] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [536] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[121],
-  },
-  {
-    /* [537] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[132],
-  },
-  {
-    /* [538] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[125],
-  },
-  {
-    /* [539] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[129],
-  },
-  {
-    /* [540] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [541] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[133],
-  },
-  {
-    /* [542] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[36],
-  },
-  {
-    /* [543] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[33],
-  },
-  {
-    /* [544] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[27],
-  },
-  {
-    /* [545] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[30],
-  },
-  {
-    /* [546] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[136],
-  },
-  {
-    /* [547] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [548] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [549] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [550] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [551] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [552] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [553] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[119],
-  },
-  {
-    /* [554] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[117],
-  },
-  {
-    /* [555] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[85],
-  },
-  {
-    /* [556] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[85],
-  },
-  {
-    /* [557] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [558] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [559] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[91],
-  },
-  {
-    /* [560] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [561] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [562] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[115],
-  },
-  {
-    /* [563] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[123],
-  },
-  {
-    /* [564] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[109],
-  },
-  {
-    /* [565] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[117],
-  },
-  {
-    /* [566] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[125],
-  },
-  {
-    /* [567] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [568] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[129],
-  },
-  {
-    /* [569] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[27],
-  },
-  {
-    /* [570] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[109],
-  },
-  {
-    /* [571] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[115],
-  },
-  {
-    /* [572] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[117],
-  },
-  {
-    /* [573] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[119],
-  },
-  {
-    /* [574] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[123],
-  },
-  {
-    /* [575] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[125],
-  },
-  {
-    /* [576] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[131],
-  },
-  {
-    /* [577] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[130],
-  },
-  {
-    /* [578] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[132],
-  },
-  {
-    /* [579] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[129],
-  },
-  {
-    /* [580] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[121],
-  },
-  {
-    /* [581] */
-    /* usage */ ParameterUsage::kTexture,
-    /* matcher indices */ &kMatcherIndices[133],
-  },
-  {
-    /* [582] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[43],
-  },
-  {
-    /* [583] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[43],
-  },
-  {
-    /* [584] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [585] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [586] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [587] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [588] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [589] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [590] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [591] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[43],
-  },
-  {
-    /* [592] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[43],
-  },
-  {
-    /* [593] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [594] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [595] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [596] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [597] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [598] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [599] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [600] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [601] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [602] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [603] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [604] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [605] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [606] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [607] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [608] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [609] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [610] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [611] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [612] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [613] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [614] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [615] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [616] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [617] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [618] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [619] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [620] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [621] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [622] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [623] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [624] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [625] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [626] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [627] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [628] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [629] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [630] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [631] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [632] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [633] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[13],
-  },
-  {
-    /* [634] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[17],
-  },
-  {
-    /* [635] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [636] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [637] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [638] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [639] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-  {
-    /* [640] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [641] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [642] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [643] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [644] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [645] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [646] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [647] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [648] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [649] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [650] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [651] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [652] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[4],
-  },
-  {
-    /* [653] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[24],
-  },
-  {
-    /* [654] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[10],
-  },
-  {
-    /* [655] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[24],
-  },
-  {
-    /* [656] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[10],
-  },
-  {
-    /* [657] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [658] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [659] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[39],
-  },
-  {
-    /* [660] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [661] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[0],
-  },
-  {
-    /* [662] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [663] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [664] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [665] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [666] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [667] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[12],
-  },
-  {
-    /* [668] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[21],
-  },
-  {
-    /* [669] */
-    /* usage */ ParameterUsage::kNone,
-    /* matcher indices */ &kMatcherIndices[1],
-  },
-};
-
-constexpr OpenTypeInfo kOpenTypes[] = {
-  {
-    /* [0] */
-    /* name */ "T",
-    /* matcher index */ 36,
-  },
-  {
-    /* [1] */
-    /* name */ "T",
-    /* matcher index */ 37,
-  },
-  {
-    /* [2] */
-    /* name */ "T",
-    /* matcher index */ kNoMatcher,
-  },
-  {
-    /* [3] */
-    /* name */ "T",
-    /* matcher index */ 38,
-  },
-};
-
-constexpr OpenNumberInfo kOpenNumbers[] = {
-  {
-    /* [0] */
-    /* name */ "F",
-    /* matcher index */ kNoMatcher,
-  },
-  {
-    /* [1] */
-    /* name */ "A",
-    /* matcher index */ 5,
-  },
-  {
-    /* [2] */
-    /* name */ "M",
-    /* matcher index */ kNoMatcher,
-  },
-  {
-    /* [3] */
-    /* name */ "N",
-    /* matcher index */ kNoMatcher,
-  },
-  {
-    /* [4] */
-    /* name */ "A",
-    /* matcher index */ kNoMatcher,
-  },
-  {
-    /* [5] */
-    /* name */ "S",
-    /* matcher index */ 7,
-  },
-};
-
-constexpr OverloadInfo kOverloads[] = {
-  {
-    /* [0] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[564],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [1] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[509],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [2] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[562],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [3] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[513],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [4] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[554],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [5] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[517],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [6] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[553],
-    /* return matcher indices */ &kMatcherIndices[95],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [7] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[521],
-    /* return matcher indices */ &kMatcherIndices[95],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [8] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[563],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [9] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[525],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [10] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[538],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [11] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[529],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [12] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[536],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [13] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[534],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [14] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[459],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [15] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[535],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [16] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[531],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [17] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[537],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [18] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[527],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [19] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[539],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [20] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[503],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [21] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[541],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [22] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 2,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[0],
-    /* parameters */ &kParameters[542],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [23] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 2,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[0],
-    /* parameters */ &kParameters[543],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [24] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 2,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[0],
-    /* parameters */ &kParameters[544],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [25] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 2,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[0],
-    /* parameters */ &kParameters[545],
-    /* return matcher indices */ &kMatcherIndices[95],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [26] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[546],
-    /* return matcher indices */ &kMatcherIndices[89],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [27] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[375],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [28] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[372],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [29] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[234],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [30] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[246],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [31] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[98],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [32] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[360],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [33] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[262],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [34] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[354],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [35] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[310],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [36] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[348],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [37] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[334],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [38] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[338],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [39] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[158],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [40] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[345],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [41] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[330],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [42] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[218],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [43] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[193],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [44] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[188],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [45] */
-    /* num parameters */ 6,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[19],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [46] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[222],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [47] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[173],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [48] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[226],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [49] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[163],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [50] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[230],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [51] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[153],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [52] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[148],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [53] */
-    /* num parameters */ 6,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[7],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [54] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[238],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [55] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[133],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [56] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[378],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [57] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[390],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [58] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[393],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [59] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[250],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [60] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[396],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [61] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[408],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [62] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[411],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [63] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[282],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [64] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[342],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [65] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[414],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [66] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[420],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [67] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[290],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [68] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[423],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [69] */
-    /* num parameters */ 4,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[306],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [70] */
-    /* num parameters */ 5,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[168],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [71] */
-    /* num parameters */ 5,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[123],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [72] */
-    /* num parameters */ 6,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[49],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [73] */
-    /* num parameters */ 4,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[298],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [74] */
-    /* num parameters */ 5,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[78],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [75] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[417],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [76] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[286],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [77] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[274],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [78] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[93],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [79] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[405],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [80] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[258],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [81] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[570],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [82] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[571],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [83] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[572],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [84] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[573],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [85] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[574],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [86] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[575],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [87] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[576],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [88] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[577],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [89] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[578],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [90] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[579],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [91] */
-    /* num parameters */ 3,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[426],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [92] */
-    /* num parameters */ 3,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[432],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [93] */
-    /* num parameters */ 4,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[302],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [94] */
-    /* num parameters */ 3,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[435],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [95] */
-    /* num parameters */ 3,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[438],
-    /* return matcher indices */ &kMatcherIndices[113],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [96] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[441],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [97] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[318],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [98] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[450],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [99] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[481],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [100] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[326],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [101] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[203],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [102] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[183],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [103] */
-    /* num parameters */ 6,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[25],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [104] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[314],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [105] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[178],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [106] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[266],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [107] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[113],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [108] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[143],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [109] */
-    /* num parameters */ 6,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[37],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [110] */
-    /* num parameters */ 6,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[31],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [111] */
-    /* num parameters */ 7,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[0],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [112] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[198],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [113] */
-    /* num parameters */ 6,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[67],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [114] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[208],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [115] */
-    /* num parameters */ 6,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[13],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [116] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[254],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [117] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[108],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [118] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[118],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [119] */
-    /* num parameters */ 6,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[43],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [120] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[322],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [121] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[128],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [122] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[294],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [123] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[83],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [124] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[73],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [125] */
-    /* num parameters */ 6,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[61],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [126] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[278],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [127] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[88],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [128] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[270],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [129] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[213],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [130] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[103],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [131] */
-    /* num parameters */ 6,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[55],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [132] */
-    /* num parameters */ 4,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[242],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [133] */
-    /* num parameters */ 5,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[138],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [134] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[565],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [135] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[566],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [136] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[567],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [137] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[568],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [138] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 2,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[0],
-    /* parameters */ &kParameters[569],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [139] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[381],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [140] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[384],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [141] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[387],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [142] */
-    /* num parameters */ 3,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[3],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[444],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [143] */
-    /* num parameters */ 3,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[3],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[447],
-    /* return matcher indices */ &kMatcherIndices[39],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [144] */
-    /* num parameters */ 3,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[3],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[456],
-    /* return matcher indices */ &kMatcherIndices[39],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [145] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[602],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [146] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[601],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [147] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[489],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [148] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[491],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [149] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[636],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [150] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[635],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [151] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[630],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [152] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[629],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [153] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[628],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [154] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[627],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [155] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[626],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [156] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[625],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [157] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[624],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [158] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[623],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [159] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[622],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [160] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[621],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [161] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[620],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [162] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[619],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [163] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[618],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [164] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[617],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [165] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[616],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [166] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[615],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [167] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[639],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [168] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[638],
-    /* return matcher indices */ &kMatcherIndices[39],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [169] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[614],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [170] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[613],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [171] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[363],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [172] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[357],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [173] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[612],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [174] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[611],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [175] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[610],
-    /* return matcher indices */ &kMatcherIndices[138],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [176] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[609],
-    /* return matcher indices */ &kMatcherIndices[107],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [177] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[608],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [178] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[607],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [179] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[606],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [180] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[605],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [181] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[604],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [182] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[603],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [183] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[641],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [184] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[640],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [185] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[600],
-    /* return matcher indices */ &kMatcherIndices[10],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ true,
-  },
-  {
-    /* [186] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[599],
-    /* return matcher indices */ &kMatcherIndices[24],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ true,
-  },
-  {
-    /* [187] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[598],
-    /* return matcher indices */ &kMatcherIndices[10],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ true,
-  },
-  {
-    /* [188] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[597],
-    /* return matcher indices */ &kMatcherIndices[24],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ true,
-  },
-  {
-    /* [189] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[596],
-    /* return matcher indices */ &kMatcherIndices[10],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ true,
-  },
-  {
-    /* [190] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[595],
-    /* return matcher indices */ &kMatcherIndices[24],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ true,
-  },
-  {
-    /* [191] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[594],
-    /* return matcher indices */ &kMatcherIndices[10],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ true,
-  },
-  {
-    /* [192] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[593],
-    /* return matcher indices */ &kMatcherIndices[24],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ true,
-  },
-  {
-    /* [193] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[495],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [194] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[497],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [195] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[590],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [196] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[589],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [197] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[588],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [198] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[587],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [199] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[586],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [200] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[585],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [201] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[511],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [202] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[499],
-    /* return matcher indices */ &kMatcherIndices[39],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [203] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[501],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [204] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[507],
-    /* return matcher indices */ &kMatcherIndices[39],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [205] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[643],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [206] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[642],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [207] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[584],
-    /* return matcher indices */ &kMatcherIndices[137],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [208] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[561],
-    /* return matcher indices */ &kMatcherIndices[103],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [209] */
-    /* num parameters */ 3,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[402],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [210] */
-    /* num parameters */ 3,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[399],
-    /* return matcher indices */ &kMatcherIndices[39],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [211] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[645],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [212] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[644],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [213] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[483],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [214] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[485],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [215] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[580],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [216] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[581],
-    /* return matcher indices */ &kMatcherIndices[55],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [217] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[660],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [218] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[647],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [219] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[649],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [220] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[648],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [221] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[515],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [222] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[519],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [223] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[552],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [224] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[551],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [225] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[651],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [226] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[650],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [227] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[654],
-    /* return matcher indices */ &kMatcherIndices[10],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [228] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[653],
-    /* return matcher indices */ &kMatcherIndices[10],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [229] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[549],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [230] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[548],
-    /* return matcher indices */ &kMatcherIndices[39],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [231] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[547],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [232] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[550],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [233] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[656],
-    /* return matcher indices */ &kMatcherIndices[10],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [234] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[655],
-    /* return matcher indices */ &kMatcherIndices[10],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [235] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[664],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [236] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[665],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [237] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[540],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [238] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[668],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [239] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[667],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [240] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[666],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [241] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[658],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [242] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[657],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [243] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[663],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [244] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[662],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [245] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[475],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [246] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[477],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [247] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[632],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [248] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[631],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [249] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[646],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [250] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[637],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [251] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[369],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [252] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[453],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [253] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[669],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [254] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[659],
-    /* return matcher indices */ &kMatcherIndices[39],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [255] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[560],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [256] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[592],
-    /* return matcher indices */ &kMatcherIndices[91],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [257] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[591],
-    /* return matcher indices */ &kMatcherIndices[91],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [258] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[583],
-    /* return matcher indices */ &kMatcherIndices[91],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [259] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[582],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [260] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[533],
-    /* return matcher indices */ &kMatcherIndices[85],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [261] */
-    /* num parameters */ 0,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[670],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [262] */
-    /* num parameters */ 3,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[351],
-    /* return matcher indices */ &kMatcherIndices[105],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [263] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[556],
-    /* return matcher indices */ &kMatcherIndices[43],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [264] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[429],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [265] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[523],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [266] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[555],
-    /* return matcher indices */ &kMatcherIndices[43],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [267] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[557],
-    /* return matcher indices */ &kMatcherIndices[43],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [268] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[558],
-    /* return matcher indices */ &kMatcherIndices[43],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [269] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[559],
-    /* return matcher indices */ &kMatcherIndices[43],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [270] */
-    /* num parameters */ 0,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[670],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [271] */
-    /* num parameters */ 3,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[366],
-    /* return matcher indices */ &kMatcherIndices[21],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [272] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[0],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[493],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [273] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[3],
-    /* parameters */ &kParameters[634],
-    /* return matcher indices */ &kMatcherIndices[12],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [274] */
-    /* num parameters */ 2,
-    /* num open types */ 0,
-    /* num open numbers */ 0,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[6],
-    /* parameters */ &kParameters[487],
-    /* return matcher indices */ &kMatcherIndices[87],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [275] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[2],
-    /* open numbers */ &kOpenNumbers[4],
-    /* parameters */ &kParameters[652],
-    /* return matcher indices */ &kMatcherIndices[43],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [276] */
-    /* num parameters */ 1,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[661],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [277] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[473],
-    /* return matcher indices */ nullptr,
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [278] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[471],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [279] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[469],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [280] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[467],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [281] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[465],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [282] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[463],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [283] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[461],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [284] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[505],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [285] */
-    /* num parameters */ 2,
-    /* num open types */ 1,
-    /* num open numbers */ 1,
-    /* open types */ &kOpenTypes[1],
-    /* open numbers */ &kOpenNumbers[5],
-    /* parameters */ &kParameters[479],
-    /* return matcher indices */ &kMatcherIndices[1],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-  {
-    /* [286] */
-    /* num parameters */ 1,
-    /* num open types */ 0,
-    /* num open numbers */ 2,
-    /* open types */ &kOpenTypes[4],
-    /* open numbers */ &kOpenNumbers[2],
-    /* parameters */ &kParameters[633],
-    /* return matcher indices */ &kMatcherIndices[9],
-    /* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
-    /* is_deprecated */ false,
-  },
-};
-
-constexpr IntrinsicInfo kIntrinsics[] = {
-  {
-    /* [0] */
-    /* fn abs<T : fiu32>(T) -> T */
-    /* fn abs<N : num, T : fiu32>(vec<N, T>) -> vec<N, T> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[253],
-  },
-  {
-    /* [1] */
-    /* fn acos(f32) -> f32 */
-    /* fn acos<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[241],
-  },
-  {
-    /* [2] */
-    /* fn all(bool) -> bool */
-    /* fn all<N : num>(vec<N, bool>) -> bool */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[233],
-  },
-  {
-    /* [3] */
-    /* fn any(bool) -> bool */
-    /* fn any<N : num>(vec<N, bool>) -> bool */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[227],
-  },
-  {
-    /* [4] */
-    /* fn arrayLength<T, A : access>(ptr<storage, array<T>, A>) -> u32 */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[275],
-  },
-  {
-    /* [5] */
-    /* fn asin(f32) -> f32 */
-    /* fn asin<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[225],
-  },
-  {
-    /* [6] */
-    /* fn atan(f32) -> f32 */
-    /* fn atan<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[219],
-  },
-  {
-    /* [7] */
-    /* fn atan2(f32, f32) -> f32 */
-    /* fn atan2<N : num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[213],
-  },
-  {
-    /* [8] */
-    /* fn ceil(f32) -> f32 */
-    /* fn ceil<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[211],
-  },
-  {
-    /* [9] */
-    /* fn clamp<T : fiu32>(T, T, T) -> T */
-    /* fn clamp<N : num, T : fiu32>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[209],
-  },
-  {
-    /* [10] */
-    /* fn cos(f32) -> f32 */
-    /* fn cos<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[205],
-  },
-  {
-    /* [11] */
-    /* fn cosh(f32) -> f32 */
-    /* fn cosh<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[183],
-  },
-  {
-    /* [12] */
-    /* fn countOneBits<T : iu32>(T) -> T */
-    /* fn countOneBits<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[167],
-  },
-  {
-    /* [13] */
-    /* fn cross(vec3<f32>, vec3<f32>) -> vec3<f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[274],
-  },
-  {
-    /* [14] */
-    /* fn degrees(f32) -> f32 */
-    /* fn degrees<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[149],
-  },
-  {
-    /* [15] */
-    /* fn determinant<N : num>(mat<N, N, f32>) -> f32 */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[273],
-  },
-  {
-    /* [16] */
-    /* fn distance(f32, f32) -> f32 */
-    /* fn distance<N : num>(vec<N, f32>, vec<N, f32>) -> f32 */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[147],
-  },
-  {
-    /* [17] */
-    /* fn dot<N : num, T : fiu32>(vec<N, T>, vec<N, T>) -> T */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[272],
-  },
-  {
-    /* [18] */
-    /* fn dpdx(f32) -> f32 */
-    /* fn dpdx<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[151],
-  },
-  {
-    /* [19] */
-    /* fn dpdxCoarse(f32) -> f32 */
-    /* fn dpdxCoarse<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[153],
-  },
-  {
-    /* [20] */
-    /* fn dpdxFine(f32) -> f32 */
-    /* fn dpdxFine<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[155],
-  },
-  {
-    /* [21] */
-    /* fn dpdy(f32) -> f32 */
-    /* fn dpdy<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[157],
-  },
-  {
-    /* [22] */
-    /* fn dpdyCoarse(f32) -> f32 */
-    /* fn dpdyCoarse<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[159],
-  },
-  {
-    /* [23] */
-    /* fn dpdyFine(f32) -> f32 */
-    /* fn dpdyFine<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[161],
-  },
-  {
-    /* [24] */
-    /* fn exp(f32) -> f32 */
-    /* fn exp<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[163],
-  },
-  {
-    /* [25] */
-    /* fn exp2(f32) -> f32 */
-    /* fn exp2<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[165],
-  },
-  {
-    /* [26] */
-    /* fn faceForward<N : num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[271],
-  },
-  {
-    /* [27] */
-    /* fn floor(f32) -> f32 */
-    /* fn floor<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[169],
-  },
-  {
-    /* [28] */
-    /* fn fma(f32, f32, f32) -> f32 */
-    /* fn fma<N : num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[171],
-  },
-  {
-    /* [29] */
-    /* fn fract(f32) -> f32 */
-    /* fn fract<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[173],
-  },
-  {
-    /* [30] */
-    /* fn frexp(f32) -> __frexp_result */
-    /* fn frexp<N : num>(vec<N, f32>) -> __frexp_result_vec<N> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[175],
-  },
-  {
-    /* [31] */
-    /* fn fwidth(f32) -> f32 */
-    /* fn fwidth<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[177],
-  },
-  {
-    /* [32] */
-    /* fn fwidthCoarse(f32) -> f32 */
-    /* fn fwidthCoarse<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[179],
-  },
-  {
-    /* [33] */
-    /* fn fwidthFine(f32) -> f32 */
-    /* fn fwidthFine<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[181],
-  },
-  {
-    /* [34] */
-    /* fn inverseSqrt(f32) -> f32 */
-    /* fn inverseSqrt<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[145],
-  },
-  {
-    /* [35] */
-    /* fn isFinite(f32) -> bool */
-    /* fn isFinite<N : num>(vec<N, f32>) -> vec<N, bool> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[185],
-  },
-  {
-    /* [36] */
-    /* fn isInf(f32) -> bool */
-    /* fn isInf<N : num>(vec<N, f32>) -> vec<N, bool> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[187],
-  },
-  {
-    /* [37] */
-    /* fn isNan(f32) -> bool */
-    /* fn isNan<N : num>(vec<N, f32>) -> vec<N, bool> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[189],
-  },
-  {
-    /* [38] */
-    /* fn isNormal(f32) -> bool */
-    /* fn isNormal<N : num>(vec<N, f32>) -> vec<N, bool> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[191],
-  },
-  {
-    /* [39] */
-    /* fn ldexp(f32, i32) -> f32 */
-    /* fn ldexp<N : num>(vec<N, f32>, vec<N, i32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[193],
-  },
-  {
-    /* [40] */
-    /* fn length(f32) -> f32 */
-    /* fn length<N : num>(vec<N, f32>) -> f32 */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[195],
-  },
-  {
-    /* [41] */
-    /* fn log(f32) -> f32 */
-    /* fn log<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[197],
-  },
-  {
-    /* [42] */
-    /* fn log2(f32) -> f32 */
-    /* fn log2<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[199],
-  },
-  {
-    /* [43] */
-    /* fn max<T : fiu32>(T, T) -> T */
-    /* fn max<N : num, T : fiu32>(vec<N, T>, vec<N, T>) -> vec<N, T> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[201],
-  },
-  {
-    /* [44] */
-    /* fn min<T : fiu32>(T, T) -> T */
-    /* fn min<N : num, T : fiu32>(vec<N, T>, vec<N, T>) -> vec<N, T> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[203],
-  },
-  {
-    /* [45] */
-    /* fn mix(f32, f32, f32) -> f32 */
-    /* fn mix<N : num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
-    /* fn mix<N : num>(vec<N, f32>, vec<N, f32>, f32) -> vec<N, f32> */
-    /* num overloads */ 3,
-    /* overloads */ &kOverloads[139],
-  },
-  {
-    /* [46] */
-    /* fn modf(f32) -> __modf_result */
-    /* fn modf<N : num>(vec<N, f32>) -> __modf_result_vec<N> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[207],
-  },
-  {
-    /* [47] */
-    /* fn normalize<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[255],
-  },
-  {
-    /* [48] */
-    /* fn pack2x16float(vec2<f32>) -> u32 */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[269],
-  },
-  {
-    /* [49] */
-    /* fn pack2x16snorm(vec2<f32>) -> u32 */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[268],
-  },
-  {
-    /* [50] */
-    /* fn pack2x16unorm(vec2<f32>) -> u32 */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[267],
-  },
-  {
-    /* [51] */
-    /* fn pack4x8snorm(vec4<f32>) -> u32 */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[263],
-  },
-  {
-    /* [52] */
-    /* fn pack4x8unorm(vec4<f32>) -> u32 */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[266],
-  },
-  {
-    /* [53] */
-    /* fn pow(f32, f32) -> f32 */
-    /* fn pow<N : num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[221],
-  },
-  {
-    /* [54] */
-    /* fn radians(f32) -> f32 */
-    /* fn radians<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[223],
-  },
-  {
-    /* [55] */
-    /* fn reflect<N : num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[265],
-  },
-  {
-    /* [56] */
-    /* fn refract<N : num>(vec<N, f32>, vec<N, f32>, f32) -> vec<N, f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[264],
-  },
-  {
-    /* [57] */
-    /* fn reverseBits<T : iu32>(T) -> T */
-    /* fn reverseBits<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[229],
-  },
-  {
-    /* [58] */
-    /* fn round(f32) -> f32 */
-    /* fn round<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[231],
-  },
-  {
-    /* [59] */
-    /* fn select<T : scalar>(T, T, bool) -> T */
-    /* fn select<T : scalar, N : num>(vec<N, T>, vec<N, T>, bool) -> vec<N, T> */
-    /* fn select<N : num, T : scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T> */
-    /* num overloads */ 3,
-    /* overloads */ &kOverloads[142],
-  },
-  {
-    /* [60] */
-    /* fn sign(f32) -> f32 */
-    /* fn sign<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[235],
-  },
-  {
-    /* [61] */
-    /* fn sin(f32) -> f32 */
-    /* fn sin<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[237],
-  },
-  {
-    /* [62] */
-    /* fn sinh(f32) -> f32 */
-    /* fn sinh<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[239],
-  },
-  {
-    /* [63] */
-    /* fn smoothStep(f32, f32, f32) -> f32 */
-    /* fn smoothStep<N : num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[251],
-  },
-  {
-    /* [64] */
-    /* fn sqrt(f32) -> f32 */
-    /* fn sqrt<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[243],
-  },
-  {
-    /* [65] */
-    /* fn step(f32, f32) -> f32 */
-    /* fn step<N : num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[245],
-  },
-  {
-    /* [66] */
-    /* fn storageBarrier() */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[270],
-  },
-  {
-    /* [67] */
-    /* fn tan(f32) -> f32 */
-    /* fn tan<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[217],
-  },
-  {
-    /* [68] */
-    /* fn tanh(f32) -> f32 */
-    /* fn tanh<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[249],
-  },
-  {
-    /* [69] */
-    /* fn transpose<M : num, N : num>(mat<M, N, f32>) -> mat<N, M, f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[286],
-  },
-  {
-    /* [70] */
-    /* fn trunc(f32) -> f32 */
-    /* fn trunc<N : num>(vec<N, f32>) -> vec<N, f32> */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[247],
-  },
-  {
-    /* [71] */
-    /* fn unpack2x16float(u32) -> vec2<f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[256],
-  },
-  {
-    /* [72] */
-    /* fn unpack2x16snorm(u32) -> vec2<f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[257],
-  },
-  {
-    /* [73] */
-    /* fn unpack2x16unorm(u32) -> vec2<f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[258],
-  },
-  {
-    /* [74] */
-    /* fn unpack4x8snorm(u32) -> vec4<f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[259],
-  },
-  {
-    /* [75] */
-    /* fn unpack4x8unorm(u32) -> vec4<f32> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[260],
-  },
-  {
-    /* [76] */
-    /* fn workgroupBarrier() */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[261],
-  },
-  {
-    /* [77] */
-    /* fn textureDimensions<T : fiu32>(texture: texture_1d<T>) -> i32 */
-    /* fn textureDimensions<T : fiu32>(texture: texture_1d<T>, level: i32) -> i32 */
-    /* fn textureDimensions<T : fiu32>(texture: texture_2d<T>) -> vec2<i32> */
-    /* fn textureDimensions<T : fiu32>(texture: texture_2d<T>, level: i32) -> vec2<i32> */
-    /* fn textureDimensions<T : fiu32>(texture: texture_2d_array<T>) -> vec2<i32> */
-    /* fn textureDimensions<T : fiu32>(texture: texture_2d_array<T>, level: i32) -> vec2<i32> */
-    /* fn textureDimensions<T : fiu32>(texture: texture_3d<T>) -> vec3<i32> */
-    /* fn textureDimensions<T : fiu32>(texture: texture_3d<T>, level: i32) -> vec3<i32> */
-    /* fn textureDimensions<T : fiu32>(texture: texture_cube<T>) -> vec2<i32> */
-    /* fn textureDimensions<T : fiu32>(texture: texture_cube<T>, level: i32) -> vec2<i32> */
-    /* fn textureDimensions<T : fiu32>(texture: texture_cube_array<T>) -> vec2<i32> */
-    /* fn textureDimensions<T : fiu32>(texture: texture_cube_array<T>, level: i32) -> vec2<i32> */
-    /* fn textureDimensions<T : fiu32>(texture: texture_multisampled_2d<T>) -> vec2<i32> */
-    /* fn textureDimensions(texture: texture_depth_2d) -> vec2<i32> */
-    /* fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32> */
-    /* fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32> */
-    /* fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32> */
-    /* fn textureDimensions(texture: texture_depth_cube) -> vec2<i32> */
-    /* fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32> */
-    /* fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32> */
-    /* fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32> */
-    /* fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32> */
-    /* fn textureDimensions<F : texel_format, A : write_only>(texture: texture_storage_1d<F, A>) -> i32 */
-    /* fn textureDimensions<F : texel_format, A : write_only>(texture: texture_storage_2d<F, A>) -> vec2<i32> */
-    /* fn textureDimensions<F : texel_format, A : write_only>(texture: texture_storage_2d_array<F, A>) -> vec2<i32> */
-    /* fn textureDimensions<F : texel_format, A : write_only>(texture: texture_storage_3d<F, A>) -> vec3<i32> */
-    /* fn textureDimensions(texture: texture_external) -> vec2<i32> */
-    /* num overloads */ 27,
-    /* overloads */ &kOverloads[0],
-  },
-  {
-    /* [78] */
-    /* fn textureGather<T : fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
-    /* fn textureGather<T : fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<T> */
-    /* fn textureGather<T : fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<T> */
-    /* fn textureGather<T : fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<T> */
-    /* fn textureGather<T : fiu32>(component: i32, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> */
-    /* fn textureGather<T : fiu32>(component: i32, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<T> */
-    /* fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
-    /* fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> */
-    /* fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
-    /* fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32> */
-    /* num overloads */ 12,
-    /* overloads */ &kOverloads[69],
-  },
-  {
-    /* [79] */
-    /* fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32> */
-    /* fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> vec4<f32> */
-    /* fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32> */
-    /* fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> vec4<f32> */
-    /* num overloads */ 6,
-    /* overloads */ &kOverloads[116],
-  },
-  {
-    /* [80] */
-    /* fn textureNumLayers<T : fiu32>(texture: texture_2d_array<T>) -> i32 */
-    /* fn textureNumLayers<T : fiu32>(texture: texture_cube_array<T>) -> i32 */
-    /* fn textureNumLayers(texture: texture_depth_2d_array) -> i32 */
-    /* fn textureNumLayers(texture: texture_depth_cube_array) -> i32 */
-    /* fn textureNumLayers<F : texel_format, A : write_only>(texture: texture_storage_2d_array<F, A>) -> i32 */
-    /* num overloads */ 5,
-    /* overloads */ &kOverloads[134],
-  },
-  {
-    /* [81] */
-    /* fn textureNumLevels<T : fiu32>(texture: texture_1d<T>) -> i32 */
-    /* fn textureNumLevels<T : fiu32>(texture: texture_2d<T>) -> i32 */
-    /* fn textureNumLevels<T : fiu32>(texture: texture_2d_array<T>) -> i32 */
-    /* fn textureNumLevels<T : fiu32>(texture: texture_3d<T>) -> i32 */
-    /* fn textureNumLevels<T : fiu32>(texture: texture_cube<T>) -> i32 */
-    /* fn textureNumLevels<T : fiu32>(texture: texture_cube_array<T>) -> i32 */
-    /* fn textureNumLevels(texture: texture_depth_2d) -> i32 */
-    /* fn textureNumLevels(texture: texture_depth_2d_array) -> i32 */
-    /* fn textureNumLevels(texture: texture_depth_cube) -> i32 */
-    /* fn textureNumLevels(texture: texture_depth_cube_array) -> i32 */
-    /* num overloads */ 10,
-    /* overloads */ &kOverloads[81],
-  },
-  {
-    /* [82] */
-    /* fn textureNumSamples<T : fiu32>(texture: texture_multisampled_2d<T>) -> i32 */
-    /* fn textureNumSamples(texture: texture_depth_multisampled_2d) -> i32 */
-    /* num overloads */ 2,
-    /* overloads */ &kOverloads[215],
-  },
-  {
-    /* [83] */
-    /* fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32> */
-    /* fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
-    /* fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> */
-    /* fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
-    /* fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, offset: vec3<i32>) -> vec4<f32> */
-    /* fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
-    /* fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32> */
-    /* fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32 */
-    /* fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> f32 */
-    /* fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> f32 */
-    /* fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> f32 */
-    /* fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32 */
-    /* fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> f32 */
-    /* num overloads */ 15,
-    /* overloads */ &kOverloads[27],
-  },
-  {
-    /* [84] */
-    /* fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32> */
-    /* fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32) -> vec4<f32> */
-    /* fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> */
-    /* fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, offset: vec3<i32>) -> vec4<f32> */
-    /* fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> */
-    /* fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, bias: f32) -> vec4<f32> */
-    /* num overloads */ 8,
-    /* overloads */ &kOverloads[100],
-  },
-  {
-    /* [85] */
-    /* fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 */
-    /* fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32 */
-    /* fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32 */
-    /* fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> f32 */
-    /* fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 */
-    /* fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32 */
-    /* num overloads */ 6,
-    /* overloads */ &kOverloads[122],
-  },
-  {
-    /* [86] */
-    /* fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 */
-    /* fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32 */
-    /* fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32 */
-    /* fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> f32 */
-    /* fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 */
-    /* fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32 */
-    /* num overloads */ 6,
-    /* overloads */ &kOverloads[128],
-  },
-  {
-    /* [87] */
-    /* fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
-    /* fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
-    /* fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> */
-    /* fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, offset: vec3<i32>) -> vec4<f32> */
-    /* fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> */
-    /* fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> */
-    /* num overloads */ 8,
-    /* overloads */ &kOverloads[108],
-  },
-  {
-    /* [88] */
-    /* fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32> */
-    /* fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32) -> vec4<f32> */
-    /* fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32, offset: vec2<i32>) -> vec4<f32> */
-    /* fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> */
-    /* fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, offset: vec3<i32>) -> vec4<f32> */
-    /* fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> */
-    /* fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, level: f32) -> vec4<f32> */
-    /* fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32) -> f32 */
-    /* fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32, offset: vec2<i32>) -> f32 */
-    /* fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32) -> f32 */
-    /* fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32, offset: vec2<i32>) -> f32 */
-    /* fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: i32) -> f32 */
-    /* fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32, level: i32) -> f32 */
-    /* fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
-    /* num overloads */ 15,
-    /* overloads */ &kOverloads[42],
-  },
-  {
-    /* [89] */
-    /* fn textureStore(texture: texture_storage_1d<f32_texel_format, write>, coords: i32, value: vec4<f32>) */
-    /* fn textureStore(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<i32>, value: vec4<f32>) */
-    /* fn textureStore(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>) */
-    /* fn textureStore(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<i32>, value: vec4<f32>) */
-    /* fn textureStore(texture: texture_storage_1d<i32_texel_format, write>, coords: i32, value: vec4<i32>) */
-    /* fn textureStore(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<i32>, value: vec4<i32>) */
-    /* fn textureStore(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>) */
-    /* fn textureStore(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<i32>, value: vec4<i32>) */
-    /* fn textureStore(texture: texture_storage_1d<u32_texel_format, write>, coords: i32, value: vec4<u32>) */
-    /* fn textureStore(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<i32>, value: vec4<u32>) */
-    /* fn textureStore(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>) */
-    /* fn textureStore(texture: texture_storage_3d<u32_texel_format, write>, coords: vec3<i32>, value: vec4<u32>) */
-    /* num overloads */ 12,
-    /* overloads */ &kOverloads[57],
-  },
-  {
-    /* [90] */
-    /* fn textureLoad<T : fiu32>(texture: texture_1d<T>, coords: i32, level: i32) -> vec4<T> */
-    /* fn textureLoad<T : fiu32>(texture: texture_2d<T>, coords: vec2<i32>, level: i32) -> vec4<T> */
-    /* fn textureLoad<T : fiu32>(texture: texture_2d_array<T>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<T> */
-    /* fn textureLoad<T : fiu32>(texture: texture_3d<T>, coords: vec3<i32>, level: i32) -> vec4<T> */
-    /* fn textureLoad<T : fiu32>(texture: texture_multisampled_2d<T>, coords: vec2<i32>, sample_index: i32) -> vec4<T> */
-    /* fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32 */
-    /* fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: i32, level: i32) -> f32 */
-    /* fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<i32>, sample_index: i32) -> f32 */
-    /* fn textureLoad(texture: texture_external, coords: vec2<i32>) -> vec4<f32> */
-    /* num overloads */ 9,
-    /* overloads */ &kOverloads[91],
-  },
-  {
-    /* [91] */
-    /* fn atomicLoad<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[276],
-  },
-  {
-    /* [92] */
-    /* fn atomicStore<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[277],
-  },
-  {
-    /* [93] */
-    /* fn atomicAdd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[278],
-  },
-  {
-    /* [94] */
-    /* fn atomicSub<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[279],
-  },
-  {
-    /* [95] */
-    /* fn atomicMax<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[280],
-  },
-  {
-    /* [96] */
-    /* fn atomicMin<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[281],
-  },
-  {
-    /* [97] */
-    /* fn atomicAnd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[282],
-  },
-  {
-    /* [98] */
-    /* fn atomicOr<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[283],
-  },
-  {
-    /* [99] */
-    /* fn atomicXor<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[284],
-  },
-  {
-    /* [100] */
-    /* fn atomicExchange<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[285],
-  },
-  {
-    /* [101] */
-    /* fn atomicCompareExchangeWeak<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T, T) -> vec2<T> */
-    /* num overloads */ 1,
-    /* overloads */ &kOverloads[262],
-  },
-};
-
-// clang-format on
diff --git a/src/intrinsic_table.inl.tmpl b/src/intrinsic_table.inl.tmpl
deleted file mode 100644
index a112159..0000000
--- a/src/intrinsic_table.inl.tmpl
+++ /dev/null
@@ -1,401 +0,0 @@
-{{- /*
---------------------------------------------------------------------------------
-Template file for use with tools/intrinsic-gen to generate intrinsic_table.inl
-Used by IntrinsicTable.cc for intrinsic overload resolution.
-
-See:
-* tools/cmd/intrinsic-gen/gen for structures used by this template
-* https://golang.org/pkg/text/template/ for documentation on the template syntax
---------------------------------------------------------------------------------
-*/ -}}
-
-// clang-format off
-
-{{  with .Sem -}}
-{{    range .Types -}}
-{{      template "Type" . }}
-{{    end -}}
-{{    range .TypeMatchers -}}
-{{      template "TypeMatcher" . }}
-{{    end -}}
-{{    range .EnumMatchers -}}
-{{      template "EnumMatcher" . }}
-{{    end -}}
-{{- end -}}
-
-{{- with IntrinsicTable -}}
-{{- template "Matchers" . }}
-
-constexpr MatcherIndex kMatcherIndices[] = {
-{{- range $i, $idx := .MatcherIndices }}
-  /* [{{$i}}] */ {{$idx}},
-{{- end }}
-};
-
-// Assert that the MatcherIndex is big enough to index all the matchers, plus
-// kNoMatcher.
-static_assert(static_cast<int>(sizeof(kMatcherIndices) / sizeof(kMatcherIndices[0])) <
-              static_cast<int>(std::numeric_limits<MatcherIndex>::max() - 1),
-              "MatcherIndex is not large enough to index kMatcherIndices");
-
-constexpr ParameterInfo kParameters[] = {
-{{- range $i, $p := .Parameters }}
-  {
-    /* [{{$i}}] */
-    /* usage */ ParameterUsage::
-{{-   if $p.Usage }}k{{PascalCase $p.Usage}}
-{{-   else        }}kNone
-{{-   end         }},
-    /* matcher indices */ &kMatcherIndices[{{$p.MatcherIndicesOffset}}],
-  },
-{{- end }}
-};
-
-constexpr OpenTypeInfo kOpenTypes[] = {
-{{- range $i, $o := .OpenTypes }}
-  {
-    /* [{{$i}}] */
-    /* name */ "{{$o.Name}}",
-    /* matcher index */
-{{-   if ge $o.MatcherIndex 0 }} {{$o.MatcherIndex}}
-{{-   else                    }} kNoMatcher
-{{-   end                     }},
-  },
-{{- end }}
-};
-
-constexpr OpenNumberInfo kOpenNumbers[] = {
-{{- range $i, $o := .OpenNumbers }}
-  {
-    /* [{{$i}}] */
-    /* name */ "{{$o.Name}}",
-    /* matcher index */
-{{-   if ge $o.MatcherIndex 0 }} {{$o.MatcherIndex}}
-{{-   else                    }} kNoMatcher
-{{-   end                     }},
-  },
-{{- end }}
-};
-
-constexpr OverloadInfo kOverloads[] = {
-{{- range $i, $o := .Overloads }}
-  {
-    /* [{{$i}}] */
-    /* num parameters */ {{$o.NumParameters}},
-    /* num open types */ {{$o.NumOpenTypes}},
-    /* num open numbers */ {{$o.NumOpenNumbers}},
-    /* open types */
-{{-   if $o.OpenTypesOffset }} &kOpenTypes[{{$o.OpenTypesOffset}}],
-{{-   else                  }} nullptr,
-{{-   end }}
-    /* open numbers */
-{{-   if $o.OpenNumbersOffset }} &kOpenNumbers[{{$o.OpenNumbersOffset}}]
-{{-   else                    }} nullptr
-{{-   end }},
-    /* parameters */ &kParameters[{{$o.ParametersOffset}}],
-    /* return matcher indices */
-{{-   if $o.ReturnMatcherIndicesOffset }} &kMatcherIndices[{{$o.ReturnMatcherIndicesOffset}}]
-{{-   else                             }} nullptr
-{{-   end }},
-    /* supported_stages */ PipelineStageSet(
-{{-   range $i, $u := $o.CanBeUsedInStage.List -}}
-{{-     if $i -}}, {{end}}PipelineStage::k{{Title $u}}
-{{-   end }}),
-    /* is_deprecated */ {{$o.IsDeprecated}},
-  },
-{{- end }}
-};
-
-constexpr IntrinsicInfo kIntrinsics[] = {
-{{- range $i, $f := .Functions }}
-  {
-    /* [{{$i}}] */
-{{-   range $f.OverloadDescriptions }}
-    /* {{.}} */
-{{-   end }}
-    /* num overloads */ {{$f.NumOverloads}},
-    /* overloads */ &kOverloads[{{$f.OverloadsOffset}}],
-  },
-{{- end }}
-};
-
-// clang-format on
-{{ end -}}
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                              define "Type"                               -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{- $class := PascalCase .Name -}}
-/// TypeMatcher for 'type {{.Name}}'
-{{- if .Decl.Source.S.Filepath  }}
-/// @see {{.Decl.Source}}
-{{- end  }}
-class {{$class}} : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* {{$class}}::Match(MatchState& state, const sem::Type* ty) const {
-{{- range .TemplateParams }}
-{{-   template "DeclareLocalTemplateParam" . }}
-{{- end  }}
-  if (!match_{{TrimLeft .Name "_"}}(ty{{range .TemplateParams}}, {{.GetName}}{{end}})) {
-    return nullptr;
-  }
-{{- range .TemplateParams }}
-  {{.Name}} = {{ template "MatchTemplateParam" .}}({{.Name}});
-  if ({{ template "IsTemplateParamInvalid" .}}) {
-    return nullptr;
-  }
-{{- end  }}
-  return build_{{TrimLeft .Name "_"}}(state{{range .TemplateParams}}, {{.GetName}}{{end}});
-}
-
-std::string {{$class}}::String(MatchState&{{if .TemplateParams}} state{{end}}) const {
-{{- range .TemplateParams }}
-{{-   template "DeclareLocalTemplateParamName" . }}
-{{- end  }}
-
-{{- if .DisplayName }}
-  std::stringstream ss;
-  ss{{range SplitDisplayName .DisplayName}} << {{.}}{{end}};
-  return ss.str();
-{{- else if .TemplateParams }}
-  return "{{.Name}}<"{{template "AppendTemplateParamNames" .TemplateParams}} + ">";
-{{- else }}
-  return "{{.Name}}";
-{{- end  }}
-}
-{{  end -}}
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                          define "TypeMatcher"                            -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{- $class := PascalCase .Name -}}
-/// TypeMatcher for 'match {{.Name}}'
-{{- if .Decl.Source.S.Filepath  }}
-/// @see {{.Decl.Source}}
-{{- end  }}
-class {{$class}} : public TypeMatcher {
- public:
-  /// Checks whether the given type matches the matcher rules, and returns the
-  /// expected, canonicalized type on success.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param type the type to match
-  /// @returns the canonicalized type on match, otherwise nullptr
-  const sem::Type* Match(MatchState& state,
-                         const sem::Type* type) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-const sem::Type* {{$class}}::Match(MatchState& state, const sem::Type* ty) const {
-{{- range .Types }}
-  if (match_{{.Name}}(ty)) {
-    return build_{{.Name}}(state);
-  }
-{{- end }}
-  return nullptr;
-}
-
-std::string {{$class}}::String(MatchState&) const {
-  return "
-{{- range .Types -}}
-{{-   if      IsFirstIn . $.Types }}{{.Name}}
-{{-   else if IsLastIn  . $.Types }} or {{.Name}}
-{{-   else                        }}, {{.Name}}
-{{-   end -}}
-{{- end -}}
-  ";
-}
-{{  end -}}
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                          define "EnumMatcher"                            -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{- $class := PascalCase .Name -}}
-{{- $enum := PascalCase .Enum.Name -}}
-/// EnumMatcher for 'match {{.Name}}'
-{{- if .Decl.Source.S.Filepath  }}
-/// @see {{.Decl.Source}}
-{{- end  }}
-class {{$class}} : public NumberMatcher {
- public:
-  /// Checks whether the given number matches the enum matcher rules.
-  /// Match may close open types and numbers in state.
-  /// @param state the MatchState
-  /// @param number the enum value as a Number
-  /// @return true if the enum value matches the set
-  Number Match(MatchState& state, Number number) const override;
-  /// @param state the MatchState
-  /// @return a string representation of the matcher.
-  std::string String(MatchState& state) const override;
-};
-
-{{ if eq 1 (len .Options) -}}
-{{-   $option := index .Options 0 }}
-{{-   $entry := printf "k%v" (PascalCase $option.Name) -}}
-Number {{$class}}::Match(MatchState&, Number number) const {
-  if (number.IsAny() || number.Value() == static_cast<uint32_t>({{$enum}}::{{$entry}})) {
-    return Number(static_cast<uint32_t>({{$enum}}::{{$entry}}));
-  }
-  return Number::invalid;
-}
-{{- else -}}
-Number {{$class}}::Match(MatchState&, Number number) const {
-  switch (static_cast<{{$enum}}>(number.Value())) {
-{{-   range .Options }}
-    case {{$enum}}::k{{PascalCase .Name}}:
-{{-   end }}
-      return number;
-    default:
-      return Number::invalid;
-  }
-}
-{{- end }}
-
-std::string {{$class}}::String(MatchState&) const {
-  return "
-{{- range .Options -}}
-{{-   if      IsFirstIn . $.Options }}{{.Name}}
-{{-   else if IsLastIn  . $.Options }} or {{.Name}}
-{{-   else                          }}, {{.Name}}
-{{-   end -}}
-{{- end -}}
-";
-}
-{{  end -}}
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                            define "Matchers"                             -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-/// Matchers holds type and number matchers
-class Matchers {
- private:
-{{- $t_names := Map -}}
-{{- $n_names := Map -}}
-{{- range Iterate .Sem.MaxOpenTypes -}}
-{{-   $name := printf "open_type_%v" . -}}
-{{-   $t_names.Put . $name }}
-  OpenTypeMatcher {{$name}}_{ {{- . -}} };
-{{- end }}
-{{- range Iterate .Sem.MaxOpenNumbers -}}
-{{-   $name := printf "open_number_%v" . -}}
-{{-   $n_names.Put . $name }}
-  OpenNumberMatcher {{$name}}_{ {{- . -}} };
-{{- end }}
-{{- range .Sem.Types -}}
-{{-   $name := PascalCase .Name -}}
-{{-   $t_names.Put . $name }}
-  {{$name}} {{$name}}_;
-{{- end }}
-{{- range .Sem.TypeMatchers -}}
-{{-   $name := PascalCase .Name -}}
-{{-   $t_names.Put . $name }}
-  {{$name}} {{$name}}_;
-{{- end }}
-{{- range .Sem.EnumMatchers -}}
-{{-   $name := PascalCase .Name -}}
-{{-   $n_names.Put . $name }}
-  {{$name}} {{$name}}_;
-{{- end }}
-
- public:
-  /// Constructor
-  Matchers();
-  /// Destructor
-  ~Matchers();
-
-  /// The open-types, types, and type matchers
-  TypeMatcher const* const type[{{len .TMatchers}}] = {
-{{- range $i, $m := .TMatchers }}
-    /* [{{$i}}] */
-{{-   if $m }} &{{$t_names.Get $m}}_,
-{{-   else  }} &{{$t_names.Get $i}}_,
-{{-   end   }}
-{{- end }}
-  };
-
-  /// The open-numbers, and number matchers
-  NumberMatcher const* const number[{{len .NMatchers}}] = {
-{{- range $i, $m := .NMatchers }}
-    /* [{{$i}}] */
-{{-   if $m }} &{{$n_names.Get $m}}_,
-{{-   else  }} &{{$n_names.Get $i}}_,
-{{-   end   }}
-{{- end }}
-  };
-};
-
-Matchers::Matchers() = default;
-Matchers::~Matchers() = default;
-{{- end -}}
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                     define "DeclareLocalTemplateParam"                   -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   if      IsTemplateTypeParam . }}
-  const sem::Type* {{.Name}} = nullptr;
-{{-   else if IsTemplateNumberParam . }}
-  Number {{.Name}} = Number::invalid;
-{{-   else if IsTemplateEnumParam . }}
-  Number {{.Name}} = Number::invalid;
-{{-   end -}}
-{{- end -}}
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                   define "DeclareLocalTemplateParamName"                 -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   if      IsTemplateTypeParam . }}
-  const std::string {{.Name}} = state.TypeName();
-{{-   else if IsTemplateNumberParam . }}
-  const std::string {{.Name}} = state.NumName();
-{{-   else if IsTemplateEnumParam . }}
-  const std::string {{.Name}} = state.NumName();
-{{-   end -}}
-{{- end -}}
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                       define "MatchTemplateParam"                        -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   if      IsTemplateTypeParam . -}}
-  state.Type
-{{-   else if IsTemplateNumberParam . -}}
-  state.Num
-{{-   else if IsTemplateEnumParam . -}}
-  state.Num
-{{-   end -}}
-{{- end -}}
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                       define "IsTemplateParamInvalid"                    -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   if      IsTemplateTypeParam . -}}
-  {{.Name}} == nullptr
-{{-   else if IsTemplateNumberParam . -}}
-  !{{.Name}}.IsValid()
-{{-   else if IsTemplateEnumParam . -}}
-  !{{.Name}}.IsValid()
-{{-   end -}}
-{{- end -}}
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                      define "AppendTemplateParamNames"                   -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   range $i, $ := . -}}
-{{-     if $i }} + ", " + {{.Name}}
-{{-     else }} + {{.Name}}
-{{-     end -}}
-{{-   end -}}
-{{- end -}}
diff --git a/src/intrinsic_table_test.cc b/src/intrinsic_table_test.cc
deleted file mode 100644
index dbb759e..0000000
--- a/src/intrinsic_table_test.cc
+++ /dev/null
@@ -1,613 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/intrinsic_table.h"
-
-#include "gmock/gmock.h"
-#include "src/program_builder.h"
-#include "src/sem/atomic_type.h"
-#include "src/sem/depth_multisampled_texture_type.h"
-#include "src/sem/depth_texture_type.h"
-#include "src/sem/external_texture_type.h"
-#include "src/sem/multisampled_texture_type.h"
-#include "src/sem/reference_type.h"
-#include "src/sem/sampled_texture_type.h"
-#include "src/sem/storage_texture_type.h"
-
-namespace tint {
-namespace {
-
-using ::testing::HasSubstr;
-
-using IntrinsicType = sem::IntrinsicType;
-using Parameter = sem::Parameter;
-using ParameterUsage = sem::ParameterUsage;
-
-class IntrinsicTableTest : public testing::Test, public ProgramBuilder {
- public:
-  std::unique_ptr<IntrinsicTable> table = IntrinsicTable::Create(*this);
-};
-
-TEST_F(IntrinsicTableTest, MatchF32) {
-  auto* f32 = create<sem::F32>();
-  auto* result = table->Lookup(IntrinsicType::kCos, {f32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kCos);
-  EXPECT_EQ(result->ReturnType(), f32);
-  ASSERT_EQ(result->Parameters().size(), 1u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), f32);
-}
-
-TEST_F(IntrinsicTableTest, MismatchF32) {
-  auto* i32 = create<sem::I32>();
-  auto* result = table->Lookup(IntrinsicType::kCos, {i32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchU32) {
-  auto* f32 = create<sem::F32>();
-  auto* u32 = create<sem::U32>();
-  auto* vec2_f32 = create<sem::Vector>(f32, 2);
-  auto* result =
-      table->Lookup(IntrinsicType::kUnpack2x16float, {u32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kUnpack2x16float);
-  EXPECT_EQ(result->ReturnType(), vec2_f32);
-  ASSERT_EQ(result->Parameters().size(), 1u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), u32);
-}
-
-TEST_F(IntrinsicTableTest, MismatchU32) {
-  auto* f32 = create<sem::F32>();
-  auto* result =
-      table->Lookup(IntrinsicType::kUnpack2x16float, {f32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchI32) {
-  auto* f32 = create<sem::F32>();
-  auto* i32 = create<sem::I32>();
-  auto* vec4_f32 = create<sem::Vector>(f32, 4);
-  auto* tex = create<sem::SampledTexture>(ast::TextureDimension::k1d, f32);
-  auto* result =
-      table->Lookup(IntrinsicType::kTextureLoad, {tex, i32, i32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kTextureLoad);
-  EXPECT_EQ(result->ReturnType(), vec4_f32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
-  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
-  EXPECT_EQ(result->Parameters()[1]->Type(), i32);
-  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
-  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
-  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kLevel);
-}
-
-TEST_F(IntrinsicTableTest, MismatchI32) {
-  auto* f32 = create<sem::F32>();
-  auto* tex = create<sem::SampledTexture>(ast::TextureDimension::k1d, f32);
-  auto* result =
-      table->Lookup(IntrinsicType::kTextureLoad, {tex, f32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchIU32AsI32) {
-  auto* i32 = create<sem::I32>();
-  auto* result = table->Lookup(IntrinsicType::kCountOneBits, {i32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kCountOneBits);
-  EXPECT_EQ(result->ReturnType(), i32);
-  ASSERT_EQ(result->Parameters().size(), 1u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), i32);
-}
-
-TEST_F(IntrinsicTableTest, MatchIU32AsU32) {
-  auto* u32 = create<sem::U32>();
-  auto* result = table->Lookup(IntrinsicType::kCountOneBits, {u32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kCountOneBits);
-  EXPECT_EQ(result->ReturnType(), u32);
-  ASSERT_EQ(result->Parameters().size(), 1u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), u32);
-}
-
-TEST_F(IntrinsicTableTest, MismatchIU32) {
-  auto* f32 = create<sem::F32>();
-  auto* result = table->Lookup(IntrinsicType::kCountOneBits, {f32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchFIU32AsI32) {
-  auto* i32 = create<sem::I32>();
-  auto* result =
-      table->Lookup(IntrinsicType::kClamp, {i32, i32, i32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kClamp);
-  EXPECT_EQ(result->ReturnType(), i32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), i32);
-  EXPECT_EQ(result->Parameters()[1]->Type(), i32);
-  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
-}
-
-TEST_F(IntrinsicTableTest, MatchFIU32AsU32) {
-  auto* u32 = create<sem::U32>();
-  auto* result =
-      table->Lookup(IntrinsicType::kClamp, {u32, u32, u32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kClamp);
-  EXPECT_EQ(result->ReturnType(), u32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), u32);
-  EXPECT_EQ(result->Parameters()[1]->Type(), u32);
-  EXPECT_EQ(result->Parameters()[2]->Type(), u32);
-}
-
-TEST_F(IntrinsicTableTest, MatchFIU32AsF32) {
-  auto* f32 = create<sem::F32>();
-  auto* result =
-      table->Lookup(IntrinsicType::kClamp, {f32, f32, f32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kClamp);
-  EXPECT_EQ(result->ReturnType(), f32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), f32);
-  EXPECT_EQ(result->Parameters()[1]->Type(), f32);
-  EXPECT_EQ(result->Parameters()[2]->Type(), f32);
-}
-
-TEST_F(IntrinsicTableTest, MismatchFIU32) {
-  auto* bool_ = create<sem::Bool>();
-  auto* result =
-      table->Lookup(IntrinsicType::kClamp, {bool_, bool_, bool_}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchBool) {
-  auto* f32 = create<sem::F32>();
-  auto* bool_ = create<sem::Bool>();
-  auto* result =
-      table->Lookup(IntrinsicType::kSelect, {f32, f32, bool_}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kSelect);
-  EXPECT_EQ(result->ReturnType(), f32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), f32);
-  EXPECT_EQ(result->Parameters()[1]->Type(), f32);
-  EXPECT_EQ(result->Parameters()[2]->Type(), bool_);
-}
-
-TEST_F(IntrinsicTableTest, MismatchBool) {
-  auto* f32 = create<sem::F32>();
-  auto* result =
-      table->Lookup(IntrinsicType::kSelect, {f32, f32, f32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchPointer) {
-  auto* i32 = create<sem::I32>();
-  auto* atomicI32 = create<sem::Atomic>(i32);
-  auto* ptr = create<sem::Pointer>(atomicI32, ast::StorageClass::kWorkgroup,
-                                   ast::Access::kReadWrite);
-  auto* result = table->Lookup(IntrinsicType::kAtomicLoad, {ptr}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kAtomicLoad);
-  EXPECT_EQ(result->ReturnType(), i32);
-  ASSERT_EQ(result->Parameters().size(), 1u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), ptr);
-}
-
-TEST_F(IntrinsicTableTest, MismatchPointer) {
-  auto* i32 = create<sem::I32>();
-  auto* atomicI32 = create<sem::Atomic>(i32);
-  auto* result =
-      table->Lookup(IntrinsicType::kAtomicLoad, {atomicI32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchArray) {
-  auto* arr = create<sem::Array>(create<sem::U32>(), 0, 4, 4, 4, 4);
-  auto* arr_ptr = create<sem::Pointer>(arr, ast::StorageClass::kStorage,
-                                       ast::Access::kReadWrite);
-  auto* result =
-      table->Lookup(IntrinsicType::kArrayLength, {arr_ptr}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kArrayLength);
-  EXPECT_TRUE(result->ReturnType()->Is<sem::U32>());
-  ASSERT_EQ(result->Parameters().size(), 1u);
-  auto* param_type = result->Parameters()[0]->Type();
-  ASSERT_TRUE(param_type->Is<sem::Pointer>());
-  EXPECT_TRUE(param_type->As<sem::Pointer>()->StoreType()->Is<sem::Array>());
-}
-
-TEST_F(IntrinsicTableTest, MismatchArray) {
-  auto* f32 = create<sem::F32>();
-  auto* result = table->Lookup(IntrinsicType::kArrayLength, {f32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchSampler) {
-  auto* f32 = create<sem::F32>();
-  auto* vec2_f32 = create<sem::Vector>(f32, 2);
-  auto* vec4_f32 = create<sem::Vector>(f32, 4);
-  auto* tex = create<sem::SampledTexture>(ast::TextureDimension::k2d, f32);
-  auto* sampler = create<sem::Sampler>(ast::SamplerKind::kSampler);
-  auto* result = table->Lookup(IntrinsicType::kTextureSample,
-                               {tex, sampler, vec2_f32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kTextureSample);
-  EXPECT_EQ(result->ReturnType(), vec4_f32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
-  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
-  EXPECT_EQ(result->Parameters()[1]->Type(), sampler);
-  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kSampler);
-  EXPECT_EQ(result->Parameters()[2]->Type(), vec2_f32);
-  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kCoords);
-}
-
-TEST_F(IntrinsicTableTest, MismatchSampler) {
-  auto* f32 = create<sem::F32>();
-  auto* vec2_f32 = create<sem::Vector>(f32, 2);
-  auto* tex = create<sem::SampledTexture>(ast::TextureDimension::k2d, f32);
-  auto* result = table->Lookup(IntrinsicType::kTextureSample,
-                               {tex, f32, vec2_f32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchSampledTexture) {
-  auto* i32 = create<sem::I32>();
-  auto* f32 = create<sem::F32>();
-  auto* vec2_i32 = create<sem::Vector>(i32, 2);
-  auto* vec4_f32 = create<sem::Vector>(f32, 4);
-  auto* tex = create<sem::SampledTexture>(ast::TextureDimension::k2d, f32);
-  auto* result = table->Lookup(IntrinsicType::kTextureLoad,
-                               {tex, vec2_i32, i32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kTextureLoad);
-  EXPECT_EQ(result->ReturnType(), vec4_f32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
-  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
-  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
-  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
-  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
-  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kLevel);
-}
-
-TEST_F(IntrinsicTableTest, MatchMultisampledTexture) {
-  auto* i32 = create<sem::I32>();
-  auto* f32 = create<sem::F32>();
-  auto* vec2_i32 = create<sem::Vector>(i32, 2);
-  auto* vec4_f32 = create<sem::Vector>(f32, 4);
-  auto* tex = create<sem::MultisampledTexture>(ast::TextureDimension::k2d, f32);
-  auto* result = table->Lookup(IntrinsicType::kTextureLoad,
-                               {tex, vec2_i32, i32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kTextureLoad);
-  EXPECT_EQ(result->ReturnType(), vec4_f32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
-  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
-  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
-  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
-  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
-  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kSampleIndex);
-}
-
-TEST_F(IntrinsicTableTest, MatchDepthTexture) {
-  auto* f32 = create<sem::F32>();
-  auto* i32 = create<sem::I32>();
-  auto* vec2_i32 = create<sem::Vector>(i32, 2);
-  auto* tex = create<sem::DepthTexture>(ast::TextureDimension::k2d);
-  auto* result = table->Lookup(IntrinsicType::kTextureLoad,
-                               {tex, vec2_i32, i32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kTextureLoad);
-  EXPECT_EQ(result->ReturnType(), f32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
-  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
-  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
-  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
-  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
-  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kLevel);
-}
-
-TEST_F(IntrinsicTableTest, MatchDepthMultisampledTexture) {
-  auto* f32 = create<sem::F32>();
-  auto* i32 = create<sem::I32>();
-  auto* vec2_i32 = create<sem::Vector>(i32, 2);
-  auto* tex = create<sem::DepthMultisampledTexture>(ast::TextureDimension::k2d);
-  auto* result = table->Lookup(IntrinsicType::kTextureLoad,
-                               {tex, vec2_i32, i32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kTextureLoad);
-  EXPECT_EQ(result->ReturnType(), f32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
-  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
-  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
-  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
-  EXPECT_EQ(result->Parameters()[2]->Type(), i32);
-  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kSampleIndex);
-}
-
-TEST_F(IntrinsicTableTest, MatchExternalTexture) {
-  auto* f32 = create<sem::F32>();
-  auto* i32 = create<sem::I32>();
-  auto* vec2_i32 = create<sem::Vector>(i32, 2);
-  auto* vec4_f32 = create<sem::Vector>(f32, 4);
-  auto* tex = create<sem::ExternalTexture>();
-  auto* result =
-      table->Lookup(IntrinsicType::kTextureLoad, {tex, vec2_i32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kTextureLoad);
-  EXPECT_EQ(result->ReturnType(), vec4_f32);
-  ASSERT_EQ(result->Parameters().size(), 2u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
-  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
-  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
-  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
-}
-
-TEST_F(IntrinsicTableTest, MatchWOStorageTexture) {
-  auto* f32 = create<sem::F32>();
-  auto* i32 = create<sem::I32>();
-  auto* vec2_i32 = create<sem::Vector>(i32, 2);
-  auto* vec4_f32 = create<sem::Vector>(f32, 4);
-  auto* subtype =
-      sem::StorageTexture::SubtypeFor(ast::TexelFormat::kR32Float, Types());
-  auto* tex = create<sem::StorageTexture>(ast::TextureDimension::k2d,
-                                          ast::TexelFormat::kR32Float,
-                                          ast::Access::kWrite, subtype);
-
-  auto* result = table->Lookup(IntrinsicType::kTextureStore,
-                               {tex, vec2_i32, vec4_f32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kTextureStore);
-  EXPECT_TRUE(result->ReturnType()->Is<sem::Void>());
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), tex);
-  EXPECT_EQ(result->Parameters()[0]->Usage(), ParameterUsage::kTexture);
-  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_i32);
-  EXPECT_EQ(result->Parameters()[1]->Usage(), ParameterUsage::kCoords);
-  EXPECT_EQ(result->Parameters()[2]->Type(), vec4_f32);
-  EXPECT_EQ(result->Parameters()[2]->Usage(), ParameterUsage::kValue);
-}
-
-TEST_F(IntrinsicTableTest, MismatchTexture) {
-  auto* f32 = create<sem::F32>();
-  auto* i32 = create<sem::I32>();
-  auto* vec2_i32 = create<sem::Vector>(i32, 2);
-  auto* result =
-      table->Lookup(IntrinsicType::kTextureLoad, {f32, vec2_i32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, ImplicitLoadOnReference) {
-  auto* f32 = create<sem::F32>();
-  auto* result =
-      table->Lookup(IntrinsicType::kCos,
-                    {create<sem::Reference>(f32, ast::StorageClass::kFunction,
-                                            ast::Access::kReadWrite)},
-                    Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kCos);
-  EXPECT_EQ(result->ReturnType(), f32);
-  ASSERT_EQ(result->Parameters().size(), 1u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), f32);
-}
-
-TEST_F(IntrinsicTableTest, MatchOpenType) {
-  auto* f32 = create<sem::F32>();
-  auto* result =
-      table->Lookup(IntrinsicType::kClamp, {f32, f32, f32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kClamp);
-  EXPECT_EQ(result->ReturnType(), f32);
-  EXPECT_EQ(result->Parameters()[0]->Type(), f32);
-  EXPECT_EQ(result->Parameters()[1]->Type(), f32);
-  EXPECT_EQ(result->Parameters()[2]->Type(), f32);
-}
-
-TEST_F(IntrinsicTableTest, MismatchOpenType) {
-  auto* f32 = create<sem::F32>();
-  auto* u32 = create<sem::U32>();
-  auto* result =
-      table->Lookup(IntrinsicType::kClamp, {f32, u32, f32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchOpenSizeVector) {
-  auto* f32 = create<sem::F32>();
-  auto* vec2_f32 = create<sem::Vector>(f32, 2);
-  auto* result = table->Lookup(IntrinsicType::kClamp,
-                               {vec2_f32, vec2_f32, vec2_f32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kClamp);
-  EXPECT_EQ(result->ReturnType(), vec2_f32);
-  ASSERT_EQ(result->Parameters().size(), 3u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), vec2_f32);
-  EXPECT_EQ(result->Parameters()[1]->Type(), vec2_f32);
-  EXPECT_EQ(result->Parameters()[2]->Type(), vec2_f32);
-}
-
-TEST_F(IntrinsicTableTest, MismatchOpenSizeVector) {
-  auto* f32 = create<sem::F32>();
-  auto* u32 = create<sem::U32>();
-  auto* vec2_f32 = create<sem::Vector>(f32, 2);
-  auto* result =
-      table->Lookup(IntrinsicType::kClamp, {vec2_f32, u32, vec2_f32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, MatchOpenSizeMatrix) {
-  auto* f32 = create<sem::F32>();
-  auto* vec3_f32 = create<sem::Vector>(f32, 3);
-  auto* mat3_f32 = create<sem::Matrix>(vec3_f32, 3);
-  auto* result =
-      table->Lookup(IntrinsicType::kDeterminant, {mat3_f32}, Source{});
-  ASSERT_NE(result, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-  EXPECT_EQ(result->Type(), IntrinsicType::kDeterminant);
-  EXPECT_EQ(result->ReturnType(), f32);
-  ASSERT_EQ(result->Parameters().size(), 1u);
-  EXPECT_EQ(result->Parameters()[0]->Type(), mat3_f32);
-}
-
-TEST_F(IntrinsicTableTest, MismatchOpenSizeMatrix) {
-  auto* f32 = create<sem::F32>();
-  auto* vec2_f32 = create<sem::Vector>(f32, 2);
-  auto* mat3x2_f32 = create<sem::Matrix>(vec2_f32, 3);
-  auto* result =
-      table->Lookup(IntrinsicType::kDeterminant, {mat3x2_f32}, Source{});
-  ASSERT_EQ(result, nullptr);
-  ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
-}
-
-TEST_F(IntrinsicTableTest, OverloadOrderByNumberOfParameters) {
-  // None of the arguments match, so expect the overloads with 2 parameters to
-  // come first
-  auto* bool_ = create<sem::Bool>();
-  table->Lookup(IntrinsicType::kTextureDimensions, {bool_, bool_}, Source{});
-  ASSERT_EQ(Diagnostics().str(),
-            R"(error: no matching call to textureDimensions(bool, bool)
-
-27 candidate functions:
-  textureDimensions(texture: texture_1d<T>, level: i32) -> i32  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_2d<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_2d_array<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_3d<T>, level: i32) -> vec3<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_cube<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_cube_array<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
-  textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
-  textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
-  textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
-  textureDimensions(texture: texture_1d<T>) -> i32  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_2d<T>) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_2d_array<T>) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_3d<T>) -> vec3<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_cube<T>) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_cube_array<T>) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_depth_2d) -> vec2<i32>
-  textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
-  textureDimensions(texture: texture_depth_cube) -> vec2<i32>
-  textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
-  textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
-  textureDimensions(texture: texture_storage_1d<F, A>) -> i32  where: A is write
-  textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<i32>  where: A is write
-  textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<i32>  where: A is write
-  textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<i32>  where: A is write
-  textureDimensions(texture: texture_external) -> vec2<i32>
-)");
-}
-
-TEST_F(IntrinsicTableTest, OverloadOrderByMatchingParameter) {
-  auto* tex = create<sem::DepthTexture>(ast::TextureDimension::k2d);
-  auto* bool_ = create<sem::Bool>();
-  table->Lookup(IntrinsicType::kTextureDimensions, {tex, bool_}, Source{});
-  ASSERT_EQ(
-      Diagnostics().str(),
-      R"(error: no matching call to textureDimensions(texture_depth_2d, bool)
-
-27 candidate functions:
-  textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
-  textureDimensions(texture: texture_depth_2d) -> vec2<i32>
-  textureDimensions(texture: texture_1d<T>, level: i32) -> i32  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_2d<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_2d_array<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_3d<T>, level: i32) -> vec3<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_cube<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_cube_array<T>, level: i32) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
-  textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
-  textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
-  textureDimensions(texture: texture_1d<T>) -> i32  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_2d<T>) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_2d_array<T>) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_3d<T>) -> vec3<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_cube<T>) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_cube_array<T>) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<i32>  where: T is f32, i32 or u32
-  textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
-  textureDimensions(texture: texture_depth_cube) -> vec2<i32>
-  textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
-  textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
-  textureDimensions(texture: texture_storage_1d<F, A>) -> i32  where: A is write
-  textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<i32>  where: A is write
-  textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<i32>  where: A is write
-  textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<i32>  where: A is write
-  textureDimensions(texture: texture_external) -> vec2<i32>
-)");
-}
-
-TEST_F(IntrinsicTableTest, SameOverloadReturnsSameIntrinsicPointer) {
-  auto* f32 = create<sem::F32>();
-  auto* vec2_f32 = create<sem::Vector>(create<sem::F32>(), 2);
-  auto* bool_ = create<sem::Bool>();
-  auto* a = table->Lookup(IntrinsicType::kSelect, {f32, f32, bool_}, Source{});
-  ASSERT_NE(a, nullptr) << Diagnostics().str();
-
-  auto* b = table->Lookup(IntrinsicType::kSelect, {f32, f32, bool_}, Source{});
-  ASSERT_NE(b, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-
-  auto* c = table->Lookup(IntrinsicType::kSelect, {vec2_f32, vec2_f32, bool_},
-                          Source{});
-  ASSERT_NE(c, nullptr) << Diagnostics().str();
-  ASSERT_EQ(Diagnostics().str(), "");
-
-  EXPECT_EQ(a, b);
-  EXPECT_NE(a, c);
-  EXPECT_NE(b, c);
-}
-
-}  // namespace
-}  // namespace tint
diff --git a/src/intrinsics.def b/src/intrinsics.def
deleted file mode 100644
index 02534c3..0000000
--- a/src/intrinsics.def
+++ /dev/null
@@ -1,554 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// WGSL intrinsic definition file                                             //
-//                                                                            //
-// This file is used to generate parts of the Tint IntrinsicTable, various    //
-// enum definition files, as well as test .wgsl files.                        //
-////////////////////////////////////////////////////////////////////////////////
-
-////////////////////////////////////////////////////////////////////////////////
-// Enumerators                                                                //
-////////////////////////////////////////////////////////////////////////////////
-
-// https://gpuweb.github.io/gpuweb/wgsl/#storage-class
-enum storage_class {
-  function
-  private
-  workgroup
-  uniform
-  storage
-  [[internal]] handle
-}
-
-// https://gpuweb.github.io/gpuweb/wgsl/#memory-access-mode
-enum access {
-  read
-  write
-  read_write
-}
-
-// https://gpuweb.github.io/gpuweb/wgsl/#texel-formats
-enum texel_format {
-  rgba8unorm
-  rgba8snorm
-  rgba8uint
-  rgba8sint
-  rgba16uint
-  rgba16sint
-  rgba16float
-  r32uint
-  r32sint
-  r32float
-  rg32uint
-  rg32sint
-  rg32float
-  rgba32uint
-  rgba32sint
-  rgba32float
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// WGSL primitive types                                                       //
-////////////////////////////////////////////////////////////////////////////////
-
-// https://gpuweb.github.io/gpuweb/wgsl/#plain-types-section
-type bool
-type f32
-type i32
-type u32
-type vec2<T>
-type vec3<T>
-type vec4<T>
-[[display("vec{N}<{T}>")]]     type vec<N: num, T>
-[[display("mat{N}x{M}<{T}>")]] type mat<N: num, M: num, T>
-type ptr<S: storage_class, T, A: access>
-type atomic<T>
-type array<T>
-type sampler
-type sampler_comparison
-type texture_1d<T>
-type texture_2d<T>
-type texture_2d_array<T>
-type texture_3d<T>
-type texture_cube<T>
-type texture_cube_array<T>
-type texture_multisampled_2d<T>
-type texture_depth_2d
-type texture_depth_2d_array
-type texture_depth_cube
-type texture_depth_cube_array
-type texture_depth_multisampled_2d
-type texture_storage_1d<F: texel_format, A: access>
-type texture_storage_2d<F: texel_format, A: access>
-type texture_storage_2d_array<F: texel_format, A: access>
-type texture_storage_3d<F: texel_format, A: access>
-type texture_external
-
-type __modf_result
-[[display("__modf_result_vec{N}")]] type __modf_result_vec<N: num>
-type __frexp_result
-[[display("__frexp_result_vec{N}")]] type __frexp_result_vec<N: num>
-
-////////////////////////////////////////////////////////////////////////////////
-// Type matchers                                                              //
-//                                                                            //
-// A type matcher that can match one or more types.                           //
-////////////////////////////////////////////////////////////////////////////////
-
-match fiu32: f32 | i32 | u32
-match iu32: i32 | u32
-match scalar: f32 | i32 | u32 | bool
-
-////////////////////////////////////////////////////////////////////////////////
-// Enum matchers                                                              //
-//                                                                            //
-// A number matcher that can match one or more enumerator values.             //
-// All enumerator values listed in the match declaration need to be from the  //
-// same enum.                                                                 //
-////////////////////////////////////////////////////////////////////////////////
-
-// https://gpuweb.github.io/gpuweb/wgsl/#texel-formats
-match f32_texel_format:
-  rgba8unorm | rgba8snorm | rgba16float | r32float | rg32float | rgba32float
-match i32_texel_format:
-  rgba8sint | rgba16sint | r32sint | rg32sint | rgba32sint
-match u32_texel_format:
-  rgba8uint | rgba16uint | r32uint | rg32uint | rgba32uint
-
-match write_only: write
-
-match function_private_workgroup: function | private | workgroup
-match workgroup_or_storage: workgroup | storage
-
-////////////////////////////////////////////////////////////////////////////////
-// Intrinsic Functions                                                        //
-//                                                                            //
-// The intrinsic function declarations below declare all the built-in         //
-// functions supported by the WGSL language. This intrinsic definition        //
-// language supports simple static-type function declarations, as well as     //
-// single overload declarations that can match a number of different          //
-// argument types via the use of 'open-types' and 'open-numbers'.             //
-//                                                                            //
-// * Basic example:                                                           //
-//                                                                            //
-//    fn isInf(f32) -> bool                                                   //
-//                                                                            //
-//   Declares an overload of the function 'isInf' that accepts a single       //
-//   parameter of type 'f32' and returns a 'bool'.                            //
-//                                                                            //
-// An 'open-type' can be thought as a template type that is determined by the //
-// arguments to the intrinsic.                                                //
-//                                                                            //
-// * Open-type example without constraint:                                    //
-//                                                                            //
-//    fn arrayLength<T>(array<T>) -> u32                                      //
-//                                                                            //
-//    Declares an overload of the function 'arrayLength' that accepts a       //
-//    single argument of an array type with no constraints on the array       //
-//    element type. This overload will always return a value of the same type //
-//    as its single argument.                                                 //
-//                                                                            //
-// * Open-type example with constraint:                                       //
-//                                                                            //
-//    fn abs<T: fiu32>(T) -> T                                                //
-//                                                                            //
-//    Declares an overload of the function 'abs' that accepts a single        //
-//    argument of type 'f32', 'i32' or 'u32', which returns a value of the    //
-//    same argument type.                                                     //
-//                                                                            //
-// Similarly an 'open-number' can be thought as a template number or          //
-// enumerator that is determined by the arguments to the intrinsic.           //
-//                                                                            //
-// * Open-number example:                                                     //
-//                                                                            //
-//    fn dpdx<N: num>(vec<N, f32>) -> vec<N, f32>                             //
-//                                                                            //
-//    Declares an overload of the function 'dpdx' that accepts a single       //
-//    argument of a variable-sized vector of 'f32', which returns a value of  //
-//    the same argument type.                                                 //
-//                                                                            //
-//                                                                            //
-// Matching algorithm:                                                        //
-// -------------------                                                        //
-//                                                                            //
-// Prior to matching an overload, all open-types are undefined.               //
-//                                                                            //
-// Open-types become closed-types (pinned to a fixed type) on the first       //
-// attempt to match an argument to that open-type.                            //
-// Once open-types are closed, they remain that type for the rest of the      //
-// overload evaluation.                                                       //
-//                                                                            //
-// To better understand, let's consider the following hypothetical overload   //
-// declaration:                                                               //
-//                                                                            //
-//    fn foo<T: scalar>(T, T);                                                //
-//                                                                            //
-//    T           - is the open-type                                          //
-//    scalar      - is a matcher for the types 'f32', 'i32', 'u32' or 'bool'  //
-//                  (declared above)                                          //
-//    <T: scalar> - declares the open-type T, with the constraint that T must //
-//                  match one of 'f32', 'i32', 'u32' or 'bool'.               //
-//                                                                            //
-// The process for resolving this overload is as follows:                     //
-//                                                                            //
-//   (1) The overload resolver begins by attempting to match the argument     //
-//       types from left to right.                                            //
-//       The first parameter type is compared against the argument type.      //
-//       As the open-type T has not been closed yet, T is closed as the type  //
-//       of the first argument.                                               //
-//       There's no verification that the T type is a scalar at this stage.   //
-//   (2) The second parameter is then compared against the second argument.   //
-//       As the open-type T is now closed, the argument type is compared      //
-//       against the value of the closed-type of T. If the types match, then  //
-//       the overload is still a candidate for matching, otherwise the        //
-//       overload is no longer considered.                                    //
-//   (3) If all the parameters matched, constraints on the open-types need    //
-//       to be checked next. If the closed-type does not match the 'match'    //
-//       constraint, then the overload is no longer considered.               //
-//                                                                            //
-// The algorithm for matching open-numbers is almost identical to open-types, //
-// except of course, they match against integer numbers or enumerators        //
-// instead of types.                                                          //
-//                                                                            //
-//                                                                            //
-// * More examples:                                                           //
-//                                                                            //
-//   fn F()                                                                   //
-//     - Function called F.                                                   //
-//       No open types or numbers, no parameters, no return value             //
-//                                                                            //
-//   fn F() -> RETURN_TYPE                                                    //
-//     - Function with RETURN_TYPE as the return type value                   //
-//                                                                            //
-//   fn F(f32, i32)                                                           //
-//     - Two fixed-type, anonymous parameters                                 //
-//                                                                            //
-//   fn F(USAGE : f32)                                                        //
-//     - Single parameter with name USAGE.                                    //
-//       Note: Parameter names are used by Tint to infer parameter order for  //
-//       some intrinsic functions                                             //
-//                                                                            //
-//   fn F<T>(T)                                                               //
-//     - Single parameter of unconstrained open-type T (any type)             //
-//                                                                            //
-//   fn F<T: scalar>(T)                                                       //
-//     - Single parameter of constrained open-type T (must be a scalar)       //
-//                                                                            //
-//   fn F<T: fiu32>(T) -> T                                                   //
-//     - Single parameter of constrained open-type T (must be a one of fiu32) //
-//       Return type matches parameter type                                   //
-//                                                                            //
-//   fn F<T, N: num>(vec<N, T>)                                               //
-//     - Single parameter of vector type with open-number size N and element  //
-//       open-type T                                                          //
-//                                                                            //
-//   fn F<A: access>(texture_storage_1d<f32_texel_format, A>)                 //
-//     - Single parameter of texture_storage_1d type with open-number         //
-//       access-control C, and of a texel format that is listed in            //
-//       f32_texel_format                                                     //
-//                                                                            //
-////////////////////////////////////////////////////////////////////////////////
-
-// https://gpuweb.github.io/gpuweb/wgsl/#builtin-functions
-fn abs<T: fiu32>(T) -> T
-fn abs<N: num, T: fiu32>(vec<N, T>) -> vec<N, T>
-fn acos(f32) -> f32
-fn acos<N: num>(vec<N, f32>) -> vec<N, f32>
-fn all(bool) -> bool
-fn all<N: num>(vec<N, bool>) -> bool
-fn any(bool) -> bool
-fn any<N: num>(vec<N, bool>) -> bool
-fn arrayLength<T, A: access>(ptr<storage, array<T>, A>) -> u32
-fn asin(f32) -> f32
-fn asin<N: num>(vec<N, f32>) -> vec<N, f32>
-fn atan(f32) -> f32
-fn atan<N: num>(vec<N, f32>) -> vec<N, f32>
-fn atan2(f32, f32) -> f32
-fn atan2<N: num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32>
-fn ceil(f32) -> f32
-fn ceil<N: num>(vec<N, f32>) -> vec<N, f32>
-fn clamp<T: fiu32>(T, T, T) -> T
-fn clamp<N: num, T: fiu32>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
-fn cos(f32) -> f32
-fn cos<N: num>(vec<N, f32>) -> vec<N, f32>
-fn cosh(f32) -> f32
-fn cosh<N: num>(vec<N, f32>) -> vec<N, f32>
-fn countOneBits<T: iu32>(T) -> T
-fn countOneBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
-fn cross(vec3<f32>, vec3<f32>) -> vec3<f32>
-fn degrees(f32) -> f32
-fn degrees<N: num>(vec<N, f32>) -> vec<N, f32>
-fn determinant<N: num>(mat<N, N, f32>) -> f32
-fn distance(f32, f32) -> f32
-fn distance<N: num>(vec<N, f32>, vec<N, f32>) -> f32
-fn dot<N: num, T: fiu32>(vec<N, T>, vec<N, T>) -> T
-[[stage("fragment")]] fn dpdx(f32) -> f32
-[[stage("fragment")]] fn dpdx<N: num>(vec<N, f32>) -> vec<N, f32>
-[[stage("fragment")]] fn dpdxCoarse(f32) -> f32
-[[stage("fragment")]] fn dpdxCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
-[[stage("fragment")]] fn dpdxFine(f32) -> f32
-[[stage("fragment")]] fn dpdxFine<N: num>(vec<N, f32>) -> vec<N, f32>
-[[stage("fragment")]] fn dpdy(f32) -> f32
-[[stage("fragment")]] fn dpdy<N: num>(vec<N, f32>) -> vec<N, f32>
-[[stage("fragment")]] fn dpdyCoarse(f32) -> f32
-[[stage("fragment")]] fn dpdyCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
-[[stage("fragment")]] fn dpdyFine(f32) -> f32
-[[stage("fragment")]] fn dpdyFine<N: num>(vec<N, f32>) -> vec<N, f32>
-fn exp(f32) -> f32
-fn exp<N: num>(vec<N, f32>) -> vec<N, f32>
-fn exp2(f32) -> f32
-fn exp2<N: num>(vec<N, f32>) -> vec<N, f32>
-fn faceForward<N: num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32>
-fn floor(f32) -> f32
-fn floor<N: num>(vec<N, f32>) -> vec<N, f32>
-fn fma(f32, f32, f32) -> f32
-fn fma<N: num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32>
-fn fract(f32) -> f32
-fn fract<N: num>(vec<N, f32>) -> vec<N, f32>
-fn frexp(f32) -> __frexp_result
-fn frexp<N: num>(vec<N, f32>) -> __frexp_result_vec<N>
-[[stage("fragment")]] fn fwidth(f32) -> f32
-[[stage("fragment")]] fn fwidth<N: num>(vec<N, f32>) -> vec<N, f32>
-[[stage("fragment")]] fn fwidthCoarse(f32) -> f32
-[[stage("fragment")]] fn fwidthCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
-[[stage("fragment")]] fn fwidthFine(f32) -> f32
-[[stage("fragment")]] fn fwidthFine<N: num>(vec<N, f32>) -> vec<N, f32>
-fn inverseSqrt(f32) -> f32
-fn inverseSqrt<N: num>(vec<N, f32>) -> vec<N, f32>
-[[deprecated]] fn isFinite(f32) -> bool
-[[deprecated]] fn isFinite<N: num>(vec<N, f32>) -> vec<N, bool>
-[[deprecated]] fn isInf(f32) -> bool
-[[deprecated]] fn isInf<N: num>(vec<N, f32>) -> vec<N, bool>
-[[deprecated]] fn isNan(f32) -> bool
-[[deprecated]] fn isNan<N: num>(vec<N, f32>) -> vec<N, bool>
-[[deprecated]] fn isNormal(f32) -> bool
-[[deprecated]] fn isNormal<N: num>(vec<N, f32>) -> vec<N, bool>
-fn ldexp(f32, i32) -> f32
-fn ldexp<N: num>(vec<N, f32>, vec<N, i32>) -> vec<N, f32>
-fn length(f32) -> f32
-fn length<N: num>(vec<N, f32>) -> f32
-fn log(f32) -> f32
-fn log<N: num>(vec<N, f32>) -> vec<N, f32>
-fn log2(f32) -> f32
-fn log2<N: num>(vec<N, f32>) -> vec<N, f32>
-fn max<T: fiu32>(T, T) -> T
-fn max<N: num, T: fiu32>(vec<N, T>, vec<N, T>) -> vec<N, T>
-fn min<T: fiu32>(T, T) -> T
-fn min<N: num, T: fiu32>(vec<N, T>, vec<N, T>) -> vec<N, T>
-fn mix(f32, f32, f32) -> f32
-fn mix<N: num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32>
-fn mix<N: num>(vec<N, f32>, vec<N, f32>, f32) -> vec<N, f32>
-fn modf(f32) -> __modf_result
-fn modf<N: num>(vec<N, f32>) -> __modf_result_vec<N>
-fn normalize<N: num>(vec<N, f32>) -> vec<N, f32>
-fn pack2x16float(vec2<f32>) -> u32
-fn pack2x16snorm(vec2<f32>) -> u32
-fn pack2x16unorm(vec2<f32>) -> u32
-fn pack4x8snorm(vec4<f32>) -> u32
-fn pack4x8unorm(vec4<f32>) -> u32
-fn pow(f32, f32) -> f32
-fn pow<N: num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32>
-fn radians(f32) -> f32
-fn radians<N: num>(vec<N, f32>) -> vec<N, f32>
-fn reflect<N: num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32>
-fn refract<N: num>(vec<N, f32>, vec<N, f32>, f32) -> vec<N, f32>
-fn reverseBits<T: iu32>(T) -> T
-fn reverseBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
-fn round(f32) -> f32
-fn round<N: num>(vec<N, f32>) -> vec<N, f32>
-fn select<T: scalar>(T, T, bool) -> T
-fn select<T: scalar, N: num>(vec<N, T>, vec<N, T>, bool) -> vec<N, T>
-fn select<N: num, T: scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T>
-fn sign(f32) -> f32
-fn sign<N: num>(vec<N, f32>) -> vec<N, f32>
-fn sin(f32) -> f32
-fn sin<N: num>(vec<N, f32>) -> vec<N, f32>
-fn sinh(f32) -> f32
-fn sinh<N: num>(vec<N, f32>) -> vec<N, f32>
-fn smoothStep(f32, f32, f32) -> f32
-fn smoothStep<N: num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32>
-fn sqrt(f32) -> f32
-fn sqrt<N: num>(vec<N, f32>) -> vec<N, f32>
-fn step(f32, f32) -> f32
-fn step<N: num>(vec<N, f32>, vec<N, f32>) -> vec<N, f32>
-[[stage("compute")]] fn storageBarrier()
-fn tan(f32) -> f32
-fn tan<N: num>(vec<N, f32>) -> vec<N, f32>
-fn tanh(f32) -> f32
-fn tanh<N: num>(vec<N, f32>) -> vec<N, f32>
-fn transpose<M: num, N: num>(mat<M, N, f32>) -> mat<N, M, f32>
-fn trunc(f32) -> f32
-fn trunc<N: num>(vec<N, f32>) -> vec<N, f32>
-fn unpack2x16float(u32) -> vec2<f32>
-fn unpack2x16snorm(u32) -> vec2<f32>
-fn unpack2x16unorm(u32) -> vec2<f32>
-fn unpack4x8snorm(u32) -> vec4<f32>
-fn unpack4x8unorm(u32) -> vec4<f32>
-[[stage("compute")]] fn workgroupBarrier()
-
-fn textureDimensions<T: fiu32>(texture: texture_1d<T>) -> i32
-fn textureDimensions<T: fiu32>(texture: texture_1d<T>, level: i32) -> i32
-fn textureDimensions<T: fiu32>(texture: texture_2d<T>) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_2d<T>, level: i32) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>, level: i32) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_3d<T>) -> vec3<i32>
-fn textureDimensions<T: fiu32>(texture: texture_3d<T>, level: i32) -> vec3<i32>
-fn textureDimensions<T: fiu32>(texture: texture_cube<T>) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_cube<T>, level: i32) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>, level: i32) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_multisampled_2d<T>) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_2d) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_cube) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
-fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_1d<F, A>) -> i32
-fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_2d<F, A>) -> vec2<i32>
-fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_2d_array<F, A>) -> vec2<i32>
-fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_3d<F, A>) -> vec3<i32>
-fn textureDimensions(texture: texture_external) -> vec2<i32>
-fn textureGather<T: fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T>
-fn textureGather<T: fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<T>
-fn textureGather<T: fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<T>
-fn textureGather<T: fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<T>
-fn textureGather<T: fiu32>(component: i32, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T>
-fn textureGather<T: fiu32>(component: i32, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<T>
-fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
-fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
-fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
-fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32>
-fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
-fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
-fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32>
-fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> vec4<f32>
-fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> vec4<f32>
-fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> vec4<f32>
-fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32>
-fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> vec4<f32>
-fn textureNumLayers<T: fiu32>(texture: texture_2d_array<T>) -> i32
-fn textureNumLayers<T: fiu32>(texture: texture_cube_array<T>) -> i32
-fn textureNumLayers(texture: texture_depth_2d_array) -> i32
-fn textureNumLayers(texture: texture_depth_cube_array) -> i32
-fn textureNumLayers<F: texel_format, A: write_only>(texture: texture_storage_2d_array<F, A>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_1d<T>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_2d<T>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_2d_array<T>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_3d<T>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_cube<T>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_cube_array<T>) -> i32
-fn textureNumLevels(texture: texture_depth_2d) -> i32
-fn textureNumLevels(texture: texture_depth_2d_array) -> i32
-fn textureNumLevels(texture: texture_depth_cube) -> i32
-fn textureNumLevels(texture: texture_depth_cube_array) -> i32
-fn textureNumSamples<T: fiu32>(texture: texture_multisampled_2d<T>) -> i32
-fn textureNumSamples(texture: texture_depth_multisampled_2d) -> i32
-[[stage("fragment")]] fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32>
-[[stage("fragment")]] fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
-[[stage("fragment")]] fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
-[[stage("fragment")]] fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
-[[stage("fragment")]] fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32>
-[[stage("fragment")]] fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
-[[stage("fragment")]] fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, offset: vec3<i32>) -> vec4<f32>
-[[stage("fragment")]] fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
-[[stage("fragment")]] fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
-[[stage("fragment")]] fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32
-[[stage("fragment")]] fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> f32
-[[stage("fragment")]] fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> f32
-[[stage("fragment")]] fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> f32
-[[stage("fragment")]] fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32
-[[stage("fragment")]] fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> f32
-[[stage("fragment")]] fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32>
-[[stage("fragment")]] fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, offset: vec2<i32>) -> vec4<f32>
-[[stage("fragment")]] fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32) -> vec4<f32>
-[[stage("fragment")]] fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32, offset: vec2<i32>) -> vec4<f32>
-[[stage("fragment")]] fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
-[[stage("fragment")]] fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, offset: vec3<i32>) -> vec4<f32>
-[[stage("fragment")]] fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
-[[stage("fragment")]] fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, bias: f32) -> vec4<f32>
-[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
-[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32
-[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32
-[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> f32
-[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
-[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32
-fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
-fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32
-fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32
-fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> f32
-fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
-fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32
-fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
-fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
-fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
-fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
-fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
-fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, offset: vec3<i32>) -> vec4<f32>
-fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
-fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
-fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32>
-fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, offset: vec2<i32>) -> vec4<f32>
-fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32) -> vec4<f32>
-fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32, offset: vec2<i32>) -> vec4<f32>
-fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
-fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, offset: vec3<i32>) -> vec4<f32>
-fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
-fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, level: f32) -> vec4<f32>
-fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32) -> f32
-fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32, offset: vec2<i32>) -> f32
-fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32) -> f32
-fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32, offset: vec2<i32>) -> f32
-fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: i32) -> f32
-fn textureSampleLevel(texture: texture_depth_cube_array,sampler: sampler, coords: vec3<f32>, array_index: i32, level: i32) -> f32
-fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
-fn textureStore(texture: texture_storage_1d<f32_texel_format, write>, coords: i32, value: vec4<f32>)
-fn textureStore(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<i32>, value: vec4<f32>)
-fn textureStore(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
-fn textureStore(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<i32>, value: vec4<f32>)
-fn textureStore(texture: texture_storage_1d<i32_texel_format, write>, coords: i32, value: vec4<i32>)
-fn textureStore(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<i32>, value: vec4<i32>)
-fn textureStore(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
-fn textureStore(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<i32>, value: vec4<i32>)
-fn textureStore(texture: texture_storage_1d<u32_texel_format, write>, coords: i32, value: vec4<u32>)
-fn textureStore(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<i32>, value: vec4<u32>)
-fn textureStore(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
-fn textureStore(texture: texture_storage_3d<u32_texel_format, write>, coords: vec3<i32>, value: vec4<u32>)
-fn textureLoad<T: fiu32>(texture: texture_1d<T>, coords: i32, level: i32) -> vec4<T>
-fn textureLoad<T: fiu32>(texture: texture_2d<T>, coords: vec2<i32>, level: i32) -> vec4<T>
-fn textureLoad<T: fiu32>(texture: texture_2d_array<T>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<T>
-fn textureLoad<T: fiu32>(texture: texture_3d<T>, coords: vec3<i32>, level: i32) -> vec4<T>
-fn textureLoad<T: fiu32>(texture: texture_multisampled_2d<T>, coords: vec2<i32>, sample_index: i32) -> vec4<T>
-fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32
-fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: i32, level: i32) -> f32
-fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<i32>, sample_index: i32) -> f32
-fn textureLoad(texture: texture_external, coords: vec2<i32>) -> vec4<f32>
-
-[[stage("fragment", "compute")]] fn atomicLoad<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T
-[[stage("fragment", "compute")]] fn atomicStore<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T)
-[[stage("fragment", "compute")]] fn atomicAdd<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
-[[stage("fragment", "compute")]] fn atomicSub<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
-[[stage("fragment", "compute")]] fn atomicMax<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
-[[stage("fragment", "compute")]] fn atomicMin<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
-[[stage("fragment", "compute")]] fn atomicAnd<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
-[[stage("fragment", "compute")]] fn atomicOr<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
-[[stage("fragment", "compute")]] fn atomicXor<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
-[[stage("fragment", "compute")]] fn atomicExchange<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T
-[[stage("fragment", "compute")]] fn atomicCompareExchangeWeak<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T, T) -> vec2<T>
diff --git a/src/reader/spirv/function.cc b/src/reader/spirv/function.cc
index ad7b722..b88916e 100644
--- a/src/reader/spirv/function.cc
+++ b/src/reader/spirv/function.cc
@@ -33,8 +33,8 @@
 #include "src/ast/switch_statement.h"
 #include "src/ast/unary_op_expression.h"
 #include "src/ast/variable_decl_statement.h"
+#include "src/sem/builtin_type.h"
 #include "src/sem/depth_texture_type.h"
-#include "src/sem/intrinsic_type.h"
 #include "src/sem/sampled_texture_type.h"
 
 // Terms:
@@ -437,38 +437,38 @@
   return "";
 }
 
-// Returns the WGSL standard library function intrinsic for the
-// given instruction, or sem::IntrinsicType::kNone
-sem::IntrinsicType GetIntrinsic(SpvOp opcode) {
+// Returns the WGSL standard library function builtin for the
+// given instruction, or sem::BuiltinType::kNone
+sem::BuiltinType GetBuiltin(SpvOp opcode) {
   switch (opcode) {
     case SpvOpBitCount:
-      return sem::IntrinsicType::kCountOneBits;
+      return sem::BuiltinType::kCountOneBits;
     case SpvOpBitReverse:
-      return sem::IntrinsicType::kReverseBits;
+      return sem::BuiltinType::kReverseBits;
     case SpvOpDot:
-      return sem::IntrinsicType::kDot;
+      return sem::BuiltinType::kDot;
     case SpvOpDPdx:
-      return sem::IntrinsicType::kDpdx;
+      return sem::BuiltinType::kDpdx;
     case SpvOpDPdy:
-      return sem::IntrinsicType::kDpdy;
+      return sem::BuiltinType::kDpdy;
     case SpvOpFwidth:
-      return sem::IntrinsicType::kFwidth;
+      return sem::BuiltinType::kFwidth;
     case SpvOpDPdxFine:
-      return sem::IntrinsicType::kDpdxFine;
+      return sem::BuiltinType::kDpdxFine;
     case SpvOpDPdyFine:
-      return sem::IntrinsicType::kDpdyFine;
+      return sem::BuiltinType::kDpdyFine;
     case SpvOpFwidthFine:
-      return sem::IntrinsicType::kFwidthFine;
+      return sem::BuiltinType::kFwidthFine;
     case SpvOpDPdxCoarse:
-      return sem::IntrinsicType::kDpdxCoarse;
+      return sem::BuiltinType::kDpdxCoarse;
     case SpvOpDPdyCoarse:
-      return sem::IntrinsicType::kDpdyCoarse;
+      return sem::BuiltinType::kDpdyCoarse;
     case SpvOpFwidthCoarse:
-      return sem::IntrinsicType::kFwidthCoarse;
+      return sem::BuiltinType::kFwidthCoarse;
     default:
       break;
   }
-  return sem::IntrinsicType::kNone;
+  return sem::BuiltinType::kNone;
 }
 
 // @param opcode a SPIR-V opcode
@@ -3888,9 +3888,9 @@
                 std::move(params))};
   }
 
-  const auto intrinsic = GetIntrinsic(opcode);
-  if (intrinsic != sem::IntrinsicType::kNone) {
-    return MakeIntrinsicCall(inst);
+  const auto builtin = GetBuiltin(opcode);
+  if (builtin != sem::BuiltinType::kNone) {
+    return MakeBuiltinCall(inst);
   }
 
   if (opcode == SpvOpFMod) {
@@ -5081,10 +5081,10 @@
   return true;
 }
 
-TypedExpression FunctionEmitter::MakeIntrinsicCall(
+TypedExpression FunctionEmitter::MakeBuiltinCall(
     const spvtools::opt::Instruction& inst) {
-  const auto intrinsic = GetIntrinsic(inst.opcode());
-  auto* name = sem::str(intrinsic);
+  const auto builtin = GetBuiltin(inst.opcode());
+  auto* name = sem::str(builtin);
   auto* ident = create<ast::IdentifierExpression>(
       Source{}, builder_.Symbols().Register(name));
 
@@ -5864,7 +5864,7 @@
   auto* member_access = create<ast::MemberAccessorExpression>(
       Source{}, member_expr.expr, member_ident);
 
-  // Generate the intrinsic function call.
+  // Generate the builtin function call.
   auto* call_expr =
       builder_.Call(Source{}, "arrayLength", builder_.AddressOf(member_access));
 
diff --git a/src/reader/spirv/function.h b/src/reader/spirv/function.h
index e811a0d..6f01c19 100644
--- a/src/reader/spirv/function.h
+++ b/src/reader/spirv/function.h
@@ -995,17 +995,17 @@
   /// @returns false if emission failed
   bool EmitFunctionCall(const spvtools::opt::Instruction& inst);
 
-  /// Emits a control barrier intrinsic.  On failure, emits a diagnostic and
+  /// Emits a control barrier builtin.  On failure, emits a diagnostic and
   /// returns false.
   /// @param inst the SPIR-V control barrier instruction
   /// @returns false if emission failed
   bool EmitControlBarrier(const spvtools::opt::Instruction& inst);
 
   /// Returns an expression for a SPIR-V instruction that maps to a WGSL
-  /// intrinsic function call.
+  /// builtin function call.
   /// @param inst the SPIR-V instruction
   /// @returns an expression
-  TypedExpression MakeIntrinsicCall(const spvtools::opt::Instruction& inst);
+  TypedExpression MakeBuiltinCall(const spvtools::opt::Instruction& inst);
 
   /// Returns an expression for a SPIR-V OpArrayLength instruction.
   /// @param inst the SPIR-V instruction
diff --git a/src/reader/spirv/function_arithmetic_test.cc b/src/reader/spirv/function_arithmetic_test.cc
index 193c885..1114160 100644
--- a/src/reader/spirv/function_arithmetic_test.cc
+++ b/src/reader/spirv/function_arithmetic_test.cc
@@ -935,11 +935,11 @@
       << got;
 }
 
-struct IntrinsicData {
+struct BuiltinData {
   const std::string spirv;
   const std::string wgsl;
 };
-inline std::ostream& operator<<(std::ostream& out, IntrinsicData data) {
+inline std::ostream& operator<<(std::ostream& out, BuiltinData data) {
   out << "OpData{" << data.spirv << "," << data.wgsl << "}";
   return out;
 }
@@ -955,10 +955,10 @@
 }
 
 using SpvBinaryDerivativeTest = SpvParserTestBase<
-    ::testing::TestWithParam<std::tuple<IntrinsicData, ArgAndTypeData>>>;
+    ::testing::TestWithParam<std::tuple<BuiltinData, ArgAndTypeData>>>;
 
 TEST_P(SpvBinaryDerivativeTest, Derivatives) {
-  auto& intrinsic = std::get<0>(GetParam());
+  auto& builtin = std::get<0>(GetParam());
   auto& arg = std::get<1>(GetParam());
 
   const auto assembly = R"(
@@ -968,7 +968,7 @@
      %entry = OpLabel
      %1 = OpCopyObject %)" +
                         arg.spirv_type + " %" + arg.spirv_arg + R"(
-     %2 = )" + intrinsic.spirv +
+     %2 = )" + builtin.spirv +
                         " %" + arg.spirv_type + R"( %1
      OpReturn
      OpFunctionEnd
@@ -979,24 +979,24 @@
   auto fe = p->function_emitter(100);
   EXPECT_TRUE(fe.EmitBody()) << p->error();
   auto ast_body = fe.ast_body();
-  EXPECT_THAT(test::ToString(p->program(), ast_body),
-              HasSubstr("let x_2 : " + arg.ast_type + " = " + intrinsic.wgsl +
-                        "(x_1);"));
+  EXPECT_THAT(
+      test::ToString(p->program(), ast_body),
+      HasSubstr("let x_2 : " + arg.ast_type + " = " + builtin.wgsl + "(x_1);"));
 }
 
 INSTANTIATE_TEST_SUITE_P(
     SpvBinaryDerivativeTest,
     SpvBinaryDerivativeTest,
     testing::Combine(
-        ::testing::Values(IntrinsicData{"OpDPdx", "dpdx"},
-                          IntrinsicData{"OpDPdy", "dpdy"},
-                          IntrinsicData{"OpFwidth", "fwidth"},
-                          IntrinsicData{"OpDPdxFine", "dpdxFine"},
-                          IntrinsicData{"OpDPdyFine", "dpdyFine"},
-                          IntrinsicData{"OpFwidthFine", "fwidthFine"},
-                          IntrinsicData{"OpDPdxCoarse", "dpdxCoarse"},
-                          IntrinsicData{"OpDPdyCoarse", "dpdyCoarse"},
-                          IntrinsicData{"OpFwidthCoarse", "fwidthCoarse"}),
+        ::testing::Values(BuiltinData{"OpDPdx", "dpdx"},
+                          BuiltinData{"OpDPdy", "dpdy"},
+                          BuiltinData{"OpFwidth", "fwidth"},
+                          BuiltinData{"OpDPdxFine", "dpdxFine"},
+                          BuiltinData{"OpDPdyFine", "dpdyFine"},
+                          BuiltinData{"OpFwidthFine", "fwidthFine"},
+                          BuiltinData{"OpDPdxCoarse", "dpdxCoarse"},
+                          BuiltinData{"OpDPdyCoarse", "dpdyCoarse"},
+                          BuiltinData{"OpFwidthCoarse", "fwidthCoarse"}),
         ::testing::Values(
             ArgAndTypeData{"float", "float_50", "f32"},
             ArgAndTypeData{"v2float", "v2float_50_60", "vec2<f32>"},
diff --git a/src/reader/spirv/parser_impl_barrier_test.cc b/src/reader/spirv/parser_impl_barrier_test.cc
index da4df49..69ebafd 100644
--- a/src/reader/spirv/parser_impl_barrier_test.cc
+++ b/src/reader/spirv/parser_impl_barrier_test.cc
@@ -74,9 +74,9 @@
   EXPECT_EQ(call->expr->args.size(), 0u);
   auto* sem_call = program.Sem().Get(call->expr);
   ASSERT_NE(sem_call, nullptr);
-  auto* intrinsic = sem_call->Target()->As<sem::Intrinsic>();
-  ASSERT_NE(intrinsic, nullptr);
-  EXPECT_EQ(intrinsic->Type(), sem::IntrinsicType::kWorkgroupBarrier);
+  auto* builtin = sem_call->Target()->As<sem::Builtin>();
+  ASSERT_NE(builtin, nullptr);
+  EXPECT_EQ(builtin->Type(), sem::BuiltinType::kWorkgroupBarrier);
 }
 
 TEST_F(SpvParserTest, StorageBarrier) {
@@ -108,9 +108,9 @@
   EXPECT_EQ(call->expr->args.size(), 0u);
   auto* sem_call = program.Sem().Get(call->expr);
   ASSERT_NE(sem_call, nullptr);
-  auto* intrinsic = sem_call->Target()->As<sem::Intrinsic>();
-  ASSERT_NE(intrinsic, nullptr);
-  EXPECT_EQ(intrinsic->Type(), sem::IntrinsicType::kStorageBarrier);
+  auto* builtin = sem_call->Target()->As<sem::Builtin>();
+  ASSERT_NE(builtin, nullptr);
+  EXPECT_EQ(builtin->Type(), sem::BuiltinType::kStorageBarrier);
 }
 
 TEST_F(SpvParserTest, ErrBarrierInvalidExecution) {
diff --git a/src/reader/wgsl/parser_impl_error_msg_test.cc b/src/reader/wgsl/parser_impl_error_msg_test.cc
index b7ed0a3..bf3d5b8 100644
--- a/src/reader/wgsl/parser_impl_error_msg_test.cc
+++ b/src/reader/wgsl/parser_impl_error_msg_test.cc
@@ -114,7 +114,7 @@
 )");
 }
 
-TEST_F(ParserImplErrorTest, AssignmentStmtInvalidLHS_IntrinsicFunctionName) {
+TEST_F(ParserImplErrorTest, AssignmentStmtInvalidLHS_BuiltinFunctionName) {
   EXPECT("normalize = 5;",
          R"(test.wgsl:1:1 error: statement found outside of function body
 normalize = 5;
diff --git a/src/resolver/builtin_test.cc b/src/resolver/builtin_test.cc
new file mode 100644
index 0000000..11fd892
--- /dev/null
+++ b/src/resolver/builtin_test.cc
@@ -0,0 +1,2061 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/resolver/resolver.h"
+
+#include "gmock/gmock.h"
+#include "src/ast/assignment_statement.h"
+#include "src/ast/bitcast_expression.h"
+#include "src/ast/break_statement.h"
+#include "src/ast/builtin_texture_helper_test.h"
+#include "src/ast/call_statement.h"
+#include "src/ast/continue_statement.h"
+#include "src/ast/if_statement.h"
+#include "src/ast/loop_statement.h"
+#include "src/ast/return_statement.h"
+#include "src/ast/stage_attribute.h"
+#include "src/ast/struct_block_attribute.h"
+#include "src/ast/switch_statement.h"
+#include "src/ast/unary_op_expression.h"
+#include "src/ast/variable_decl_statement.h"
+#include "src/resolver/resolver_test_helper.h"
+#include "src/sem/call.h"
+#include "src/sem/function.h"
+#include "src/sem/member_accessor_expression.h"
+#include "src/sem/sampled_texture_type.h"
+#include "src/sem/statement.h"
+#include "src/sem/variable.h"
+
+using ::testing::ElementsAre;
+using ::testing::HasSubstr;
+
+namespace tint {
+namespace resolver {
+namespace {
+
+using BuiltinType = sem::BuiltinType;
+
+using ResolverBuiltinTest = ResolverTest;
+
+using ResolverBuiltinDerivativeTest = ResolverTestWithParam<std::string>;
+TEST_P(ResolverBuiltinDerivativeTest, Scalar) {
+  auto name = GetParam();
+
+  Global("ident", ty.f32(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call(name, "ident");
+  Func("func", {}, ty.void_(), {Ignore(expr)},
+       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  ASSERT_TRUE(TypeOf(expr)->Is<sem::F32>());
+}
+
+TEST_P(ResolverBuiltinDerivativeTest, Vector) {
+  auto name = GetParam();
+  Global("ident", ty.vec4<f32>(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call(name, "ident");
+  Func("func", {}, ty.void_(), {Ignore(expr)},
+       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  ASSERT_TRUE(TypeOf(expr)->Is<sem::Vector>());
+  EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::F32>());
+  EXPECT_EQ(TypeOf(expr)->As<sem::Vector>()->Width(), 4u);
+}
+
+TEST_P(ResolverBuiltinDerivativeTest, MissingParam) {
+  auto name = GetParam();
+
+  auto* expr = Call(name);
+  WrapInFunction(expr);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), "error: no matching call to " + name +
+                              "()\n\n"
+                              "2 candidate functions:\n  " +
+                              name + "(f32) -> f32\n  " + name +
+                              "(vecN<f32>) -> vecN<f32>\n");
+}
+
+INSTANTIATE_TEST_SUITE_P(ResolverTest,
+                         ResolverBuiltinDerivativeTest,
+                         testing::Values("dpdx",
+                                         "dpdxCoarse",
+                                         "dpdxFine",
+                                         "dpdy",
+                                         "dpdyCoarse",
+                                         "dpdyFine",
+                                         "fwidth",
+                                         "fwidthCoarse",
+                                         "fwidthFine"));
+
+using ResolverBuiltinTest_BoolMethod = ResolverTestWithParam<std::string>;
+TEST_P(ResolverBuiltinTest_BoolMethod, Scalar) {
+  auto name = GetParam();
+
+  Global("my_var", ty.bool_(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call(name, "my_var");
+  WrapInFunction(expr);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  EXPECT_TRUE(TypeOf(expr)->Is<sem::Bool>());
+}
+TEST_P(ResolverBuiltinTest_BoolMethod, Vector) {
+  auto name = GetParam();
+
+  Global("my_var", ty.vec3<bool>(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call(name, "my_var");
+  WrapInFunction(expr);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  EXPECT_TRUE(TypeOf(expr)->Is<sem::Bool>());
+}
+INSTANTIATE_TEST_SUITE_P(ResolverTest,
+                         ResolverBuiltinTest_BoolMethod,
+                         testing::Values("any", "all"));
+
+using ResolverBuiltinTest_FloatMethod = ResolverTestWithParam<std::string>;
+TEST_P(ResolverBuiltinTest_FloatMethod, Vector) {
+  auto name = GetParam();
+
+  Global("my_var", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call(name, "my_var");
+  WrapInFunction(expr);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  ASSERT_TRUE(TypeOf(expr)->Is<sem::Vector>());
+  EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::Bool>());
+  EXPECT_EQ(TypeOf(expr)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_FloatMethod, Scalar) {
+  auto name = GetParam();
+
+  Global("my_var", ty.f32(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call(name, "my_var");
+  WrapInFunction(expr);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  EXPECT_TRUE(TypeOf(expr)->Is<sem::Bool>());
+}
+
+TEST_P(ResolverBuiltinTest_FloatMethod, MissingParam) {
+  auto name = GetParam();
+
+  Global("my_var", ty.f32(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call(name);
+  WrapInFunction(expr);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), "error: no matching call to " + name +
+                              "()\n\n"
+                              "2 candidate functions:\n  " +
+                              name + "(f32) -> bool\n  " + name +
+                              "(vecN<f32>) -> vecN<bool>\n");
+}
+
+TEST_P(ResolverBuiltinTest_FloatMethod, TooManyParams) {
+  auto name = GetParam();
+
+  Global("my_var", ty.f32(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call(name, "my_var", 1.23f);
+  WrapInFunction(expr);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), "error: no matching call to " + name +
+                              "(f32, f32)\n\n"
+                              "2 candidate functions:\n  " +
+                              name + "(f32) -> bool\n  " + name +
+                              "(vecN<f32>) -> vecN<bool>\n");
+}
+INSTANTIATE_TEST_SUITE_P(
+    ResolverTest,
+    ResolverBuiltinTest_FloatMethod,
+    testing::Values("isInf", "isNan", "isFinite", "isNormal"));
+
+enum class Texture { kF32, kI32, kU32 };
+inline std::ostream& operator<<(std::ostream& out, Texture data) {
+  if (data == Texture::kF32) {
+    out << "f32";
+  } else if (data == Texture::kI32) {
+    out << "i32";
+  } else {
+    out << "u32";
+  }
+  return out;
+}
+
+struct TextureTestParams {
+  ast::TextureDimension dim;
+  Texture type = Texture::kF32;
+  ast::TexelFormat format = ast::TexelFormat::kR32Float;
+};
+inline std::ostream& operator<<(std::ostream& out, TextureTestParams data) {
+  out << data.dim << "_" << data.type;
+  return out;
+}
+
+class ResolverBuiltinTest_TextureOperation
+    : public ResolverTestWithParam<TextureTestParams> {
+ public:
+  /// Gets an appropriate type for the coords parameter depending the the
+  /// dimensionality of the texture being sampled.
+  /// @param dim dimensionality of the texture being sampled
+  /// @param scalar the scalar type
+  /// @returns a pointer to a type appropriate for the coord param
+  const ast::Type* GetCoordsType(ast::TextureDimension dim,
+                                 const ast::Type* scalar) {
+    switch (dim) {
+      case ast::TextureDimension::k1d:
+        return scalar;
+      case ast::TextureDimension::k2d:
+      case ast::TextureDimension::k2dArray:
+        return ty.vec(scalar, 2);
+      case ast::TextureDimension::k3d:
+      case ast::TextureDimension::kCube:
+      case ast::TextureDimension::kCubeArray:
+        return ty.vec(scalar, 3);
+      default:
+        [=]() { FAIL() << "Unsupported texture dimension: " << dim; }();
+    }
+    return nullptr;
+  }
+
+  void add_call_param(std::string name,
+                      const ast::Type* type,
+                      ast::ExpressionList* call_params) {
+    if (type->IsAnyOf<ast::Texture, ast::Sampler>()) {
+      Global(name, type,
+             ast::AttributeList{
+                 create<ast::BindingAttribute>(0),
+                 create<ast::GroupAttribute>(0),
+             });
+
+    } else {
+      Global(name, type, ast::StorageClass::kPrivate);
+    }
+
+    call_params->push_back(Expr(name));
+  }
+  const ast::Type* subtype(Texture type) {
+    if (type == Texture::kF32) {
+      return ty.f32();
+    }
+    if (type == Texture::kI32) {
+      return ty.i32();
+    }
+    return ty.u32();
+  }
+};
+
+using ResolverBuiltinTest_SampledTextureOperation =
+    ResolverBuiltinTest_TextureOperation;
+TEST_P(ResolverBuiltinTest_SampledTextureOperation, TextureLoadSampled) {
+  auto dim = GetParam().dim;
+  auto type = GetParam().type;
+
+  auto* s = subtype(type);
+  auto* coords_type = GetCoordsType(dim, ty.i32());
+  auto* texture_type = ty.sampled_texture(dim, s);
+
+  ast::ExpressionList call_params;
+
+  add_call_param("texture", texture_type, &call_params);
+  add_call_param("coords", coords_type, &call_params);
+  if (dim == ast::TextureDimension::k2dArray) {
+    add_call_param("array_index", ty.i32(), &call_params);
+  }
+  add_call_param("level", ty.i32(), &call_params);
+
+  auto* expr = Call("textureLoad", call_params);
+  WrapInFunction(expr);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  ASSERT_TRUE(TypeOf(expr)->Is<sem::Vector>());
+  if (type == Texture::kF32) {
+    EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::F32>());
+  } else if (type == Texture::kI32) {
+    EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::I32>());
+  } else {
+    EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::U32>());
+  }
+  EXPECT_EQ(TypeOf(expr)->As<sem::Vector>()->Width(), 4u);
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    ResolverTest,
+    ResolverBuiltinTest_SampledTextureOperation,
+    testing::Values(TextureTestParams{ast::TextureDimension::k1d},
+                    TextureTestParams{ast::TextureDimension::k2d},
+                    TextureTestParams{ast::TextureDimension::k2dArray},
+                    TextureTestParams{ast::TextureDimension::k3d}));
+
+TEST_F(ResolverBuiltinTest, Dot_Vec2) {
+  Global("my_var", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call("dot", "my_var", "my_var");
+  WrapInFunction(expr);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  EXPECT_TRUE(TypeOf(expr)->Is<sem::F32>());
+}
+
+TEST_F(ResolverBuiltinTest, Dot_Vec3) {
+  Global("my_var", ty.vec3<i32>(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call("dot", "my_var", "my_var");
+  WrapInFunction(expr);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  EXPECT_TRUE(TypeOf(expr)->Is<sem::I32>());
+}
+
+TEST_F(ResolverBuiltinTest, Dot_Vec4) {
+  Global("my_var", ty.vec4<u32>(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call("dot", "my_var", "my_var");
+  WrapInFunction(expr);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  EXPECT_TRUE(TypeOf(expr)->Is<sem::U32>());
+}
+
+TEST_F(ResolverBuiltinTest, Dot_Error_Scalar) {
+  auto* expr = Call("dot", 1.0f, 1.0f);
+  WrapInFunction(expr);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            R"(error: no matching call to dot(f32, f32)
+
+1 candidate function:
+  dot(vecN<T>, vecN<T>) -> T  where: T is f32, i32 or u32
+)");
+}
+
+TEST_F(ResolverBuiltinTest, Select) {
+  Global("my_var", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+
+  Global("bool_var", ty.vec3<bool>(), ast::StorageClass::kPrivate);
+
+  auto* expr = Call("select", "my_var", "my_var", "bool_var");
+  WrapInFunction(expr);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(expr), nullptr);
+  EXPECT_TRUE(TypeOf(expr)->Is<sem::Vector>());
+  EXPECT_EQ(TypeOf(expr)->As<sem::Vector>()->Width(), 3u);
+  EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::F32>());
+}
+
+TEST_F(ResolverBuiltinTest, Select_Error_NoParams) {
+  auto* expr = Call("select");
+  WrapInFunction(expr);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            R"(error: no matching call to select()
+
+3 candidate functions:
+  select(T, T, bool) -> T  where: T is f32, i32, u32 or bool
+  select(vecN<T>, vecN<T>, bool) -> vecN<T>  where: T is f32, i32, u32 or bool
+  select(vecN<T>, vecN<T>, vecN<bool>) -> vecN<T>  where: T is f32, i32, u32 or bool
+)");
+}
+
+TEST_F(ResolverBuiltinTest, Select_Error_SelectorInt) {
+  auto* expr = Call("select", 1, 1, 1);
+  WrapInFunction(expr);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            R"(error: no matching call to select(i32, i32, i32)
+
+3 candidate functions:
+  select(T, T, bool) -> T  where: T is f32, i32, u32 or bool
+  select(vecN<T>, vecN<T>, bool) -> vecN<T>  where: T is f32, i32, u32 or bool
+  select(vecN<T>, vecN<T>, vecN<bool>) -> vecN<T>  where: T is f32, i32, u32 or bool
+)");
+}
+
+TEST_F(ResolverBuiltinTest, Select_Error_Matrix) {
+  auto* expr = Call(
+      "select", mat2x2<f32>(vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f)),
+      mat2x2<f32>(vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f)), Expr(true));
+  WrapInFunction(expr);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            R"(error: no matching call to select(mat2x2<f32>, mat2x2<f32>, bool)
+
+3 candidate functions:
+  select(T, T, bool) -> T  where: T is f32, i32, u32 or bool
+  select(vecN<T>, vecN<T>, bool) -> vecN<T>  where: T is f32, i32, u32 or bool
+  select(vecN<T>, vecN<T>, vecN<bool>) -> vecN<T>  where: T is f32, i32, u32 or bool
+)");
+}
+
+TEST_F(ResolverBuiltinTest, Select_Error_MismatchTypes) {
+  auto* expr = Call("select", 1.0f, vec2<f32>(2.0f, 3.0f), Expr(true));
+  WrapInFunction(expr);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            R"(error: no matching call to select(f32, vec2<f32>, bool)
+
+3 candidate functions:
+  select(T, T, bool) -> T  where: T is f32, i32, u32 or bool
+  select(vecN<T>, vecN<T>, bool) -> vecN<T>  where: T is f32, i32, u32 or bool
+  select(vecN<T>, vecN<T>, vecN<bool>) -> vecN<T>  where: T is f32, i32, u32 or bool
+)");
+}
+
+TEST_F(ResolverBuiltinTest, Select_Error_MismatchVectorSize) {
+  auto* expr = Call("select", vec2<f32>(1.0f, 2.0f),
+                    vec3<f32>(3.0f, 4.0f, 5.0f), Expr(true));
+  WrapInFunction(expr);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            R"(error: no matching call to select(vec2<f32>, vec3<f32>, bool)
+
+3 candidate functions:
+  select(T, T, bool) -> T  where: T is f32, i32, u32 or bool
+  select(vecN<T>, vecN<T>, bool) -> vecN<T>  where: T is f32, i32, u32 or bool
+  select(vecN<T>, vecN<T>, vecN<bool>) -> vecN<T>  where: T is f32, i32, u32 or bool
+)");
+}
+
+struct BuiltinData {
+  const char* name;
+  BuiltinType builtin;
+};
+
+inline std::ostream& operator<<(std::ostream& out, BuiltinData data) {
+  out << data.name;
+  return out;
+}
+
+using ResolverBuiltinTest_Barrier = ResolverTestWithParam<BuiltinData>;
+TEST_P(ResolverBuiltinTest_Barrier, InferType) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name);
+  WrapInFunction(CallStmt(call));
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::Void>());
+}
+
+TEST_P(ResolverBuiltinTest_Barrier, Error_TooManyParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec4<f32>(1.f, 2.f, 3.f, 4.f), 1.0f);
+  WrapInFunction(CallStmt(call));
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_THAT(r()->error(), HasSubstr("error: no matching call to " +
+                                      std::string(param.name)));
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    ResolverTest,
+    ResolverBuiltinTest_Barrier,
+    testing::Values(BuiltinData{"storageBarrier", BuiltinType::kStorageBarrier},
+                    BuiltinData{"workgroupBarrier",
+                                BuiltinType::kWorkgroupBarrier}));
+
+using ResolverBuiltinTest_DataPacking = ResolverTestWithParam<BuiltinData>;
+TEST_P(ResolverBuiltinTest_DataPacking, InferType) {
+  auto param = GetParam();
+
+  bool pack4 = param.builtin == BuiltinType::kPack4x8snorm ||
+               param.builtin == BuiltinType::kPack4x8unorm;
+
+  auto* call = pack4 ? Call(param.name, vec4<f32>(1.f, 2.f, 3.f, 4.f))
+                     : Call(param.name, vec2<f32>(1.f, 2.f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
+}
+
+TEST_P(ResolverBuiltinTest_DataPacking, Error_IncorrectParamType) {
+  auto param = GetParam();
+
+  bool pack4 = param.builtin == BuiltinType::kPack4x8snorm ||
+               param.builtin == BuiltinType::kPack4x8unorm;
+
+  auto* call = pack4 ? Call(param.name, vec4<i32>(1, 2, 3, 4))
+                     : Call(param.name, vec2<i32>(1, 2));
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_THAT(r()->error(), HasSubstr("error: no matching call to " +
+                                      std::string(param.name)));
+}
+
+TEST_P(ResolverBuiltinTest_DataPacking, Error_NoParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_THAT(r()->error(), HasSubstr("error: no matching call to " +
+                                      std::string(param.name)));
+}
+
+TEST_P(ResolverBuiltinTest_DataPacking, Error_TooManyParams) {
+  auto param = GetParam();
+
+  bool pack4 = param.builtin == BuiltinType::kPack4x8snorm ||
+               param.builtin == BuiltinType::kPack4x8unorm;
+
+  auto* call = pack4 ? Call(param.name, vec4<f32>(1.f, 2.f, 3.f, 4.f), 1.0f)
+                     : Call(param.name, vec2<f32>(1.f, 2.f), 1.0f);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_THAT(r()->error(), HasSubstr("error: no matching call to " +
+                                      std::string(param.name)));
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    ResolverTest,
+    ResolverBuiltinTest_DataPacking,
+    testing::Values(BuiltinData{"pack4x8snorm", BuiltinType::kPack4x8snorm},
+                    BuiltinData{"pack4x8unorm", BuiltinType::kPack4x8unorm},
+                    BuiltinData{"pack2x16snorm", BuiltinType::kPack2x16snorm},
+                    BuiltinData{"pack2x16unorm", BuiltinType::kPack2x16unorm},
+                    BuiltinData{"pack2x16float", BuiltinType::kPack2x16float}));
+
+using ResolverBuiltinTest_DataUnpacking = ResolverTestWithParam<BuiltinData>;
+TEST_P(ResolverBuiltinTest_DataUnpacking, InferType) {
+  auto param = GetParam();
+
+  bool pack4 = param.builtin == BuiltinType::kUnpack4x8snorm ||
+               param.builtin == BuiltinType::kUnpack4x8unorm;
+
+  auto* call = Call(param.name, 1u);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_vector());
+  if (pack4) {
+    EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 4u);
+  } else {
+    EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 2u);
+  }
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    ResolverTest,
+    ResolverBuiltinTest_DataUnpacking,
+    testing::Values(
+        BuiltinData{"unpack4x8snorm", BuiltinType::kUnpack4x8snorm},
+        BuiltinData{"unpack4x8unorm", BuiltinType::kUnpack4x8unorm},
+        BuiltinData{"unpack2x16snorm", BuiltinType::kUnpack2x16snorm},
+        BuiltinData{"unpack2x16unorm", BuiltinType::kUnpack2x16unorm},
+        BuiltinData{"unpack2x16float", BuiltinType::kUnpack2x16float}));
+
+using ResolverBuiltinTest_SingleParam = ResolverTestWithParam<BuiltinData>;
+TEST_P(ResolverBuiltinTest_SingleParam, Scalar) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1.f);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
+}
+
+TEST_P(ResolverBuiltinTest_SingleParam, Vector) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<f32>(1.0f, 1.0f, 3.0f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_SingleParam, Error_NoParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            "error: no matching call to " + std::string(param.name) +
+                "()\n\n"
+                "2 candidate functions:\n  " +
+                std::string(param.name) + "(f32) -> f32\n  " +
+                std::string(param.name) + "(vecN<f32>) -> vecN<f32>\n");
+}
+
+TEST_P(ResolverBuiltinTest_SingleParam, Error_TooManyParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1, 2, 3);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            "error: no matching call to " + std::string(param.name) +
+                "(i32, i32, i32)\n\n"
+                "2 candidate functions:\n  " +
+                std::string(param.name) + "(f32) -> f32\n  " +
+                std::string(param.name) + "(vecN<f32>) -> vecN<f32>\n");
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    ResolverTest,
+    ResolverBuiltinTest_SingleParam,
+    testing::Values(BuiltinData{"acos", BuiltinType::kAcos},
+                    BuiltinData{"asin", BuiltinType::kAsin},
+                    BuiltinData{"atan", BuiltinType::kAtan},
+                    BuiltinData{"ceil", BuiltinType::kCeil},
+                    BuiltinData{"cos", BuiltinType::kCos},
+                    BuiltinData{"cosh", BuiltinType::kCosh},
+                    BuiltinData{"exp", BuiltinType::kExp},
+                    BuiltinData{"exp2", BuiltinType::kExp2},
+                    BuiltinData{"floor", BuiltinType::kFloor},
+                    BuiltinData{"fract", BuiltinType::kFract},
+                    BuiltinData{"inverseSqrt", BuiltinType::kInverseSqrt},
+                    BuiltinData{"log", BuiltinType::kLog},
+                    BuiltinData{"log2", BuiltinType::kLog2},
+                    BuiltinData{"round", BuiltinType::kRound},
+                    BuiltinData{"sign", BuiltinType::kSign},
+                    BuiltinData{"sin", BuiltinType::kSin},
+                    BuiltinData{"sinh", BuiltinType::kSinh},
+                    BuiltinData{"sqrt", BuiltinType::kSqrt},
+                    BuiltinData{"tan", BuiltinType::kTan},
+                    BuiltinData{"tanh", BuiltinType::kTanh},
+                    BuiltinData{"trunc", BuiltinType::kTrunc}));
+
+using ResolverBuiltinDataTest = ResolverTest;
+
+TEST_F(ResolverBuiltinDataTest, ArrayLength_Vector) {
+  auto* ary = ty.array<i32>();
+  auto* str =
+      Structure("S", {Member("x", ary)}, {create<ast::StructBlockAttribute>()});
+  Global("a", ty.Of(str), ast::StorageClass::kStorage, ast::Access::kRead,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(0),
+             create<ast::GroupAttribute>(0),
+         });
+
+  auto* call = Call("arrayLength", AddressOf(MemberAccessor("a", "x")));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
+}
+
+TEST_F(ResolverBuiltinDataTest, ArrayLength_Error_ArraySized) {
+  Global("arr", ty.array<int, 4>(), ast::StorageClass::kPrivate);
+  auto* call = Call("arrayLength", AddressOf("arr"));
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(
+      r()->error(),
+      R"(error: no matching call to arrayLength(ptr<private, array<i32, 4>, read_write>)
+
+1 candidate function:
+  arrayLength(ptr<storage, array<T>, A>) -> u32
+)");
+}
+
+TEST_F(ResolverBuiltinDataTest, Normalize_Vector) {
+  auto* call = Call("normalize", vec3<f32>(1.0f, 1.0f, 3.0f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_F(ResolverBuiltinDataTest, Normalize_Error_NoParams) {
+  auto* call = Call("normalize");
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), R"(error: no matching call to normalize()
+
+1 candidate function:
+  normalize(vecN<f32>) -> vecN<f32>
+)");
+}
+
+TEST_F(ResolverBuiltinDataTest, FrexpScalar) {
+  auto* call = Call("frexp", 1.0f);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  auto* ty = TypeOf(call)->As<sem::Struct>();
+  ASSERT_NE(ty, nullptr);
+  ASSERT_EQ(ty->Members().size(), 2u);
+
+  auto* sig = ty->Members()[0];
+  EXPECT_TRUE(sig->Type()->Is<sem::F32>());
+  EXPECT_EQ(sig->Offset(), 0u);
+  EXPECT_EQ(sig->Size(), 4u);
+  EXPECT_EQ(sig->Align(), 4u);
+  EXPECT_EQ(sig->Name(), Sym("sig"));
+
+  auto* exp = ty->Members()[1];
+  EXPECT_TRUE(exp->Type()->Is<sem::I32>());
+  EXPECT_EQ(exp->Offset(), 4u);
+  EXPECT_EQ(exp->Size(), 4u);
+  EXPECT_EQ(exp->Align(), 4u);
+  EXPECT_EQ(exp->Name(), Sym("exp"));
+
+  EXPECT_EQ(ty->Size(), 8u);
+  EXPECT_EQ(ty->SizeNoPadding(), 8u);
+}
+
+TEST_F(ResolverBuiltinDataTest, FrexpVector) {
+  auto* call = Call("frexp", vec3<f32>());
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  auto* ty = TypeOf(call)->As<sem::Struct>();
+  ASSERT_NE(ty, nullptr);
+  ASSERT_EQ(ty->Members().size(), 2u);
+
+  auto* sig = ty->Members()[0];
+  ASSERT_TRUE(sig->Type()->Is<sem::Vector>());
+  EXPECT_EQ(sig->Type()->As<sem::Vector>()->Width(), 3u);
+  EXPECT_TRUE(sig->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
+  EXPECT_EQ(sig->Offset(), 0u);
+  EXPECT_EQ(sig->Size(), 12u);
+  EXPECT_EQ(sig->Align(), 16u);
+  EXPECT_EQ(sig->Name(), Sym("sig"));
+
+  auto* exp = ty->Members()[1];
+  ASSERT_TRUE(exp->Type()->Is<sem::Vector>());
+  EXPECT_EQ(exp->Type()->As<sem::Vector>()->Width(), 3u);
+  EXPECT_TRUE(exp->Type()->As<sem::Vector>()->type()->Is<sem::I32>());
+  EXPECT_EQ(exp->Offset(), 16u);
+  EXPECT_EQ(exp->Size(), 12u);
+  EXPECT_EQ(exp->Align(), 16u);
+  EXPECT_EQ(exp->Name(), Sym("exp"));
+
+  EXPECT_EQ(ty->Size(), 32u);
+  EXPECT_EQ(ty->SizeNoPadding(), 28u);
+}
+
+TEST_F(ResolverBuiltinDataTest, Frexp_Error_FirstParamInt) {
+  Global("v", ty.i32(), ast::StorageClass::kWorkgroup);
+  auto* call = Call("frexp", 1, AddressOf("v"));
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(
+      r()->error(),
+      R"(error: no matching call to frexp(i32, ptr<workgroup, i32, read_write>)
+
+2 candidate functions:
+  frexp(f32) -> __frexp_result
+  frexp(vecN<f32>) -> __frexp_result_vecN
+)");
+}
+
+TEST_F(ResolverBuiltinDataTest, Frexp_Error_SecondParamFloatPtr) {
+  Global("v", ty.f32(), ast::StorageClass::kWorkgroup);
+  auto* call = Call("frexp", 1.0f, AddressOf("v"));
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(
+      r()->error(),
+      R"(error: no matching call to frexp(f32, ptr<workgroup, f32, read_write>)
+
+2 candidate functions:
+  frexp(f32) -> __frexp_result
+  frexp(vecN<f32>) -> __frexp_result_vecN
+)");
+}
+
+TEST_F(ResolverBuiltinDataTest, Frexp_Error_SecondParamNotAPointer) {
+  auto* call = Call("frexp", 1.0f, 1);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), R"(error: no matching call to frexp(f32, i32)
+
+2 candidate functions:
+  frexp(f32) -> __frexp_result
+  frexp(vecN<f32>) -> __frexp_result_vecN
+)");
+}
+
+TEST_F(ResolverBuiltinDataTest, Frexp_Error_VectorSizesDontMatch) {
+  Global("v", ty.vec4<i32>(), ast::StorageClass::kWorkgroup);
+  auto* call = Call("frexp", vec2<f32>(1.0f, 2.0f), AddressOf("v"));
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(
+      r()->error(),
+      R"(error: no matching call to frexp(vec2<f32>, ptr<workgroup, vec4<i32>, read_write>)
+
+2 candidate functions:
+  frexp(vecN<f32>) -> __frexp_result_vecN
+  frexp(f32) -> __frexp_result
+)");
+}
+
+TEST_F(ResolverBuiltinDataTest, ModfScalar) {
+  auto* call = Call("modf", 1.0f);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  auto* ty = TypeOf(call)->As<sem::Struct>();
+  ASSERT_NE(ty, nullptr);
+  ASSERT_EQ(ty->Members().size(), 2u);
+
+  auto* fract = ty->Members()[0];
+  EXPECT_TRUE(fract->Type()->Is<sem::F32>());
+  EXPECT_EQ(fract->Offset(), 0u);
+  EXPECT_EQ(fract->Size(), 4u);
+  EXPECT_EQ(fract->Align(), 4u);
+  EXPECT_EQ(fract->Name(), Sym("fract"));
+
+  auto* whole = ty->Members()[1];
+  EXPECT_TRUE(whole->Type()->Is<sem::F32>());
+  EXPECT_EQ(whole->Offset(), 4u);
+  EXPECT_EQ(whole->Size(), 4u);
+  EXPECT_EQ(whole->Align(), 4u);
+  EXPECT_EQ(whole->Name(), Sym("whole"));
+
+  EXPECT_EQ(ty->Size(), 8u);
+  EXPECT_EQ(ty->SizeNoPadding(), 8u);
+}
+
+TEST_F(ResolverBuiltinDataTest, ModfVector) {
+  auto* call = Call("modf", vec3<f32>());
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  auto* ty = TypeOf(call)->As<sem::Struct>();
+  ASSERT_NE(ty, nullptr);
+  ASSERT_EQ(ty->Members().size(), 2u);
+
+  auto* fract = ty->Members()[0];
+  ASSERT_TRUE(fract->Type()->Is<sem::Vector>());
+  EXPECT_EQ(fract->Type()->As<sem::Vector>()->Width(), 3u);
+  EXPECT_TRUE(fract->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
+  EXPECT_EQ(fract->Offset(), 0u);
+  EXPECT_EQ(fract->Size(), 12u);
+  EXPECT_EQ(fract->Align(), 16u);
+  EXPECT_EQ(fract->Name(), Sym("fract"));
+
+  auto* whole = ty->Members()[1];
+  ASSERT_TRUE(whole->Type()->Is<sem::Vector>());
+  EXPECT_EQ(whole->Type()->As<sem::Vector>()->Width(), 3u);
+  EXPECT_TRUE(whole->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
+  EXPECT_EQ(whole->Offset(), 16u);
+  EXPECT_EQ(whole->Size(), 12u);
+  EXPECT_EQ(whole->Align(), 16u);
+  EXPECT_EQ(whole->Name(), Sym("whole"));
+
+  EXPECT_EQ(ty->Size(), 32u);
+  EXPECT_EQ(ty->SizeNoPadding(), 28u);
+}
+
+TEST_F(ResolverBuiltinDataTest, Modf_Error_FirstParamInt) {
+  Global("whole", ty.f32(), ast::StorageClass::kWorkgroup);
+  auto* call = Call("modf", 1, AddressOf("whole"));
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(
+      r()->error(),
+      R"(error: no matching call to modf(i32, ptr<workgroup, f32, read_write>)
+
+2 candidate functions:
+  modf(f32) -> __modf_result
+  modf(vecN<f32>) -> __modf_result_vecN
+)");
+}
+
+TEST_F(ResolverBuiltinDataTest, Modf_Error_SecondParamIntPtr) {
+  Global("whole", ty.i32(), ast::StorageClass::kWorkgroup);
+  auto* call = Call("modf", 1.0f, AddressOf("whole"));
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(
+      r()->error(),
+      R"(error: no matching call to modf(f32, ptr<workgroup, i32, read_write>)
+
+2 candidate functions:
+  modf(f32) -> __modf_result
+  modf(vecN<f32>) -> __modf_result_vecN
+)");
+}
+
+TEST_F(ResolverBuiltinDataTest, Modf_Error_SecondParamNotAPointer) {
+  auto* call = Call("modf", 1.0f, 1.0f);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), R"(error: no matching call to modf(f32, f32)
+
+2 candidate functions:
+  modf(f32) -> __modf_result
+  modf(vecN<f32>) -> __modf_result_vecN
+)");
+}
+
+TEST_F(ResolverBuiltinDataTest, Modf_Error_VectorSizesDontMatch) {
+  Global("whole", ty.vec4<f32>(), ast::StorageClass::kWorkgroup);
+  auto* call = Call("modf", vec2<f32>(1.0f, 2.0f), AddressOf("whole"));
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(
+      r()->error(),
+      R"(error: no matching call to modf(vec2<f32>, ptr<workgroup, vec4<f32>, read_write>)
+
+2 candidate functions:
+  modf(vecN<f32>) -> __modf_result_vecN
+  modf(f32) -> __modf_result
+)");
+}
+
+using ResolverBuiltinTest_SingleParam_FloatOrInt =
+    ResolverTestWithParam<BuiltinData>;
+TEST_P(ResolverBuiltinTest_SingleParam_FloatOrInt, Float_Scalar) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1.f);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
+}
+
+TEST_P(ResolverBuiltinTest_SingleParam_FloatOrInt, Float_Vector) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<f32>(1.0f, 1.0f, 3.0f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_SingleParam_FloatOrInt, Sint_Scalar) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, -1);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+}
+
+TEST_P(ResolverBuiltinTest_SingleParam_FloatOrInt, Sint_Vector) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<i32>(1, 1, 3));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_signed_integer_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_SingleParam_FloatOrInt, Uint_Scalar) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1u);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
+}
+
+TEST_P(ResolverBuiltinTest_SingleParam_FloatOrInt, Uint_Vector) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<u32>(1u, 1u, 3u));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_unsigned_integer_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_SingleParam_FloatOrInt, Error_NoParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            "error: no matching call to " + std::string(param.name) +
+                "()\n\n"
+                "2 candidate functions:\n  " +
+                std::string(param.name) +
+                "(T) -> T  where: T is f32, i32 or u32\n  " +
+                std::string(param.name) +
+                "(vecN<T>) -> vecN<T>  where: T is f32, i32 or u32\n");
+}
+
+INSTANTIATE_TEST_SUITE_P(ResolverTest,
+                         ResolverBuiltinTest_SingleParam_FloatOrInt,
+                         testing::Values(BuiltinData{"abs",
+                                                     BuiltinType::kAbs}));
+
+TEST_F(ResolverBuiltinTest, Length_Scalar) {
+  auto* call = Call("length", 1.f);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
+}
+
+TEST_F(ResolverBuiltinTest, Length_FloatVector) {
+  auto* call = Call("length", vec3<f32>(1.0f, 1.0f, 3.0f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
+}
+
+using ResolverBuiltinTest_TwoParam = ResolverTestWithParam<BuiltinData>;
+TEST_P(ResolverBuiltinTest_TwoParam, Scalar) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1.f, 1.f);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
+}
+
+TEST_P(ResolverBuiltinTest_TwoParam, Vector) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<f32>(1.0f, 1.0f, 3.0f),
+                    vec3<f32>(1.0f, 1.0f, 3.0f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_TwoParam, Error_NoTooManyParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1, 2, 3);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            "error: no matching call to " + std::string(param.name) +
+                "(i32, i32, i32)\n\n"
+                "2 candidate functions:\n  " +
+                std::string(param.name) + "(f32, f32) -> f32\n  " +
+                std::string(param.name) +
+                "(vecN<f32>, vecN<f32>) -> vecN<f32>\n");
+}
+
+TEST_P(ResolverBuiltinTest_TwoParam, Error_NoParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            "error: no matching call to " + std::string(param.name) +
+                "()\n\n"
+                "2 candidate functions:\n  " +
+                std::string(param.name) + "(f32, f32) -> f32\n  " +
+                std::string(param.name) +
+                "(vecN<f32>, vecN<f32>) -> vecN<f32>\n");
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    ResolverTest,
+    ResolverBuiltinTest_TwoParam,
+    testing::Values(BuiltinData{"atan2", BuiltinType::kAtan2},
+                    BuiltinData{"pow", BuiltinType::kPow},
+                    BuiltinData{"step", BuiltinType::kStep}));
+
+TEST_F(ResolverBuiltinTest, Distance_Scalar) {
+  auto* call = Call("distance", 1.f, 1.f);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
+}
+
+TEST_F(ResolverBuiltinTest, Distance_Vector) {
+  auto* call = Call("distance", vec3<f32>(1.0f, 1.0f, 3.0f),
+                    vec3<f32>(1.0f, 1.0f, 3.0f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
+}
+
+TEST_F(ResolverBuiltinTest, Cross) {
+  auto* call =
+      Call("cross", vec3<f32>(1.0f, 2.0f, 3.0f), vec3<f32>(1.0f, 2.0f, 3.0f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_F(ResolverBuiltinTest, Cross_Error_NoArgs) {
+  auto* call = Call("cross");
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), R"(error: no matching call to cross()
+
+1 candidate function:
+  cross(vec3<f32>, vec3<f32>) -> vec3<f32>
+)");
+}
+
+TEST_F(ResolverBuiltinTest, Cross_Error_Scalar) {
+  auto* call = Call("cross", 1.0f, 1.0f);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), R"(error: no matching call to cross(f32, f32)
+
+1 candidate function:
+  cross(vec3<f32>, vec3<f32>) -> vec3<f32>
+)");
+}
+
+TEST_F(ResolverBuiltinTest, Cross_Error_Vec3Int) {
+  auto* call = Call("cross", vec3<i32>(1, 2, 3), vec3<i32>(1, 2, 3));
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            R"(error: no matching call to cross(vec3<i32>, vec3<i32>)
+
+1 candidate function:
+  cross(vec3<f32>, vec3<f32>) -> vec3<f32>
+)");
+}
+
+TEST_F(ResolverBuiltinTest, Cross_Error_Vec4) {
+  auto* call = Call("cross", vec4<f32>(1.0f, 2.0f, 3.0f, 4.0f),
+                    vec4<f32>(1.0f, 2.0f, 3.0f, 4.0f));
+
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            R"(error: no matching call to cross(vec4<f32>, vec4<f32>)
+
+1 candidate function:
+  cross(vec3<f32>, vec3<f32>) -> vec3<f32>
+)");
+}
+
+TEST_F(ResolverBuiltinTest, Cross_Error_TooManyParams) {
+  auto* call = Call("cross", vec3<f32>(1.0f, 2.0f, 3.0f),
+                    vec3<f32>(1.0f, 2.0f, 3.0f), vec3<f32>(1.0f, 2.0f, 3.0f));
+
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            R"(error: no matching call to cross(vec3<f32>, vec3<f32>, vec3<f32>)
+
+1 candidate function:
+  cross(vec3<f32>, vec3<f32>) -> vec3<f32>
+)");
+}
+TEST_F(ResolverBuiltinTest, Normalize) {
+  auto* call = Call("normalize", vec3<f32>(1.0f, 1.0f, 3.0f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_F(ResolverBuiltinTest, Normalize_NoArgs) {
+  auto* call = Call("normalize");
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), R"(error: no matching call to normalize()
+
+1 candidate function:
+  normalize(vecN<f32>) -> vecN<f32>
+)");
+}
+
+using ResolverBuiltinTest_ThreeParam = ResolverTestWithParam<BuiltinData>;
+TEST_P(ResolverBuiltinTest_ThreeParam, Scalar) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1.f, 1.f, 1.f);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
+}
+
+TEST_P(ResolverBuiltinTest_ThreeParam, Vector) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<f32>(1.0f, 1.0f, 3.0f),
+                    vec3<f32>(1.0f, 1.0f, 3.0f), vec3<f32>(1.0f, 1.0f, 3.0f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+TEST_P(ResolverBuiltinTest_ThreeParam, Error_NoParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_THAT(r()->error(), HasSubstr("error: no matching call to " +
+                                      std::string(param.name) + "()"));
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    ResolverTest,
+    ResolverBuiltinTest_ThreeParam,
+    testing::Values(BuiltinData{"mix", BuiltinType::kMix},
+                    BuiltinData{"smoothStep", BuiltinType::kSmoothStep},
+                    BuiltinData{"fma", BuiltinType::kFma}));
+
+using ResolverBuiltinTest_ThreeParam_FloatOrInt =
+    ResolverTestWithParam<BuiltinData>;
+TEST_P(ResolverBuiltinTest_ThreeParam_FloatOrInt, Float_Scalar) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1.f, 1.f, 1.f);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
+}
+
+TEST_P(ResolverBuiltinTest_ThreeParam_FloatOrInt, Float_Vector) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<f32>(1.0f, 1.0f, 3.0f),
+                    vec3<f32>(1.0f, 1.0f, 3.0f), vec3<f32>(1.0f, 1.0f, 3.0f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_ThreeParam_FloatOrInt, Sint_Scalar) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1, 1, 1);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+}
+
+TEST_P(ResolverBuiltinTest_ThreeParam_FloatOrInt, Sint_Vector) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<i32>(1, 1, 3), vec3<i32>(1, 1, 3),
+                    vec3<i32>(1, 1, 3));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_signed_integer_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_ThreeParam_FloatOrInt, Uint_Scalar) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1u, 1u, 1u);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
+}
+
+TEST_P(ResolverBuiltinTest_ThreeParam_FloatOrInt, Uint_Vector) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<u32>(1u, 1u, 3u), vec3<u32>(1u, 1u, 3u),
+                    vec3<u32>(1u, 1u, 3u));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_unsigned_integer_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_ThreeParam_FloatOrInt, Error_NoParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            "error: no matching call to " + std::string(param.name) +
+                "()\n\n"
+                "2 candidate functions:\n  " +
+                std::string(param.name) +
+                "(T, T, T) -> T  where: T is f32, i32 or u32\n  " +
+                std::string(param.name) +
+                "(vecN<T>, vecN<T>, vecN<T>) -> vecN<T>  where: T is f32, i32 "
+                "or u32\n");
+}
+
+INSTANTIATE_TEST_SUITE_P(ResolverTest,
+                         ResolverBuiltinTest_ThreeParam_FloatOrInt,
+                         testing::Values(BuiltinData{"clamp",
+                                                     BuiltinType::kClamp}));
+
+using ResolverBuiltinTest_Int_SingleParam = ResolverTestWithParam<BuiltinData>;
+TEST_P(ResolverBuiltinTest_Int_SingleParam, Scalar) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_integer_scalar());
+}
+
+TEST_P(ResolverBuiltinTest_Int_SingleParam, Vector) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<i32>(1, 1, 3));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_signed_integer_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_Int_SingleParam, Error_NoParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), "error: no matching call to " +
+                              std::string(param.name) +
+                              "()\n\n"
+                              "2 candidate functions:\n  " +
+                              std::string(param.name) +
+                              "(T) -> T  where: T is i32 or u32\n  " +
+                              std::string(param.name) +
+                              "(vecN<T>) -> vecN<T>  where: T is i32 or u32\n");
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    ResolverTest,
+    ResolverBuiltinTest_Int_SingleParam,
+    testing::Values(BuiltinData{"countOneBits", BuiltinType::kCountOneBits},
+                    BuiltinData{"reverseBits", BuiltinType::kReverseBits}));
+
+using ResolverBuiltinTest_FloatOrInt_TwoParam =
+    ResolverTestWithParam<BuiltinData>;
+TEST_P(ResolverBuiltinTest_FloatOrInt_TwoParam, Scalar_Signed) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1, 1);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+}
+
+TEST_P(ResolverBuiltinTest_FloatOrInt_TwoParam, Scalar_Unsigned) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1u, 1u);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
+}
+
+TEST_P(ResolverBuiltinTest_FloatOrInt_TwoParam, Scalar_Float) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, 1.0f, 1.0f);
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
+}
+
+TEST_P(ResolverBuiltinTest_FloatOrInt_TwoParam, Vector_Signed) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<i32>(1, 1, 3), vec3<i32>(1, 1, 3));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_signed_integer_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_FloatOrInt_TwoParam, Vector_Unsigned) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name, vec3<u32>(1u, 1u, 3u), vec3<u32>(1u, 1u, 3u));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_unsigned_integer_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_FloatOrInt_TwoParam, Vector_Float) {
+  auto param = GetParam();
+
+  auto* call =
+      Call(param.name, vec3<f32>(1.f, 1.f, 3.f), vec3<f32>(1.f, 1.f, 3.f));
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->is_float_vector());
+  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
+}
+
+TEST_P(ResolverBuiltinTest_FloatOrInt_TwoParam, Error_NoParams) {
+  auto param = GetParam();
+
+  auto* call = Call(param.name);
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(),
+            "error: no matching call to " + std::string(param.name) +
+                "()\n\n"
+                "2 candidate functions:\n  " +
+                std::string(param.name) +
+                "(T, T) -> T  where: T is f32, i32 or u32\n  " +
+                std::string(param.name) +
+                "(vecN<T>, vecN<T>) -> vecN<T>  where: T is f32, i32 or u32\n");
+}
+
+INSTANTIATE_TEST_SUITE_P(ResolverTest,
+                         ResolverBuiltinTest_FloatOrInt_TwoParam,
+                         testing::Values(BuiltinData{"min", BuiltinType::kMin},
+                                         BuiltinData{"max",
+                                                     BuiltinType::kMax}));
+
+TEST_F(ResolverBuiltinTest, Determinant_2x2) {
+  Global("var", ty.mat2x2<f32>(), ast::StorageClass::kPrivate);
+
+  auto* call = Call("determinant", "var");
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
+}
+
+TEST_F(ResolverBuiltinTest, Determinant_3x3) {
+  Global("var", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
+
+  auto* call = Call("determinant", "var");
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
+}
+
+TEST_F(ResolverBuiltinTest, Determinant_4x4) {
+  Global("var", ty.mat4x4<f32>(), ast::StorageClass::kPrivate);
+
+  auto* call = Call("determinant", "var");
+  WrapInFunction(call);
+
+  EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+  ASSERT_NE(TypeOf(call), nullptr);
+  EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
+}
+
+TEST_F(ResolverBuiltinTest, Determinant_NotSquare) {
+  Global("var", ty.mat2x3<f32>(), ast::StorageClass::kPrivate);
+
+  auto* call = Call("determinant", "var");
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), R"(error: no matching call to determinant(mat2x3<f32>)
+
+1 candidate function:
+  determinant(matNxN<f32>) -> f32
+)");
+}
+
+TEST_F(ResolverBuiltinTest, Determinant_NotMatrix) {
+  Global("var", ty.f32(), ast::StorageClass::kPrivate);
+
+  auto* call = Call("determinant", "var");
+  WrapInFunction(call);
+
+  EXPECT_FALSE(r()->Resolve());
+
+  EXPECT_EQ(r()->error(), R"(error: no matching call to determinant(f32)
+
+1 candidate function:
+  determinant(matNxN<f32>) -> f32
+)");
+}
+
+using ResolverBuiltinTest_Texture =
+    ResolverTestWithParam<ast::builtin::test::TextureOverloadCase>;
+
+INSTANTIATE_TEST_SUITE_P(
+    ResolverTest,
+    ResolverBuiltinTest_Texture,
+    testing::ValuesIn(ast::builtin::test::TextureOverloadCase::ValidCases()));
+
+std::string to_str(const std::string& function,
+                   const sem::ParameterList& params) {
+  std::stringstream out;
+  out << function << "(";
+  bool first = true;
+  for (auto* param : params) {
+    if (!first) {
+      out << ", ";
+    }
+    out << sem::str(param->Usage());
+    first = false;
+  }
+  out << ")";
+  return out.str();
+}
+
+const char* expected_texture_overload(
+    ast::builtin::test::ValidTextureOverload overload) {
+  using ValidTextureOverload = ast::builtin::test::ValidTextureOverload;
+  switch (overload) {
+    case ValidTextureOverload::kDimensions1d:
+    case ValidTextureOverload::kDimensions2d:
+    case ValidTextureOverload::kDimensions2dArray:
+    case ValidTextureOverload::kDimensions3d:
+    case ValidTextureOverload::kDimensionsCube:
+    case ValidTextureOverload::kDimensionsCubeArray:
+    case ValidTextureOverload::kDimensionsMultisampled2d:
+    case ValidTextureOverload::kDimensionsDepth2d:
+    case ValidTextureOverload::kDimensionsDepth2dArray:
+    case ValidTextureOverload::kDimensionsDepthCube:
+    case ValidTextureOverload::kDimensionsDepthCubeArray:
+    case ValidTextureOverload::kDimensionsDepthMultisampled2d:
+    case ValidTextureOverload::kDimensionsStorageWO1d:
+    case ValidTextureOverload::kDimensionsStorageWO2d:
+    case ValidTextureOverload::kDimensionsStorageWO2dArray:
+    case ValidTextureOverload::kDimensionsStorageWO3d:
+      return R"(textureDimensions(texture))";
+    case ValidTextureOverload::kGather2dF32:
+      return R"(textureGather(component, texture, sampler, coords))";
+    case ValidTextureOverload::kGather2dOffsetF32:
+      return R"(textureGather(component, texture, sampler, coords, offset))";
+    case ValidTextureOverload::kGather2dArrayF32:
+      return R"(textureGather(component, texture, sampler, coords, array_index))";
+    case ValidTextureOverload::kGather2dArrayOffsetF32:
+      return R"(textureGather(component, texture, sampler, coords, array_index, offset))";
+    case ValidTextureOverload::kGatherCubeF32:
+      return R"(textureGather(component, texture, sampler, coords))";
+    case ValidTextureOverload::kGatherCubeArrayF32:
+      return R"(textureGather(component, texture, sampler, coords, array_index))";
+    case ValidTextureOverload::kGatherDepth2dF32:
+      return R"(textureGather(texture, sampler, coords))";
+    case ValidTextureOverload::kGatherDepth2dOffsetF32:
+      return R"(textureGather(texture, sampler, coords, offset))";
+    case ValidTextureOverload::kGatherDepth2dArrayF32:
+      return R"(textureGather(texture, sampler, coords, array_index))";
+    case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
+      return R"(textureGather(texture, sampler, coords, array_index, offset))";
+    case ValidTextureOverload::kGatherDepthCubeF32:
+      return R"(textureGather(texture, sampler, coords))";
+    case ValidTextureOverload::kGatherDepthCubeArrayF32:
+      return R"(textureGather(texture, sampler, coords, array_index))";
+    case ValidTextureOverload::kGatherCompareDepth2dF32:
+      return R"(textureGatherCompare(texture, sampler, coords, depth_ref))";
+    case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
+      return R"(textureGatherCompare(texture, sampler, coords, depth_ref, offset))";
+    case ValidTextureOverload::kGatherCompareDepth2dArrayF32:
+      return R"(textureGatherCompare(texture, sampler, coords, array_index, depth_ref))";
+    case ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32:
+      return R"(textureGatherCompare(texture, sampler, coords, array_index, depth_ref, offset))";
+    case ValidTextureOverload::kGatherCompareDepthCubeF32:
+      return R"(textureGatherCompare(texture, sampler, coords, depth_ref))";
+    case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
+      return R"(textureGatherCompare(texture, sampler, coords, array_index, depth_ref))";
+    case ValidTextureOverload::kNumLayers2dArray:
+    case ValidTextureOverload::kNumLayersCubeArray:
+    case ValidTextureOverload::kNumLayersDepth2dArray:
+    case ValidTextureOverload::kNumLayersDepthCubeArray:
+    case ValidTextureOverload::kNumLayersStorageWO2dArray:
+      return R"(textureNumLayers(texture))";
+    case ValidTextureOverload::kNumLevels2d:
+    case ValidTextureOverload::kNumLevels2dArray:
+    case ValidTextureOverload::kNumLevels3d:
+    case ValidTextureOverload::kNumLevelsCube:
+    case ValidTextureOverload::kNumLevelsCubeArray:
+    case ValidTextureOverload::kNumLevelsDepth2d:
+    case ValidTextureOverload::kNumLevelsDepth2dArray:
+    case ValidTextureOverload::kNumLevelsDepthCube:
+    case ValidTextureOverload::kNumLevelsDepthCubeArray:
+      return R"(textureNumLevels(texture))";
+    case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
+    case ValidTextureOverload::kNumSamplesMultisampled2d:
+      return R"(textureNumSamples(texture))";
+    case ValidTextureOverload::kDimensions2dLevel:
+    case ValidTextureOverload::kDimensions2dArrayLevel:
+    case ValidTextureOverload::kDimensions3dLevel:
+    case ValidTextureOverload::kDimensionsCubeLevel:
+    case ValidTextureOverload::kDimensionsCubeArrayLevel:
+    case ValidTextureOverload::kDimensionsDepth2dLevel:
+    case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
+    case ValidTextureOverload::kDimensionsDepthCubeLevel:
+    case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
+      return R"(textureDimensions(texture, level))";
+    case ValidTextureOverload::kSample1dF32:
+      return R"(textureSample(texture, sampler, coords))";
+    case ValidTextureOverload::kSample2dF32:
+      return R"(textureSample(texture, sampler, coords))";
+    case ValidTextureOverload::kSample2dOffsetF32:
+      return R"(textureSample(texture, sampler, coords, offset))";
+    case ValidTextureOverload::kSample2dArrayF32:
+      return R"(textureSample(texture, sampler, coords, array_index))";
+    case ValidTextureOverload::kSample2dArrayOffsetF32:
+      return R"(textureSample(texture, sampler, coords, array_index, offset))";
+    case ValidTextureOverload::kSample3dF32:
+      return R"(textureSample(texture, sampler, coords))";
+    case ValidTextureOverload::kSample3dOffsetF32:
+      return R"(textureSample(texture, sampler, coords, offset))";
+    case ValidTextureOverload::kSampleCubeF32:
+      return R"(textureSample(texture, sampler, coords))";
+    case ValidTextureOverload::kSampleCubeArrayF32:
+      return R"(textureSample(texture, sampler, coords, array_index))";
+    case ValidTextureOverload::kSampleDepth2dF32:
+      return R"(textureSample(texture, sampler, coords))";
+    case ValidTextureOverload::kSampleDepth2dOffsetF32:
+      return R"(textureSample(texture, sampler, coords, offset))";
+    case ValidTextureOverload::kSampleDepth2dArrayF32:
+      return R"(textureSample(texture, sampler, coords, array_index))";
+    case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
+      return R"(textureSample(texture, sampler, coords, array_index, offset))";
+    case ValidTextureOverload::kSampleDepthCubeF32:
+      return R"(textureSample(texture, sampler, coords))";
+    case ValidTextureOverload::kSampleDepthCubeArrayF32:
+      return R"(textureSample(texture, sampler, coords, array_index))";
+    case ValidTextureOverload::kSampleBias2dF32:
+      return R"(textureSampleBias(texture, sampler, coords, bias))";
+    case ValidTextureOverload::kSampleBias2dOffsetF32:
+      return R"(textureSampleBias(texture, sampler, coords, bias, offset))";
+    case ValidTextureOverload::kSampleBias2dArrayF32:
+      return R"(textureSampleBias(texture, sampler, coords, array_index, bias))";
+    case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
+      return R"(textureSampleBias(texture, sampler, coords, array_index, bias, offset))";
+    case ValidTextureOverload::kSampleBias3dF32:
+      return R"(textureSampleBias(texture, sampler, coords, bias))";
+    case ValidTextureOverload::kSampleBias3dOffsetF32:
+      return R"(textureSampleBias(texture, sampler, coords, bias, offset))";
+    case ValidTextureOverload::kSampleBiasCubeF32:
+      return R"(textureSampleBias(texture, sampler, coords, bias))";
+    case ValidTextureOverload::kSampleBiasCubeArrayF32:
+      return R"(textureSampleBias(texture, sampler, coords, array_index, bias))";
+    case ValidTextureOverload::kSampleLevel2dF32:
+      return R"(textureSampleLevel(texture, sampler, coords, level))";
+    case ValidTextureOverload::kSampleLevel2dOffsetF32:
+      return R"(textureSampleLevel(texture, sampler, coords, level, offset))";
+    case ValidTextureOverload::kSampleLevel2dArrayF32:
+      return R"(textureSampleLevel(texture, sampler, coords, array_index, level))";
+    case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
+      return R"(textureSampleLevel(texture, sampler, coords, array_index, level, offset))";
+    case ValidTextureOverload::kSampleLevel3dF32:
+      return R"(textureSampleLevel(texture, sampler, coords, level))";
+    case ValidTextureOverload::kSampleLevel3dOffsetF32:
+      return R"(textureSampleLevel(texture, sampler, coords, level, offset))";
+    case ValidTextureOverload::kSampleLevelCubeF32:
+      return R"(textureSampleLevel(texture, sampler, coords, level))";
+    case ValidTextureOverload::kSampleLevelCubeArrayF32:
+      return R"(textureSampleLevel(texture, sampler, coords, array_index, level))";
+    case ValidTextureOverload::kSampleLevelDepth2dF32:
+      return R"(textureSampleLevel(texture, sampler, coords, level))";
+    case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
+      return R"(textureSampleLevel(texture, sampler, coords, level, offset))";
+    case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
+      return R"(textureSampleLevel(texture, sampler, coords, array_index, level))";
+    case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
+      return R"(textureSampleLevel(texture, sampler, coords, array_index, level, offset))";
+    case ValidTextureOverload::kSampleLevelDepthCubeF32:
+      return R"(textureSampleLevel(texture, sampler, coords, level))";
+    case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
+      return R"(textureSampleLevel(texture, sampler, coords, array_index, level))";
+    case ValidTextureOverload::kSampleGrad2dF32:
+      return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy))";
+    case ValidTextureOverload::kSampleGrad2dOffsetF32:
+      return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy, offset))";
+    case ValidTextureOverload::kSampleGrad2dArrayF32:
+      return R"(textureSampleGrad(texture, sampler, coords, array_index, ddx, ddy))";
+    case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
+      return R"(textureSampleGrad(texture, sampler, coords, array_index, ddx, ddy, offset))";
+    case ValidTextureOverload::kSampleGrad3dF32:
+      return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy))";
+    case ValidTextureOverload::kSampleGrad3dOffsetF32:
+      return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy, offset))";
+    case ValidTextureOverload::kSampleGradCubeF32:
+      return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy))";
+    case ValidTextureOverload::kSampleGradCubeArrayF32:
+      return R"(textureSampleGrad(texture, sampler, coords, array_index, ddx, ddy))";
+    case ValidTextureOverload::kSampleCompareDepth2dF32:
+      return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
+    case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
+      return R"(textureSampleCompare(texture, sampler, coords, depth_ref, offset))";
+    case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
+      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
+    case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
+      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref, offset))";
+    case ValidTextureOverload::kSampleCompareDepthCubeF32:
+      return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
+    case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
+      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
+      return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
+      return R"(textureSampleCompare(texture, sampler, coords, depth_ref, offset))";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
+      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
+      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref, offset))";
+    case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
+      return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
+    case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
+      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
+    case ValidTextureOverload::kLoad1dLevelF32:
+    case ValidTextureOverload::kLoad1dLevelU32:
+    case ValidTextureOverload::kLoad1dLevelI32:
+    case ValidTextureOverload::kLoad2dLevelF32:
+    case ValidTextureOverload::kLoad2dLevelU32:
+    case ValidTextureOverload::kLoad2dLevelI32:
+      return R"(textureLoad(texture, coords, level))";
+    case ValidTextureOverload::kLoad2dArrayLevelF32:
+    case ValidTextureOverload::kLoad2dArrayLevelU32:
+    case ValidTextureOverload::kLoad2dArrayLevelI32:
+      return R"(textureLoad(texture, coords, array_index, level))";
+    case ValidTextureOverload::kLoad3dLevelF32:
+    case ValidTextureOverload::kLoad3dLevelU32:
+    case ValidTextureOverload::kLoad3dLevelI32:
+    case ValidTextureOverload::kLoadDepth2dLevelF32:
+      return R"(textureLoad(texture, coords, level))";
+    case ValidTextureOverload::kLoadDepthMultisampled2dF32:
+    case ValidTextureOverload::kLoadMultisampled2dF32:
+    case ValidTextureOverload::kLoadMultisampled2dU32:
+    case ValidTextureOverload::kLoadMultisampled2dI32:
+      return R"(textureLoad(texture, coords, sample_index))";
+    case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
+      return R"(textureLoad(texture, coords, array_index, level))";
+    case ValidTextureOverload::kStoreWO1dRgba32float:
+    case ValidTextureOverload::kStoreWO2dRgba32float:
+    case ValidTextureOverload::kStoreWO3dRgba32float:
+      return R"(textureStore(texture, coords, value))";
+    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
+      return R"(textureStore(texture, coords, array_index, value))";
+  }
+  return "<unmatched texture overload>";
+}
+
+TEST_P(ResolverBuiltinTest_Texture, Call) {
+  auto param = GetParam();
+
+  param.BuildTextureVariable(this);
+  param.BuildSamplerVariable(this);
+
+  auto* call = Call(param.function, param.args(this));
+  auto* stmt = CallStmt(call);
+  Func("func", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
+
+  ASSERT_TRUE(r()->Resolve()) << r()->error();
+
+  if (std::string(param.function) == "textureDimensions") {
+    switch (param.texture_dimension) {
+      default:
+        FAIL() << "invalid texture dimensions: " << param.texture_dimension;
+      case ast::TextureDimension::k1d:
+        EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+        break;
+      case ast::TextureDimension::k2d:
+      case ast::TextureDimension::k2dArray:
+      case ast::TextureDimension::kCube:
+      case ast::TextureDimension::kCubeArray: {
+        auto* vec = As<sem::Vector>(TypeOf(call));
+        ASSERT_NE(vec, nullptr);
+        EXPECT_EQ(vec->Width(), 2u);
+        EXPECT_TRUE(vec->type()->Is<sem::I32>());
+        break;
+      }
+      case ast::TextureDimension::k3d: {
+        auto* vec = As<sem::Vector>(TypeOf(call));
+        ASSERT_NE(vec, nullptr);
+        EXPECT_EQ(vec->Width(), 3u);
+        EXPECT_TRUE(vec->type()->Is<sem::I32>());
+        break;
+      }
+    }
+  } else if (std::string(param.function) == "textureNumLayers") {
+    EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+  } else if (std::string(param.function) == "textureNumLevels") {
+    EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+  } else if (std::string(param.function) == "textureNumSamples") {
+    EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+  } else if (std::string(param.function) == "textureStore") {
+    EXPECT_TRUE(TypeOf(call)->Is<sem::Void>());
+  } else if (std::string(param.function) == "textureGather") {
+    auto* vec = As<sem::Vector>(TypeOf(call));
+    ASSERT_NE(vec, nullptr);
+    EXPECT_EQ(vec->Width(), 4u);
+    switch (param.texture_data_type) {
+      case ast::builtin::test::TextureDataType::kF32:
+        EXPECT_TRUE(vec->type()->Is<sem::F32>());
+        break;
+      case ast::builtin::test::TextureDataType::kU32:
+        EXPECT_TRUE(vec->type()->Is<sem::U32>());
+        break;
+      case ast::builtin::test::TextureDataType::kI32:
+        EXPECT_TRUE(vec->type()->Is<sem::I32>());
+        break;
+    }
+  } else if (std::string(param.function) == "textureGatherCompare") {
+    auto* vec = As<sem::Vector>(TypeOf(call));
+    ASSERT_NE(vec, nullptr);
+    EXPECT_EQ(vec->Width(), 4u);
+    EXPECT_TRUE(vec->type()->Is<sem::F32>());
+  } else {
+    switch (param.texture_kind) {
+      case ast::builtin::test::TextureKind::kRegular:
+      case ast::builtin::test::TextureKind::kMultisampled:
+      case ast::builtin::test::TextureKind::kStorage: {
+        auto* vec = TypeOf(call)->As<sem::Vector>();
+        ASSERT_NE(vec, nullptr);
+        switch (param.texture_data_type) {
+          case ast::builtin::test::TextureDataType::kF32:
+            EXPECT_TRUE(vec->type()->Is<sem::F32>());
+            break;
+          case ast::builtin::test::TextureDataType::kU32:
+            EXPECT_TRUE(vec->type()->Is<sem::U32>());
+            break;
+          case ast::builtin::test::TextureDataType::kI32:
+            EXPECT_TRUE(vec->type()->Is<sem::I32>());
+            break;
+        }
+        break;
+      }
+      case ast::builtin::test::TextureKind::kDepth:
+      case ast::builtin::test::TextureKind::kDepthMultisampled: {
+        EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
+        break;
+      }
+    }
+  }
+
+  auto* call_sem = Sem().Get(call);
+  ASSERT_NE(call_sem, nullptr);
+  auto* target = call_sem->Target();
+  ASSERT_NE(target, nullptr);
+
+  auto got = resolver::to_str(param.function, target->Parameters());
+  auto* expected = expected_texture_overload(param.overload);
+  EXPECT_EQ(got, expected);
+}
+
+}  // namespace
+}  // namespace resolver
+}  // namespace tint
diff --git a/src/resolver/builtin_validation_test.cc b/src/resolver/builtin_validation_test.cc
new file mode 100644
index 0000000..70c776b
--- /dev/null
+++ b/src/resolver/builtin_validation_test.cc
@@ -0,0 +1,402 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/ast/builtin_texture_helper_test.h"
+#include "src/resolver/resolver_test_helper.h"
+
+namespace tint {
+namespace resolver {
+namespace {
+
+using ResolverBuiltinValidationTest = ResolverTest;
+
+TEST_F(ResolverBuiltinValidationTest,
+       FunctionTypeMustMatchReturnStatementType_void_fail) {
+  // fn func { return workgroupBarrier(); }
+  Func("func", {}, ty.void_(),
+       {
+           Return(Call(Source{Source::Location{12, 34}}, "workgroupBarrier")),
+       });
+
+  EXPECT_FALSE(r()->Resolve());
+  EXPECT_EQ(r()->error(),
+            "12:34 error: builtin 'workgroupBarrier' does not return a value");
+}
+
+TEST_F(ResolverBuiltinValidationTest, InvalidPipelineStageDirect) {
+  // @stage(compute) @workgroup_size(1) fn func { return dpdx(1.0); }
+
+  auto* dpdx = create<ast::CallExpression>(Source{{3, 4}}, Expr("dpdx"),
+                                           ast::ExpressionList{Expr(1.0f)});
+  Func(Source{{1, 2}}, "func", ast::VariableList{}, ty.void_(),
+       {CallStmt(dpdx)},
+       {Stage(ast::PipelineStage::kCompute), WorkgroupSize(1)});
+
+  EXPECT_FALSE(r()->Resolve());
+  EXPECT_EQ(r()->error(),
+            "3:4 error: built-in cannot be used by compute pipeline stage");
+}
+
+TEST_F(ResolverBuiltinValidationTest, InvalidPipelineStageIndirect) {
+  // fn f0 { return dpdx(1.0); }
+  // fn f1 { f0(); }
+  // fn f2 { f1(); }
+  // @stage(compute) @workgroup_size(1) fn main { return f2(); }
+
+  auto* dpdx = create<ast::CallExpression>(Source{{3, 4}}, Expr("dpdx"),
+                                           ast::ExpressionList{Expr(1.0f)});
+  Func(Source{{1, 2}}, "f0", {}, ty.void_(), {CallStmt(dpdx)});
+
+  Func(Source{{3, 4}}, "f1", {}, ty.void_(), {CallStmt(Call("f0"))});
+
+  Func(Source{{5, 6}}, "f2", {}, ty.void_(), {CallStmt(Call("f1"))});
+
+  Func(Source{{7, 8}}, "main", {}, ty.void_(), {CallStmt(Call("f2"))},
+       {Stage(ast::PipelineStage::kCompute), WorkgroupSize(1)});
+
+  EXPECT_FALSE(r()->Resolve());
+  EXPECT_EQ(r()->error(),
+            R"(3:4 error: built-in cannot be used by compute pipeline stage
+1:2 note: called by function 'f0'
+3:4 note: called by function 'f1'
+5:6 note: called by function 'f2'
+7:8 note: called by entry point 'main')");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsFunction) {
+  Func(Source{{12, 34}}, "mix", {}, ty.i32(), {});
+
+  EXPECT_FALSE(r()->Resolve());
+  EXPECT_EQ(
+      r()->error(),
+      R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a function)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalLet) {
+  GlobalConst(Source{{12, 34}}, "mix", ty.i32(), Expr(1));
+
+  EXPECT_FALSE(r()->Resolve());
+  EXPECT_EQ(
+      r()->error(),
+      R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a module-scope let)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalVar) {
+  Global(Source{{12, 34}}, "mix", ty.i32(), Expr(1),
+         ast::StorageClass::kPrivate);
+
+  EXPECT_FALSE(r()->Resolve());
+  EXPECT_EQ(
+      r()->error(),
+      R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a module-scope var)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsAlias) {
+  Alias(Source{{12, 34}}, "mix", ty.i32());
+
+  EXPECT_FALSE(r()->Resolve());
+  EXPECT_EQ(
+      r()->error(),
+      R"(12:34 error: 'mix' is a builtin and cannot be redeclared as an alias)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsStruct) {
+  Structure(Source{{12, 34}}, "mix", {Member("m", ty.i32())});
+
+  EXPECT_FALSE(r()->Resolve());
+  EXPECT_EQ(
+      r()->error(),
+      R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a struct)");
+}
+
+namespace texture_constexpr_args {
+
+using TextureOverloadCase = ast::builtin::test::TextureOverloadCase;
+using ValidTextureOverload = ast::builtin::test::ValidTextureOverload;
+using TextureKind = ast::builtin::test::TextureKind;
+using TextureDataType = ast::builtin::test::TextureDataType;
+using u32 = ProgramBuilder::u32;
+using i32 = ProgramBuilder::i32;
+using f32 = ProgramBuilder::f32;
+
+static std::vector<TextureOverloadCase> TextureCases(
+    std::unordered_set<ValidTextureOverload> overloads) {
+  std::vector<TextureOverloadCase> cases;
+  for (auto c : TextureOverloadCase::ValidCases()) {
+    if (overloads.count(c.overload)) {
+      cases.push_back(c);
+    }
+  }
+  return cases;
+}
+
+enum class Position {
+  kFirst,
+  kLast,
+};
+
+struct Parameter {
+  const char* const name;
+  const Position position;
+  int min;
+  int max;
+};
+
+class Constexpr {
+ public:
+  enum class Kind {
+    kScalar,
+    kVec2,
+    kVec3,
+    kVec3_Scalar_Vec2,
+    kVec3_Vec2_Scalar,
+    kEmptyVec2,
+    kEmptyVec3,
+  };
+
+  Constexpr(int32_t invalid_idx,
+            Kind k,
+            int32_t x = 0,
+            int32_t y = 0,
+            int32_t z = 0)
+      : invalid_index(invalid_idx), kind(k), values{x, y, z} {}
+
+  const ast::Expression* operator()(Source src, ProgramBuilder& b) {
+    switch (kind) {
+      case Kind::kScalar:
+        return b.Expr(src, values[0]);
+      case Kind::kVec2:
+        return b.Construct(src, b.ty.vec2<i32>(), values[0], values[1]);
+      case Kind::kVec3:
+        return b.Construct(src, b.ty.vec3<i32>(), values[0], values[1],
+                           values[2]);
+      case Kind::kVec3_Scalar_Vec2:
+        return b.Construct(src, b.ty.vec3<i32>(), values[0],
+                           b.vec2<i32>(values[1], values[2]));
+      case Kind::kVec3_Vec2_Scalar:
+        return b.Construct(src, b.ty.vec3<i32>(),
+                           b.vec2<i32>(values[0], values[1]), values[2]);
+      case Kind::kEmptyVec2:
+        return b.Construct(src, b.ty.vec2<i32>());
+      case Kind::kEmptyVec3:
+        return b.Construct(src, b.ty.vec3<i32>());
+    }
+    return nullptr;
+  }
+
+  static const constexpr int32_t kValid = -1;
+  const int32_t invalid_index;  // Expected error value, or kValid
+  const Kind kind;
+  const std::array<int32_t, 3> values;
+};
+
+static std::ostream& operator<<(std::ostream& out, Parameter param) {
+  return out << param.name;
+}
+
+static std::ostream& operator<<(std::ostream& out, Constexpr expr) {
+  switch (expr.kind) {
+    case Constexpr::Kind::kScalar:
+      return out << expr.values[0];
+    case Constexpr::Kind::kVec2:
+      return out << "vec2(" << expr.values[0] << ", " << expr.values[1] << ")";
+    case Constexpr::Kind::kVec3:
+      return out << "vec3(" << expr.values[0] << ", " << expr.values[1] << ", "
+                 << expr.values[2] << ")";
+    case Constexpr::Kind::kVec3_Scalar_Vec2:
+      return out << "vec3(" << expr.values[0] << ", vec2(" << expr.values[1]
+                 << ", " << expr.values[2] << "))";
+    case Constexpr::Kind::kVec3_Vec2_Scalar:
+      return out << "vec3(vec2(" << expr.values[0] << ", " << expr.values[1]
+                 << "), " << expr.values[2] << ")";
+    case Constexpr::Kind::kEmptyVec2:
+      return out << "vec2()";
+    case Constexpr::Kind::kEmptyVec3:
+      return out << "vec3()";
+  }
+  return out;
+}
+
+using BuiltinTextureConstExprArgValidationTest = ResolverTestWithParam<
+    std::tuple<TextureOverloadCase, Parameter, Constexpr>>;
+
+TEST_P(BuiltinTextureConstExprArgValidationTest, Immediate) {
+  auto& p = GetParam();
+  auto overload = std::get<0>(p);
+  auto param = std::get<1>(p);
+  auto expr = std::get<2>(p);
+
+  overload.BuildTextureVariable(this);
+  overload.BuildSamplerVariable(this);
+
+  auto args = overload.args(this);
+  auto*& arg_to_replace =
+      (param.position == Position::kFirst) ? args.front() : args.back();
+
+  // BuildTextureVariable() uses a Literal for scalars, and a CallExpression for
+  // a vector constructor.
+  bool is_vector = arg_to_replace->Is<ast::CallExpression>();
+
+  // Make the expression to be replaced, reachable. This keeps the resolver
+  // happy.
+  WrapInFunction(arg_to_replace);
+
+  arg_to_replace = expr(Source{{12, 34}}, *this);
+
+  // Call the builtin with the constexpr argument replaced
+  Func("func", {}, ty.void_(), {CallStmt(Call(overload.function, args))},
+       {Stage(ast::PipelineStage::kFragment)});
+
+  if (expr.invalid_index == Constexpr::kValid) {
+    EXPECT_TRUE(r()->Resolve()) << r()->error();
+  } else {
+    EXPECT_FALSE(r()->Resolve());
+    std::stringstream err;
+    if (is_vector) {
+      err << "12:34 error: each component of the " << param.name
+          << " argument must be at least " << param.min << " and at most "
+          << param.max << ". " << param.name << " component "
+          << expr.invalid_index << " is "
+          << std::to_string(expr.values[expr.invalid_index]);
+    } else {
+      err << "12:34 error: the " << param.name << " argument must be at least "
+          << param.min << " and at most " << param.max << ". " << param.name
+          << " is " << std::to_string(expr.values[expr.invalid_index]);
+    }
+    EXPECT_EQ(r()->error(), err.str());
+  }
+}
+
+TEST_P(BuiltinTextureConstExprArgValidationTest, GlobalConst) {
+  auto& p = GetParam();
+  auto overload = std::get<0>(p);
+  auto param = std::get<1>(p);
+  auto expr = std::get<2>(p);
+
+  // Build the global texture and sampler variables
+  overload.BuildTextureVariable(this);
+  overload.BuildSamplerVariable(this);
+
+  // Build the module-scope let 'G' with the offset value
+  GlobalConst("G", nullptr, expr({}, *this));
+
+  auto args = overload.args(this);
+  auto*& arg_to_replace =
+      (param.position == Position::kFirst) ? args.front() : args.back();
+
+  // Make the expression to be replaced, reachable. This keeps the resolver
+  // happy.
+  WrapInFunction(arg_to_replace);
+
+  arg_to_replace = Expr(Source{{12, 34}}, "G");
+
+  // Call the builtin with the constexpr argument replaced
+  Func("func", {}, ty.void_(), {CallStmt(Call(overload.function, args))},
+       {Stage(ast::PipelineStage::kFragment)});
+
+  EXPECT_FALSE(r()->Resolve());
+  std::stringstream err;
+  err << "12:34 error: the " << param.name
+      << " argument must be a const_expression";
+  EXPECT_EQ(r()->error(), err.str());
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    Offset2D,
+    BuiltinTextureConstExprArgValidationTest,
+    testing::Combine(
+        testing::ValuesIn(TextureCases({
+            ValidTextureOverload::kSample2dOffsetF32,
+            ValidTextureOverload::kSample2dArrayOffsetF32,
+            ValidTextureOverload::kSampleDepth2dOffsetF32,
+            ValidTextureOverload::kSampleDepth2dArrayOffsetF32,
+            ValidTextureOverload::kSampleBias2dOffsetF32,
+            ValidTextureOverload::kSampleBias2dArrayOffsetF32,
+            ValidTextureOverload::kSampleLevel2dOffsetF32,
+            ValidTextureOverload::kSampleLevel2dArrayOffsetF32,
+            ValidTextureOverload::kSampleLevelDepth2dOffsetF32,
+            ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32,
+            ValidTextureOverload::kSampleGrad2dOffsetF32,
+            ValidTextureOverload::kSampleGrad2dArrayOffsetF32,
+            ValidTextureOverload::kSampleCompareDepth2dOffsetF32,
+            ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32,
+            ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32,
+            ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32,
+        })),
+        testing::Values(Parameter{"offset", Position::kLast, -8, 7}),
+        testing::Values(
+            Constexpr{Constexpr::kValid, Constexpr::Kind::kEmptyVec2},
+            Constexpr{Constexpr::kValid, Constexpr::Kind::kVec2, -1, 1},
+            Constexpr{Constexpr::kValid, Constexpr::Kind::kVec2, 7, -8},
+            Constexpr{0, Constexpr::Kind::kVec2, 8, 0},
+            Constexpr{1, Constexpr::Kind::kVec2, 0, 8},
+            Constexpr{0, Constexpr::Kind::kVec2, -9, 0},
+            Constexpr{1, Constexpr::Kind::kVec2, 0, -9},
+            Constexpr{0, Constexpr::Kind::kVec2, 8, 8},
+            Constexpr{0, Constexpr::Kind::kVec2, -9, -9})));
+
+INSTANTIATE_TEST_SUITE_P(
+    Offset3D,
+    BuiltinTextureConstExprArgValidationTest,
+    testing::Combine(
+        testing::ValuesIn(TextureCases({
+            ValidTextureOverload::kSample3dOffsetF32,
+            ValidTextureOverload::kSampleBias3dOffsetF32,
+            ValidTextureOverload::kSampleLevel3dOffsetF32,
+            ValidTextureOverload::kSampleGrad3dOffsetF32,
+        })),
+        testing::Values(Parameter{"offset", Position::kLast, -8, 7}),
+        testing::Values(
+            Constexpr{Constexpr::kValid, Constexpr::Kind::kEmptyVec3},
+            Constexpr{Constexpr::kValid, Constexpr::Kind::kVec3, 0, 0, 0},
+            Constexpr{Constexpr::kValid, Constexpr::Kind::kVec3, 7, -8, 7},
+            Constexpr{0, Constexpr::Kind::kVec3, 10, 0, 0},
+            Constexpr{1, Constexpr::Kind::kVec3, 0, 10, 0},
+            Constexpr{2, Constexpr::Kind::kVec3, 0, 0, 10},
+            Constexpr{0, Constexpr::Kind::kVec3, 10, 11, 12},
+            Constexpr{0, Constexpr::Kind::kVec3_Scalar_Vec2, 10, 0, 0},
+            Constexpr{1, Constexpr::Kind::kVec3_Scalar_Vec2, 0, 10, 0},
+            Constexpr{2, Constexpr::Kind::kVec3_Scalar_Vec2, 0, 0, 10},
+            Constexpr{0, Constexpr::Kind::kVec3_Scalar_Vec2, 10, 11, 12},
+            Constexpr{0, Constexpr::Kind::kVec3_Vec2_Scalar, 10, 0, 0},
+            Constexpr{1, Constexpr::Kind::kVec3_Vec2_Scalar, 0, 10, 0},
+            Constexpr{2, Constexpr::Kind::kVec3_Vec2_Scalar, 0, 0, 10},
+            Constexpr{0, Constexpr::Kind::kVec3_Vec2_Scalar, 10, 11, 12})));
+
+INSTANTIATE_TEST_SUITE_P(
+    Component,
+    BuiltinTextureConstExprArgValidationTest,
+    testing::Combine(
+        testing::ValuesIn(
+            TextureCases({ValidTextureOverload::kGather2dF32,
+                          ValidTextureOverload::kGather2dOffsetF32,
+                          ValidTextureOverload::kGather2dArrayF32,
+                          ValidTextureOverload::kGather2dArrayOffsetF32,
+                          ValidTextureOverload::kGatherCubeF32,
+                          ValidTextureOverload::kGatherCubeArrayF32})),
+        testing::Values(Parameter{"component", Position::kFirst, 0, 3}),
+        testing::Values(
+            Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 0},
+            Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 1},
+            Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 2},
+            Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 3},
+            Constexpr{0, Constexpr::Kind::kScalar, 4},
+            Constexpr{0, Constexpr::Kind::kScalar, 123},
+            Constexpr{0, Constexpr::Kind::kScalar, -1})));
+
+}  // namespace texture_constexpr_args
+
+}  // namespace
+}  // namespace resolver
+}  // namespace tint
diff --git a/src/resolver/dependency_graph.cc b/src/resolver/dependency_graph.cc
index 981dfb1..d520cd7 100644
--- a/src/resolver/dependency_graph.cc
+++ b/src/resolver/dependency_graph.cc
@@ -24,7 +24,7 @@
 #include "src/ast/fallthrough_statement.h"
 #include "src/ast/traverse_expressions.h"
 #include "src/scope_stack.h"
-#include "src/sem/intrinsic.h"
+#include "src/sem/builtin.h"
 #include "src/utils/defer.h"
 #include "src/utils/map.h"
 #include "src/utils/scoped_assignment.h"
@@ -297,7 +297,7 @@
           if (auto* ident = expr->As<ast::IdentifierExpression>()) {
             auto* node = scope_stack_.Get(ident->symbol);
             if (node == nullptr) {
-              if (!IsIntrinsic(ident->symbol)) {
+              if (!IsBuiltin(ident->symbol)) {
                 UnknownSymbol(ident->symbol, ident->source, "identifier");
               }
               return ast::TraverseAction::Descend;
@@ -313,7 +313,7 @@
           }
           if (auto* call = expr->As<ast::CallExpression>()) {
             if (call->target.name) {
-              if (!IsIntrinsic(call->target.name->symbol)) {
+              if (!IsBuiltin(call->target.name->symbol)) {
                 AddGlobalDependency(call->target.name,
                                     call->target.name->symbol, "function",
                                     "calls");
@@ -436,10 +436,10 @@
     }
   }
 
-  /// @returns true if `name` is the name of an intrinsic function
-  bool IsIntrinsic(Symbol name) const {
-    return sem::ParseIntrinsicType(symbols_.NameFor(name)) !=
-           sem::IntrinsicType::kNone;
+  /// @returns true if `name` is the name of a builtin function
+  bool IsBuiltin(Symbol name) const {
+    return sem::ParseBuiltinType(symbols_.NameFor(name)) !=
+           sem::BuiltinType::kNone;
   }
 
   /// Appends an error to the diagnostics that the given symbol cannot be
diff --git a/src/resolver/intrinsic_test.cc b/src/resolver/intrinsic_test.cc
deleted file mode 100644
index 59f55f9..0000000
--- a/src/resolver/intrinsic_test.cc
+++ /dev/null
@@ -1,2064 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/resolver/resolver.h"
-
-#include "gmock/gmock.h"
-#include "src/ast/assignment_statement.h"
-#include "src/ast/bitcast_expression.h"
-#include "src/ast/break_statement.h"
-#include "src/ast/call_statement.h"
-#include "src/ast/continue_statement.h"
-#include "src/ast/if_statement.h"
-#include "src/ast/intrinsic_texture_helper_test.h"
-#include "src/ast/loop_statement.h"
-#include "src/ast/return_statement.h"
-#include "src/ast/stage_attribute.h"
-#include "src/ast/struct_block_attribute.h"
-#include "src/ast/switch_statement.h"
-#include "src/ast/unary_op_expression.h"
-#include "src/ast/variable_decl_statement.h"
-#include "src/resolver/resolver_test_helper.h"
-#include "src/sem/call.h"
-#include "src/sem/function.h"
-#include "src/sem/member_accessor_expression.h"
-#include "src/sem/sampled_texture_type.h"
-#include "src/sem/statement.h"
-#include "src/sem/variable.h"
-
-using ::testing::ElementsAre;
-using ::testing::HasSubstr;
-
-namespace tint {
-namespace resolver {
-namespace {
-
-using IntrinsicType = sem::IntrinsicType;
-
-using ResolverIntrinsicTest = ResolverTest;
-
-using ResolverIntrinsicDerivativeTest = ResolverTestWithParam<std::string>;
-TEST_P(ResolverIntrinsicDerivativeTest, Scalar) {
-  auto name = GetParam();
-
-  Global("ident", ty.f32(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call(name, "ident");
-  Func("func", {}, ty.void_(), {Ignore(expr)},
-       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  ASSERT_TRUE(TypeOf(expr)->Is<sem::F32>());
-}
-
-TEST_P(ResolverIntrinsicDerivativeTest, Vector) {
-  auto name = GetParam();
-  Global("ident", ty.vec4<f32>(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call(name, "ident");
-  Func("func", {}, ty.void_(), {Ignore(expr)},
-       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  ASSERT_TRUE(TypeOf(expr)->Is<sem::Vector>());
-  EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::F32>());
-  EXPECT_EQ(TypeOf(expr)->As<sem::Vector>()->Width(), 4u);
-}
-
-TEST_P(ResolverIntrinsicDerivativeTest, MissingParam) {
-  auto name = GetParam();
-
-  auto* expr = Call(name);
-  WrapInFunction(expr);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), "error: no matching call to " + name +
-                              "()\n\n"
-                              "2 candidate functions:\n  " +
-                              name + "(f32) -> f32\n  " + name +
-                              "(vecN<f32>) -> vecN<f32>\n");
-}
-
-INSTANTIATE_TEST_SUITE_P(ResolverTest,
-                         ResolverIntrinsicDerivativeTest,
-                         testing::Values("dpdx",
-                                         "dpdxCoarse",
-                                         "dpdxFine",
-                                         "dpdy",
-                                         "dpdyCoarse",
-                                         "dpdyFine",
-                                         "fwidth",
-                                         "fwidthCoarse",
-                                         "fwidthFine"));
-
-using ResolverIntrinsicTest_BoolMethod = ResolverTestWithParam<std::string>;
-TEST_P(ResolverIntrinsicTest_BoolMethod, Scalar) {
-  auto name = GetParam();
-
-  Global("my_var", ty.bool_(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call(name, "my_var");
-  WrapInFunction(expr);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  EXPECT_TRUE(TypeOf(expr)->Is<sem::Bool>());
-}
-TEST_P(ResolverIntrinsicTest_BoolMethod, Vector) {
-  auto name = GetParam();
-
-  Global("my_var", ty.vec3<bool>(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call(name, "my_var");
-  WrapInFunction(expr);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  EXPECT_TRUE(TypeOf(expr)->Is<sem::Bool>());
-}
-INSTANTIATE_TEST_SUITE_P(ResolverTest,
-                         ResolverIntrinsicTest_BoolMethod,
-                         testing::Values("any", "all"));
-
-using ResolverIntrinsicTest_FloatMethod = ResolverTestWithParam<std::string>;
-TEST_P(ResolverIntrinsicTest_FloatMethod, Vector) {
-  auto name = GetParam();
-
-  Global("my_var", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call(name, "my_var");
-  WrapInFunction(expr);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  ASSERT_TRUE(TypeOf(expr)->Is<sem::Vector>());
-  EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::Bool>());
-  EXPECT_EQ(TypeOf(expr)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_FloatMethod, Scalar) {
-  auto name = GetParam();
-
-  Global("my_var", ty.f32(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call(name, "my_var");
-  WrapInFunction(expr);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  EXPECT_TRUE(TypeOf(expr)->Is<sem::Bool>());
-}
-
-TEST_P(ResolverIntrinsicTest_FloatMethod, MissingParam) {
-  auto name = GetParam();
-
-  Global("my_var", ty.f32(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call(name);
-  WrapInFunction(expr);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), "error: no matching call to " + name +
-                              "()\n\n"
-                              "2 candidate functions:\n  " +
-                              name + "(f32) -> bool\n  " + name +
-                              "(vecN<f32>) -> vecN<bool>\n");
-}
-
-TEST_P(ResolverIntrinsicTest_FloatMethod, TooManyParams) {
-  auto name = GetParam();
-
-  Global("my_var", ty.f32(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call(name, "my_var", 1.23f);
-  WrapInFunction(expr);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), "error: no matching call to " + name +
-                              "(f32, f32)\n\n"
-                              "2 candidate functions:\n  " +
-                              name + "(f32) -> bool\n  " + name +
-                              "(vecN<f32>) -> vecN<bool>\n");
-}
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_FloatMethod,
-    testing::Values("isInf", "isNan", "isFinite", "isNormal"));
-
-enum class Texture { kF32, kI32, kU32 };
-inline std::ostream& operator<<(std::ostream& out, Texture data) {
-  if (data == Texture::kF32) {
-    out << "f32";
-  } else if (data == Texture::kI32) {
-    out << "i32";
-  } else {
-    out << "u32";
-  }
-  return out;
-}
-
-struct TextureTestParams {
-  ast::TextureDimension dim;
-  Texture type = Texture::kF32;
-  ast::TexelFormat format = ast::TexelFormat::kR32Float;
-};
-inline std::ostream& operator<<(std::ostream& out, TextureTestParams data) {
-  out << data.dim << "_" << data.type;
-  return out;
-}
-
-class ResolverIntrinsicTest_TextureOperation
-    : public ResolverTestWithParam<TextureTestParams> {
- public:
-  /// Gets an appropriate type for the coords parameter depending the the
-  /// dimensionality of the texture being sampled.
-  /// @param dim dimensionality of the texture being sampled
-  /// @param scalar the scalar type
-  /// @returns a pointer to a type appropriate for the coord param
-  const ast::Type* GetCoordsType(ast::TextureDimension dim,
-                                 const ast::Type* scalar) {
-    switch (dim) {
-      case ast::TextureDimension::k1d:
-        return scalar;
-      case ast::TextureDimension::k2d:
-      case ast::TextureDimension::k2dArray:
-        return ty.vec(scalar, 2);
-      case ast::TextureDimension::k3d:
-      case ast::TextureDimension::kCube:
-      case ast::TextureDimension::kCubeArray:
-        return ty.vec(scalar, 3);
-      default:
-        [=]() { FAIL() << "Unsupported texture dimension: " << dim; }();
-    }
-    return nullptr;
-  }
-
-  void add_call_param(std::string name,
-                      const ast::Type* type,
-                      ast::ExpressionList* call_params) {
-    if (type->IsAnyOf<ast::Texture, ast::Sampler>()) {
-      Global(name, type,
-             ast::AttributeList{
-                 create<ast::BindingAttribute>(0),
-                 create<ast::GroupAttribute>(0),
-             });
-
-    } else {
-      Global(name, type, ast::StorageClass::kPrivate);
-    }
-
-    call_params->push_back(Expr(name));
-  }
-  const ast::Type* subtype(Texture type) {
-    if (type == Texture::kF32) {
-      return ty.f32();
-    }
-    if (type == Texture::kI32) {
-      return ty.i32();
-    }
-    return ty.u32();
-  }
-};
-
-using ResolverIntrinsicTest_SampledTextureOperation =
-    ResolverIntrinsicTest_TextureOperation;
-TEST_P(ResolverIntrinsicTest_SampledTextureOperation, TextureLoadSampled) {
-  auto dim = GetParam().dim;
-  auto type = GetParam().type;
-
-  auto* s = subtype(type);
-  auto* coords_type = GetCoordsType(dim, ty.i32());
-  auto* texture_type = ty.sampled_texture(dim, s);
-
-  ast::ExpressionList call_params;
-
-  add_call_param("texture", texture_type, &call_params);
-  add_call_param("coords", coords_type, &call_params);
-  if (dim == ast::TextureDimension::k2dArray) {
-    add_call_param("array_index", ty.i32(), &call_params);
-  }
-  add_call_param("level", ty.i32(), &call_params);
-
-  auto* expr = Call("textureLoad", call_params);
-  WrapInFunction(expr);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  ASSERT_TRUE(TypeOf(expr)->Is<sem::Vector>());
-  if (type == Texture::kF32) {
-    EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::F32>());
-  } else if (type == Texture::kI32) {
-    EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::I32>());
-  } else {
-    EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::U32>());
-  }
-  EXPECT_EQ(TypeOf(expr)->As<sem::Vector>()->Width(), 4u);
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_SampledTextureOperation,
-    testing::Values(TextureTestParams{ast::TextureDimension::k1d},
-                    TextureTestParams{ast::TextureDimension::k2d},
-                    TextureTestParams{ast::TextureDimension::k2dArray},
-                    TextureTestParams{ast::TextureDimension::k3d}));
-
-TEST_F(ResolverIntrinsicTest, Dot_Vec2) {
-  Global("my_var", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call("dot", "my_var", "my_var");
-  WrapInFunction(expr);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  EXPECT_TRUE(TypeOf(expr)->Is<sem::F32>());
-}
-
-TEST_F(ResolverIntrinsicTest, Dot_Vec3) {
-  Global("my_var", ty.vec3<i32>(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call("dot", "my_var", "my_var");
-  WrapInFunction(expr);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  EXPECT_TRUE(TypeOf(expr)->Is<sem::I32>());
-}
-
-TEST_F(ResolverIntrinsicTest, Dot_Vec4) {
-  Global("my_var", ty.vec4<u32>(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call("dot", "my_var", "my_var");
-  WrapInFunction(expr);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  EXPECT_TRUE(TypeOf(expr)->Is<sem::U32>());
-}
-
-TEST_F(ResolverIntrinsicTest, Dot_Error_Scalar) {
-  auto* expr = Call("dot", 1.0f, 1.0f);
-  WrapInFunction(expr);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            R"(error: no matching call to dot(f32, f32)
-
-1 candidate function:
-  dot(vecN<T>, vecN<T>) -> T  where: T is f32, i32 or u32
-)");
-}
-
-TEST_F(ResolverIntrinsicTest, Select) {
-  Global("my_var", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-
-  Global("bool_var", ty.vec3<bool>(), ast::StorageClass::kPrivate);
-
-  auto* expr = Call("select", "my_var", "my_var", "bool_var");
-  WrapInFunction(expr);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(expr), nullptr);
-  EXPECT_TRUE(TypeOf(expr)->Is<sem::Vector>());
-  EXPECT_EQ(TypeOf(expr)->As<sem::Vector>()->Width(), 3u);
-  EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::F32>());
-}
-
-TEST_F(ResolverIntrinsicTest, Select_Error_NoParams) {
-  auto* expr = Call("select");
-  WrapInFunction(expr);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            R"(error: no matching call to select()
-
-3 candidate functions:
-  select(T, T, bool) -> T  where: T is f32, i32, u32 or bool
-  select(vecN<T>, vecN<T>, bool) -> vecN<T>  where: T is f32, i32, u32 or bool
-  select(vecN<T>, vecN<T>, vecN<bool>) -> vecN<T>  where: T is f32, i32, u32 or bool
-)");
-}
-
-TEST_F(ResolverIntrinsicTest, Select_Error_SelectorInt) {
-  auto* expr = Call("select", 1, 1, 1);
-  WrapInFunction(expr);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            R"(error: no matching call to select(i32, i32, i32)
-
-3 candidate functions:
-  select(T, T, bool) -> T  where: T is f32, i32, u32 or bool
-  select(vecN<T>, vecN<T>, bool) -> vecN<T>  where: T is f32, i32, u32 or bool
-  select(vecN<T>, vecN<T>, vecN<bool>) -> vecN<T>  where: T is f32, i32, u32 or bool
-)");
-}
-
-TEST_F(ResolverIntrinsicTest, Select_Error_Matrix) {
-  auto* expr = Call(
-      "select", mat2x2<f32>(vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f)),
-      mat2x2<f32>(vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f)), Expr(true));
-  WrapInFunction(expr);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            R"(error: no matching call to select(mat2x2<f32>, mat2x2<f32>, bool)
-
-3 candidate functions:
-  select(T, T, bool) -> T  where: T is f32, i32, u32 or bool
-  select(vecN<T>, vecN<T>, bool) -> vecN<T>  where: T is f32, i32, u32 or bool
-  select(vecN<T>, vecN<T>, vecN<bool>) -> vecN<T>  where: T is f32, i32, u32 or bool
-)");
-}
-
-TEST_F(ResolverIntrinsicTest, Select_Error_MismatchTypes) {
-  auto* expr = Call("select", 1.0f, vec2<f32>(2.0f, 3.0f), Expr(true));
-  WrapInFunction(expr);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            R"(error: no matching call to select(f32, vec2<f32>, bool)
-
-3 candidate functions:
-  select(T, T, bool) -> T  where: T is f32, i32, u32 or bool
-  select(vecN<T>, vecN<T>, bool) -> vecN<T>  where: T is f32, i32, u32 or bool
-  select(vecN<T>, vecN<T>, vecN<bool>) -> vecN<T>  where: T is f32, i32, u32 or bool
-)");
-}
-
-TEST_F(ResolverIntrinsicTest, Select_Error_MismatchVectorSize) {
-  auto* expr = Call("select", vec2<f32>(1.0f, 2.0f),
-                    vec3<f32>(3.0f, 4.0f, 5.0f), Expr(true));
-  WrapInFunction(expr);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            R"(error: no matching call to select(vec2<f32>, vec3<f32>, bool)
-
-3 candidate functions:
-  select(T, T, bool) -> T  where: T is f32, i32, u32 or bool
-  select(vecN<T>, vecN<T>, bool) -> vecN<T>  where: T is f32, i32, u32 or bool
-  select(vecN<T>, vecN<T>, vecN<bool>) -> vecN<T>  where: T is f32, i32, u32 or bool
-)");
-}
-
-struct IntrinsicData {
-  const char* name;
-  IntrinsicType intrinsic;
-};
-
-inline std::ostream& operator<<(std::ostream& out, IntrinsicData data) {
-  out << data.name;
-  return out;
-}
-
-using ResolverIntrinsicTest_Barrier = ResolverTestWithParam<IntrinsicData>;
-TEST_P(ResolverIntrinsicTest_Barrier, InferType) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name);
-  WrapInFunction(CallStmt(call));
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::Void>());
-}
-
-TEST_P(ResolverIntrinsicTest_Barrier, Error_TooManyParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec4<f32>(1.f, 2.f, 3.f, 4.f), 1.0f);
-  WrapInFunction(CallStmt(call));
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_THAT(r()->error(), HasSubstr("error: no matching call to " +
-                                      std::string(param.name)));
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_Barrier,
-    testing::Values(
-        IntrinsicData{"storageBarrier", IntrinsicType::kStorageBarrier},
-        IntrinsicData{"workgroupBarrier", IntrinsicType::kWorkgroupBarrier}));
-
-using ResolverIntrinsicTest_DataPacking = ResolverTestWithParam<IntrinsicData>;
-TEST_P(ResolverIntrinsicTest_DataPacking, InferType) {
-  auto param = GetParam();
-
-  bool pack4 = param.intrinsic == IntrinsicType::kPack4x8snorm ||
-               param.intrinsic == IntrinsicType::kPack4x8unorm;
-
-  auto* call = pack4 ? Call(param.name, vec4<f32>(1.f, 2.f, 3.f, 4.f))
-                     : Call(param.name, vec2<f32>(1.f, 2.f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
-}
-
-TEST_P(ResolverIntrinsicTest_DataPacking, Error_IncorrectParamType) {
-  auto param = GetParam();
-
-  bool pack4 = param.intrinsic == IntrinsicType::kPack4x8snorm ||
-               param.intrinsic == IntrinsicType::kPack4x8unorm;
-
-  auto* call = pack4 ? Call(param.name, vec4<i32>(1, 2, 3, 4))
-                     : Call(param.name, vec2<i32>(1, 2));
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_THAT(r()->error(), HasSubstr("error: no matching call to " +
-                                      std::string(param.name)));
-}
-
-TEST_P(ResolverIntrinsicTest_DataPacking, Error_NoParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_THAT(r()->error(), HasSubstr("error: no matching call to " +
-                                      std::string(param.name)));
-}
-
-TEST_P(ResolverIntrinsicTest_DataPacking, Error_TooManyParams) {
-  auto param = GetParam();
-
-  bool pack4 = param.intrinsic == IntrinsicType::kPack4x8snorm ||
-               param.intrinsic == IntrinsicType::kPack4x8unorm;
-
-  auto* call = pack4 ? Call(param.name, vec4<f32>(1.f, 2.f, 3.f, 4.f), 1.0f)
-                     : Call(param.name, vec2<f32>(1.f, 2.f), 1.0f);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_THAT(r()->error(), HasSubstr("error: no matching call to " +
-                                      std::string(param.name)));
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_DataPacking,
-    testing::Values(
-        IntrinsicData{"pack4x8snorm", IntrinsicType::kPack4x8snorm},
-        IntrinsicData{"pack4x8unorm", IntrinsicType::kPack4x8unorm},
-        IntrinsicData{"pack2x16snorm", IntrinsicType::kPack2x16snorm},
-        IntrinsicData{"pack2x16unorm", IntrinsicType::kPack2x16unorm},
-        IntrinsicData{"pack2x16float", IntrinsicType::kPack2x16float}));
-
-using ResolverIntrinsicTest_DataUnpacking =
-    ResolverTestWithParam<IntrinsicData>;
-TEST_P(ResolverIntrinsicTest_DataUnpacking, InferType) {
-  auto param = GetParam();
-
-  bool pack4 = param.intrinsic == IntrinsicType::kUnpack4x8snorm ||
-               param.intrinsic == IntrinsicType::kUnpack4x8unorm;
-
-  auto* call = Call(param.name, 1u);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_vector());
-  if (pack4) {
-    EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 4u);
-  } else {
-    EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 2u);
-  }
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_DataUnpacking,
-    testing::Values(
-        IntrinsicData{"unpack4x8snorm", IntrinsicType::kUnpack4x8snorm},
-        IntrinsicData{"unpack4x8unorm", IntrinsicType::kUnpack4x8unorm},
-        IntrinsicData{"unpack2x16snorm", IntrinsicType::kUnpack2x16snorm},
-        IntrinsicData{"unpack2x16unorm", IntrinsicType::kUnpack2x16unorm},
-        IntrinsicData{"unpack2x16float", IntrinsicType::kUnpack2x16float}));
-
-using ResolverIntrinsicTest_SingleParam = ResolverTestWithParam<IntrinsicData>;
-TEST_P(ResolverIntrinsicTest_SingleParam, Scalar) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1.f);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
-}
-
-TEST_P(ResolverIntrinsicTest_SingleParam, Vector) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<f32>(1.0f, 1.0f, 3.0f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_SingleParam, Error_NoParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            "error: no matching call to " + std::string(param.name) +
-                "()\n\n"
-                "2 candidate functions:\n  " +
-                std::string(param.name) + "(f32) -> f32\n  " +
-                std::string(param.name) + "(vecN<f32>) -> vecN<f32>\n");
-}
-
-TEST_P(ResolverIntrinsicTest_SingleParam, Error_TooManyParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1, 2, 3);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            "error: no matching call to " + std::string(param.name) +
-                "(i32, i32, i32)\n\n"
-                "2 candidate functions:\n  " +
-                std::string(param.name) + "(f32) -> f32\n  " +
-                std::string(param.name) + "(vecN<f32>) -> vecN<f32>\n");
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_SingleParam,
-    testing::Values(IntrinsicData{"acos", IntrinsicType::kAcos},
-                    IntrinsicData{"asin", IntrinsicType::kAsin},
-                    IntrinsicData{"atan", IntrinsicType::kAtan},
-                    IntrinsicData{"ceil", IntrinsicType::kCeil},
-                    IntrinsicData{"cos", IntrinsicType::kCos},
-                    IntrinsicData{"cosh", IntrinsicType::kCosh},
-                    IntrinsicData{"exp", IntrinsicType::kExp},
-                    IntrinsicData{"exp2", IntrinsicType::kExp2},
-                    IntrinsicData{"floor", IntrinsicType::kFloor},
-                    IntrinsicData{"fract", IntrinsicType::kFract},
-                    IntrinsicData{"inverseSqrt", IntrinsicType::kInverseSqrt},
-                    IntrinsicData{"log", IntrinsicType::kLog},
-                    IntrinsicData{"log2", IntrinsicType::kLog2},
-                    IntrinsicData{"round", IntrinsicType::kRound},
-                    IntrinsicData{"sign", IntrinsicType::kSign},
-                    IntrinsicData{"sin", IntrinsicType::kSin},
-                    IntrinsicData{"sinh", IntrinsicType::kSinh},
-                    IntrinsicData{"sqrt", IntrinsicType::kSqrt},
-                    IntrinsicData{"tan", IntrinsicType::kTan},
-                    IntrinsicData{"tanh", IntrinsicType::kTanh},
-                    IntrinsicData{"trunc", IntrinsicType::kTrunc}));
-
-using ResolverIntrinsicDataTest = ResolverTest;
-
-TEST_F(ResolverIntrinsicDataTest, ArrayLength_Vector) {
-  auto* ary = ty.array<i32>();
-  auto* str =
-      Structure("S", {Member("x", ary)}, {create<ast::StructBlockAttribute>()});
-  Global("a", ty.Of(str), ast::StorageClass::kStorage, ast::Access::kRead,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(0),
-             create<ast::GroupAttribute>(0),
-         });
-
-  auto* call = Call("arrayLength", AddressOf(MemberAccessor("a", "x")));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
-}
-
-TEST_F(ResolverIntrinsicDataTest, ArrayLength_Error_ArraySized) {
-  Global("arr", ty.array<int, 4>(), ast::StorageClass::kPrivate);
-  auto* call = Call("arrayLength", AddressOf("arr"));
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(
-      r()->error(),
-      R"(error: no matching call to arrayLength(ptr<private, array<i32, 4>, read_write>)
-
-1 candidate function:
-  arrayLength(ptr<storage, array<T>, A>) -> u32
-)");
-}
-
-TEST_F(ResolverIntrinsicDataTest, Normalize_Vector) {
-  auto* call = Call("normalize", vec3<f32>(1.0f, 1.0f, 3.0f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_F(ResolverIntrinsicDataTest, Normalize_Error_NoParams) {
-  auto* call = Call("normalize");
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), R"(error: no matching call to normalize()
-
-1 candidate function:
-  normalize(vecN<f32>) -> vecN<f32>
-)");
-}
-
-TEST_F(ResolverIntrinsicDataTest, FrexpScalar) {
-  auto* call = Call("frexp", 1.0f);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  auto* ty = TypeOf(call)->As<sem::Struct>();
-  ASSERT_NE(ty, nullptr);
-  ASSERT_EQ(ty->Members().size(), 2u);
-
-  auto* sig = ty->Members()[0];
-  EXPECT_TRUE(sig->Type()->Is<sem::F32>());
-  EXPECT_EQ(sig->Offset(), 0u);
-  EXPECT_EQ(sig->Size(), 4u);
-  EXPECT_EQ(sig->Align(), 4u);
-  EXPECT_EQ(sig->Name(), Sym("sig"));
-
-  auto* exp = ty->Members()[1];
-  EXPECT_TRUE(exp->Type()->Is<sem::I32>());
-  EXPECT_EQ(exp->Offset(), 4u);
-  EXPECT_EQ(exp->Size(), 4u);
-  EXPECT_EQ(exp->Align(), 4u);
-  EXPECT_EQ(exp->Name(), Sym("exp"));
-
-  EXPECT_EQ(ty->Size(), 8u);
-  EXPECT_EQ(ty->SizeNoPadding(), 8u);
-}
-
-TEST_F(ResolverIntrinsicDataTest, FrexpVector) {
-  auto* call = Call("frexp", vec3<f32>());
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  auto* ty = TypeOf(call)->As<sem::Struct>();
-  ASSERT_NE(ty, nullptr);
-  ASSERT_EQ(ty->Members().size(), 2u);
-
-  auto* sig = ty->Members()[0];
-  ASSERT_TRUE(sig->Type()->Is<sem::Vector>());
-  EXPECT_EQ(sig->Type()->As<sem::Vector>()->Width(), 3u);
-  EXPECT_TRUE(sig->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
-  EXPECT_EQ(sig->Offset(), 0u);
-  EXPECT_EQ(sig->Size(), 12u);
-  EXPECT_EQ(sig->Align(), 16u);
-  EXPECT_EQ(sig->Name(), Sym("sig"));
-
-  auto* exp = ty->Members()[1];
-  ASSERT_TRUE(exp->Type()->Is<sem::Vector>());
-  EXPECT_EQ(exp->Type()->As<sem::Vector>()->Width(), 3u);
-  EXPECT_TRUE(exp->Type()->As<sem::Vector>()->type()->Is<sem::I32>());
-  EXPECT_EQ(exp->Offset(), 16u);
-  EXPECT_EQ(exp->Size(), 12u);
-  EXPECT_EQ(exp->Align(), 16u);
-  EXPECT_EQ(exp->Name(), Sym("exp"));
-
-  EXPECT_EQ(ty->Size(), 32u);
-  EXPECT_EQ(ty->SizeNoPadding(), 28u);
-}
-
-TEST_F(ResolverIntrinsicDataTest, Frexp_Error_FirstParamInt) {
-  Global("v", ty.i32(), ast::StorageClass::kWorkgroup);
-  auto* call = Call("frexp", 1, AddressOf("v"));
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(
-      r()->error(),
-      R"(error: no matching call to frexp(i32, ptr<workgroup, i32, read_write>)
-
-2 candidate functions:
-  frexp(f32) -> __frexp_result
-  frexp(vecN<f32>) -> __frexp_result_vecN
-)");
-}
-
-TEST_F(ResolverIntrinsicDataTest, Frexp_Error_SecondParamFloatPtr) {
-  Global("v", ty.f32(), ast::StorageClass::kWorkgroup);
-  auto* call = Call("frexp", 1.0f, AddressOf("v"));
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(
-      r()->error(),
-      R"(error: no matching call to frexp(f32, ptr<workgroup, f32, read_write>)
-
-2 candidate functions:
-  frexp(f32) -> __frexp_result
-  frexp(vecN<f32>) -> __frexp_result_vecN
-)");
-}
-
-TEST_F(ResolverIntrinsicDataTest, Frexp_Error_SecondParamNotAPointer) {
-  auto* call = Call("frexp", 1.0f, 1);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), R"(error: no matching call to frexp(f32, i32)
-
-2 candidate functions:
-  frexp(f32) -> __frexp_result
-  frexp(vecN<f32>) -> __frexp_result_vecN
-)");
-}
-
-TEST_F(ResolverIntrinsicDataTest, Frexp_Error_VectorSizesDontMatch) {
-  Global("v", ty.vec4<i32>(), ast::StorageClass::kWorkgroup);
-  auto* call = Call("frexp", vec2<f32>(1.0f, 2.0f), AddressOf("v"));
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(
-      r()->error(),
-      R"(error: no matching call to frexp(vec2<f32>, ptr<workgroup, vec4<i32>, read_write>)
-
-2 candidate functions:
-  frexp(vecN<f32>) -> __frexp_result_vecN
-  frexp(f32) -> __frexp_result
-)");
-}
-
-TEST_F(ResolverIntrinsicDataTest, ModfScalar) {
-  auto* call = Call("modf", 1.0f);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  auto* ty = TypeOf(call)->As<sem::Struct>();
-  ASSERT_NE(ty, nullptr);
-  ASSERT_EQ(ty->Members().size(), 2u);
-
-  auto* fract = ty->Members()[0];
-  EXPECT_TRUE(fract->Type()->Is<sem::F32>());
-  EXPECT_EQ(fract->Offset(), 0u);
-  EXPECT_EQ(fract->Size(), 4u);
-  EXPECT_EQ(fract->Align(), 4u);
-  EXPECT_EQ(fract->Name(), Sym("fract"));
-
-  auto* whole = ty->Members()[1];
-  EXPECT_TRUE(whole->Type()->Is<sem::F32>());
-  EXPECT_EQ(whole->Offset(), 4u);
-  EXPECT_EQ(whole->Size(), 4u);
-  EXPECT_EQ(whole->Align(), 4u);
-  EXPECT_EQ(whole->Name(), Sym("whole"));
-
-  EXPECT_EQ(ty->Size(), 8u);
-  EXPECT_EQ(ty->SizeNoPadding(), 8u);
-}
-
-TEST_F(ResolverIntrinsicDataTest, ModfVector) {
-  auto* call = Call("modf", vec3<f32>());
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  auto* ty = TypeOf(call)->As<sem::Struct>();
-  ASSERT_NE(ty, nullptr);
-  ASSERT_EQ(ty->Members().size(), 2u);
-
-  auto* fract = ty->Members()[0];
-  ASSERT_TRUE(fract->Type()->Is<sem::Vector>());
-  EXPECT_EQ(fract->Type()->As<sem::Vector>()->Width(), 3u);
-  EXPECT_TRUE(fract->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
-  EXPECT_EQ(fract->Offset(), 0u);
-  EXPECT_EQ(fract->Size(), 12u);
-  EXPECT_EQ(fract->Align(), 16u);
-  EXPECT_EQ(fract->Name(), Sym("fract"));
-
-  auto* whole = ty->Members()[1];
-  ASSERT_TRUE(whole->Type()->Is<sem::Vector>());
-  EXPECT_EQ(whole->Type()->As<sem::Vector>()->Width(), 3u);
-  EXPECT_TRUE(whole->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
-  EXPECT_EQ(whole->Offset(), 16u);
-  EXPECT_EQ(whole->Size(), 12u);
-  EXPECT_EQ(whole->Align(), 16u);
-  EXPECT_EQ(whole->Name(), Sym("whole"));
-
-  EXPECT_EQ(ty->Size(), 32u);
-  EXPECT_EQ(ty->SizeNoPadding(), 28u);
-}
-
-TEST_F(ResolverIntrinsicDataTest, Modf_Error_FirstParamInt) {
-  Global("whole", ty.f32(), ast::StorageClass::kWorkgroup);
-  auto* call = Call("modf", 1, AddressOf("whole"));
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(
-      r()->error(),
-      R"(error: no matching call to modf(i32, ptr<workgroup, f32, read_write>)
-
-2 candidate functions:
-  modf(f32) -> __modf_result
-  modf(vecN<f32>) -> __modf_result_vecN
-)");
-}
-
-TEST_F(ResolverIntrinsicDataTest, Modf_Error_SecondParamIntPtr) {
-  Global("whole", ty.i32(), ast::StorageClass::kWorkgroup);
-  auto* call = Call("modf", 1.0f, AddressOf("whole"));
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(
-      r()->error(),
-      R"(error: no matching call to modf(f32, ptr<workgroup, i32, read_write>)
-
-2 candidate functions:
-  modf(f32) -> __modf_result
-  modf(vecN<f32>) -> __modf_result_vecN
-)");
-}
-
-TEST_F(ResolverIntrinsicDataTest, Modf_Error_SecondParamNotAPointer) {
-  auto* call = Call("modf", 1.0f, 1.0f);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), R"(error: no matching call to modf(f32, f32)
-
-2 candidate functions:
-  modf(f32) -> __modf_result
-  modf(vecN<f32>) -> __modf_result_vecN
-)");
-}
-
-TEST_F(ResolverIntrinsicDataTest, Modf_Error_VectorSizesDontMatch) {
-  Global("whole", ty.vec4<f32>(), ast::StorageClass::kWorkgroup);
-  auto* call = Call("modf", vec2<f32>(1.0f, 2.0f), AddressOf("whole"));
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(
-      r()->error(),
-      R"(error: no matching call to modf(vec2<f32>, ptr<workgroup, vec4<f32>, read_write>)
-
-2 candidate functions:
-  modf(vecN<f32>) -> __modf_result_vecN
-  modf(f32) -> __modf_result
-)");
-}
-
-using ResolverIntrinsicTest_SingleParam_FloatOrInt =
-    ResolverTestWithParam<IntrinsicData>;
-TEST_P(ResolverIntrinsicTest_SingleParam_FloatOrInt, Float_Scalar) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1.f);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
-}
-
-TEST_P(ResolverIntrinsicTest_SingleParam_FloatOrInt, Float_Vector) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<f32>(1.0f, 1.0f, 3.0f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_SingleParam_FloatOrInt, Sint_Scalar) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, -1);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
-}
-
-TEST_P(ResolverIntrinsicTest_SingleParam_FloatOrInt, Sint_Vector) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<i32>(1, 1, 3));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_signed_integer_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_SingleParam_FloatOrInt, Uint_Scalar) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1u);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
-}
-
-TEST_P(ResolverIntrinsicTest_SingleParam_FloatOrInt, Uint_Vector) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<u32>(1u, 1u, 3u));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_unsigned_integer_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_SingleParam_FloatOrInt, Error_NoParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            "error: no matching call to " + std::string(param.name) +
-                "()\n\n"
-                "2 candidate functions:\n  " +
-                std::string(param.name) +
-                "(T) -> T  where: T is f32, i32 or u32\n  " +
-                std::string(param.name) +
-                "(vecN<T>) -> vecN<T>  where: T is f32, i32 or u32\n");
-}
-
-INSTANTIATE_TEST_SUITE_P(ResolverTest,
-                         ResolverIntrinsicTest_SingleParam_FloatOrInt,
-                         testing::Values(IntrinsicData{"abs",
-                                                       IntrinsicType::kAbs}));
-
-TEST_F(ResolverIntrinsicTest, Length_Scalar) {
-  auto* call = Call("length", 1.f);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
-}
-
-TEST_F(ResolverIntrinsicTest, Length_FloatVector) {
-  auto* call = Call("length", vec3<f32>(1.0f, 1.0f, 3.0f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
-}
-
-using ResolverIntrinsicTest_TwoParam = ResolverTestWithParam<IntrinsicData>;
-TEST_P(ResolverIntrinsicTest_TwoParam, Scalar) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1.f, 1.f);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
-}
-
-TEST_P(ResolverIntrinsicTest_TwoParam, Vector) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<f32>(1.0f, 1.0f, 3.0f),
-                    vec3<f32>(1.0f, 1.0f, 3.0f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_TwoParam, Error_NoTooManyParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1, 2, 3);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            "error: no matching call to " + std::string(param.name) +
-                "(i32, i32, i32)\n\n"
-                "2 candidate functions:\n  " +
-                std::string(param.name) + "(f32, f32) -> f32\n  " +
-                std::string(param.name) +
-                "(vecN<f32>, vecN<f32>) -> vecN<f32>\n");
-}
-
-TEST_P(ResolverIntrinsicTest_TwoParam, Error_NoParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            "error: no matching call to " + std::string(param.name) +
-                "()\n\n"
-                "2 candidate functions:\n  " +
-                std::string(param.name) + "(f32, f32) -> f32\n  " +
-                std::string(param.name) +
-                "(vecN<f32>, vecN<f32>) -> vecN<f32>\n");
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_TwoParam,
-    testing::Values(IntrinsicData{"atan2", IntrinsicType::kAtan2},
-                    IntrinsicData{"pow", IntrinsicType::kPow},
-                    IntrinsicData{"step", IntrinsicType::kStep}));
-
-TEST_F(ResolverIntrinsicTest, Distance_Scalar) {
-  auto* call = Call("distance", 1.f, 1.f);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
-}
-
-TEST_F(ResolverIntrinsicTest, Distance_Vector) {
-  auto* call = Call("distance", vec3<f32>(1.0f, 1.0f, 3.0f),
-                    vec3<f32>(1.0f, 1.0f, 3.0f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
-}
-
-TEST_F(ResolverIntrinsicTest, Cross) {
-  auto* call =
-      Call("cross", vec3<f32>(1.0f, 2.0f, 3.0f), vec3<f32>(1.0f, 2.0f, 3.0f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_F(ResolverIntrinsicTest, Cross_Error_NoArgs) {
-  auto* call = Call("cross");
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), R"(error: no matching call to cross()
-
-1 candidate function:
-  cross(vec3<f32>, vec3<f32>) -> vec3<f32>
-)");
-}
-
-TEST_F(ResolverIntrinsicTest, Cross_Error_Scalar) {
-  auto* call = Call("cross", 1.0f, 1.0f);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), R"(error: no matching call to cross(f32, f32)
-
-1 candidate function:
-  cross(vec3<f32>, vec3<f32>) -> vec3<f32>
-)");
-}
-
-TEST_F(ResolverIntrinsicTest, Cross_Error_Vec3Int) {
-  auto* call = Call("cross", vec3<i32>(1, 2, 3), vec3<i32>(1, 2, 3));
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            R"(error: no matching call to cross(vec3<i32>, vec3<i32>)
-
-1 candidate function:
-  cross(vec3<f32>, vec3<f32>) -> vec3<f32>
-)");
-}
-
-TEST_F(ResolverIntrinsicTest, Cross_Error_Vec4) {
-  auto* call = Call("cross", vec4<f32>(1.0f, 2.0f, 3.0f, 4.0f),
-                    vec4<f32>(1.0f, 2.0f, 3.0f, 4.0f));
-
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            R"(error: no matching call to cross(vec4<f32>, vec4<f32>)
-
-1 candidate function:
-  cross(vec3<f32>, vec3<f32>) -> vec3<f32>
-)");
-}
-
-TEST_F(ResolverIntrinsicTest, Cross_Error_TooManyParams) {
-  auto* call = Call("cross", vec3<f32>(1.0f, 2.0f, 3.0f),
-                    vec3<f32>(1.0f, 2.0f, 3.0f), vec3<f32>(1.0f, 2.0f, 3.0f));
-
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            R"(error: no matching call to cross(vec3<f32>, vec3<f32>, vec3<f32>)
-
-1 candidate function:
-  cross(vec3<f32>, vec3<f32>) -> vec3<f32>
-)");
-}
-TEST_F(ResolverIntrinsicTest, Normalize) {
-  auto* call = Call("normalize", vec3<f32>(1.0f, 1.0f, 3.0f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_F(ResolverIntrinsicTest, Normalize_NoArgs) {
-  auto* call = Call("normalize");
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), R"(error: no matching call to normalize()
-
-1 candidate function:
-  normalize(vecN<f32>) -> vecN<f32>
-)");
-}
-
-using ResolverIntrinsicTest_ThreeParam = ResolverTestWithParam<IntrinsicData>;
-TEST_P(ResolverIntrinsicTest_ThreeParam, Scalar) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1.f, 1.f, 1.f);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
-}
-
-TEST_P(ResolverIntrinsicTest_ThreeParam, Vector) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<f32>(1.0f, 1.0f, 3.0f),
-                    vec3<f32>(1.0f, 1.0f, 3.0f), vec3<f32>(1.0f, 1.0f, 3.0f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-TEST_P(ResolverIntrinsicTest_ThreeParam, Error_NoParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_THAT(r()->error(), HasSubstr("error: no matching call to " +
-                                      std::string(param.name) + "()"));
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_ThreeParam,
-    testing::Values(IntrinsicData{"mix", IntrinsicType::kMix},
-                    IntrinsicData{"smoothStep", IntrinsicType::kSmoothStep},
-                    IntrinsicData{"fma", IntrinsicType::kFma}));
-
-using ResolverIntrinsicTest_ThreeParam_FloatOrInt =
-    ResolverTestWithParam<IntrinsicData>;
-TEST_P(ResolverIntrinsicTest_ThreeParam_FloatOrInt, Float_Scalar) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1.f, 1.f, 1.f);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_scalar());
-}
-
-TEST_P(ResolverIntrinsicTest_ThreeParam_FloatOrInt, Float_Vector) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<f32>(1.0f, 1.0f, 3.0f),
-                    vec3<f32>(1.0f, 1.0f, 3.0f), vec3<f32>(1.0f, 1.0f, 3.0f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_ThreeParam_FloatOrInt, Sint_Scalar) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1, 1, 1);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
-}
-
-TEST_P(ResolverIntrinsicTest_ThreeParam_FloatOrInt, Sint_Vector) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<i32>(1, 1, 3), vec3<i32>(1, 1, 3),
-                    vec3<i32>(1, 1, 3));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_signed_integer_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_ThreeParam_FloatOrInt, Uint_Scalar) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1u, 1u, 1u);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
-}
-
-TEST_P(ResolverIntrinsicTest_ThreeParam_FloatOrInt, Uint_Vector) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<u32>(1u, 1u, 3u), vec3<u32>(1u, 1u, 3u),
-                    vec3<u32>(1u, 1u, 3u));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_unsigned_integer_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_ThreeParam_FloatOrInt, Error_NoParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            "error: no matching call to " + std::string(param.name) +
-                "()\n\n"
-                "2 candidate functions:\n  " +
-                std::string(param.name) +
-                "(T, T, T) -> T  where: T is f32, i32 or u32\n  " +
-                std::string(param.name) +
-                "(vecN<T>, vecN<T>, vecN<T>) -> vecN<T>  where: T is f32, i32 "
-                "or u32\n");
-}
-
-INSTANTIATE_TEST_SUITE_P(ResolverTest,
-                         ResolverIntrinsicTest_ThreeParam_FloatOrInt,
-                         testing::Values(IntrinsicData{"clamp",
-                                                       IntrinsicType::kClamp}));
-
-using ResolverIntrinsicTest_Int_SingleParam =
-    ResolverTestWithParam<IntrinsicData>;
-TEST_P(ResolverIntrinsicTest_Int_SingleParam, Scalar) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_integer_scalar());
-}
-
-TEST_P(ResolverIntrinsicTest_Int_SingleParam, Vector) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<i32>(1, 1, 3));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_signed_integer_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_Int_SingleParam, Error_NoParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), "error: no matching call to " +
-                              std::string(param.name) +
-                              "()\n\n"
-                              "2 candidate functions:\n  " +
-                              std::string(param.name) +
-                              "(T) -> T  where: T is i32 or u32\n  " +
-                              std::string(param.name) +
-                              "(vecN<T>) -> vecN<T>  where: T is i32 or u32\n");
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_Int_SingleParam,
-    testing::Values(IntrinsicData{"countOneBits", IntrinsicType::kCountOneBits},
-                    IntrinsicData{"reverseBits", IntrinsicType::kReverseBits}));
-
-using ResolverIntrinsicTest_FloatOrInt_TwoParam =
-    ResolverTestWithParam<IntrinsicData>;
-TEST_P(ResolverIntrinsicTest_FloatOrInt_TwoParam, Scalar_Signed) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1, 1);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
-}
-
-TEST_P(ResolverIntrinsicTest_FloatOrInt_TwoParam, Scalar_Unsigned) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1u, 1u);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
-}
-
-TEST_P(ResolverIntrinsicTest_FloatOrInt_TwoParam, Scalar_Float) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, 1.0f, 1.0f);
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
-}
-
-TEST_P(ResolverIntrinsicTest_FloatOrInt_TwoParam, Vector_Signed) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<i32>(1, 1, 3), vec3<i32>(1, 1, 3));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_signed_integer_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_FloatOrInt_TwoParam, Vector_Unsigned) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name, vec3<u32>(1u, 1u, 3u), vec3<u32>(1u, 1u, 3u));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_unsigned_integer_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_FloatOrInt_TwoParam, Vector_Float) {
-  auto param = GetParam();
-
-  auto* call =
-      Call(param.name, vec3<f32>(1.f, 1.f, 3.f), vec3<f32>(1.f, 1.f, 3.f));
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->is_float_vector());
-  EXPECT_EQ(TypeOf(call)->As<sem::Vector>()->Width(), 3u);
-}
-
-TEST_P(ResolverIntrinsicTest_FloatOrInt_TwoParam, Error_NoParams) {
-  auto param = GetParam();
-
-  auto* call = Call(param.name);
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(),
-            "error: no matching call to " + std::string(param.name) +
-                "()\n\n"
-                "2 candidate functions:\n  " +
-                std::string(param.name) +
-                "(T, T) -> T  where: T is f32, i32 or u32\n  " +
-                std::string(param.name) +
-                "(vecN<T>, vecN<T>) -> vecN<T>  where: T is f32, i32 or u32\n");
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_FloatOrInt_TwoParam,
-    testing::Values(IntrinsicData{"min", IntrinsicType::kMin},
-                    IntrinsicData{"max", IntrinsicType::kMax}));
-
-TEST_F(ResolverIntrinsicTest, Determinant_2x2) {
-  Global("var", ty.mat2x2<f32>(), ast::StorageClass::kPrivate);
-
-  auto* call = Call("determinant", "var");
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
-}
-
-TEST_F(ResolverIntrinsicTest, Determinant_3x3) {
-  Global("var", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
-
-  auto* call = Call("determinant", "var");
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
-}
-
-TEST_F(ResolverIntrinsicTest, Determinant_4x4) {
-  Global("var", ty.mat4x4<f32>(), ast::StorageClass::kPrivate);
-
-  auto* call = Call("determinant", "var");
-  WrapInFunction(call);
-
-  EXPECT_TRUE(r()->Resolve()) << r()->error();
-
-  ASSERT_NE(TypeOf(call), nullptr);
-  EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
-}
-
-TEST_F(ResolverIntrinsicTest, Determinant_NotSquare) {
-  Global("var", ty.mat2x3<f32>(), ast::StorageClass::kPrivate);
-
-  auto* call = Call("determinant", "var");
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), R"(error: no matching call to determinant(mat2x3<f32>)
-
-1 candidate function:
-  determinant(matNxN<f32>) -> f32
-)");
-}
-
-TEST_F(ResolverIntrinsicTest, Determinant_NotMatrix) {
-  Global("var", ty.f32(), ast::StorageClass::kPrivate);
-
-  auto* call = Call("determinant", "var");
-  WrapInFunction(call);
-
-  EXPECT_FALSE(r()->Resolve());
-
-  EXPECT_EQ(r()->error(), R"(error: no matching call to determinant(f32)
-
-1 candidate function:
-  determinant(matNxN<f32>) -> f32
-)");
-}
-
-using ResolverIntrinsicTest_Texture =
-    ResolverTestWithParam<ast::intrinsic::test::TextureOverloadCase>;
-
-INSTANTIATE_TEST_SUITE_P(
-    ResolverTest,
-    ResolverIntrinsicTest_Texture,
-    testing::ValuesIn(ast::intrinsic::test::TextureOverloadCase::ValidCases()));
-
-std::string to_str(const std::string& function,
-                   const sem::ParameterList& params) {
-  std::stringstream out;
-  out << function << "(";
-  bool first = true;
-  for (auto* param : params) {
-    if (!first) {
-      out << ", ";
-    }
-    out << sem::str(param->Usage());
-    first = false;
-  }
-  out << ")";
-  return out.str();
-}
-
-const char* expected_texture_overload(
-    ast::intrinsic::test::ValidTextureOverload overload) {
-  using ValidTextureOverload = ast::intrinsic::test::ValidTextureOverload;
-  switch (overload) {
-    case ValidTextureOverload::kDimensions1d:
-    case ValidTextureOverload::kDimensions2d:
-    case ValidTextureOverload::kDimensions2dArray:
-    case ValidTextureOverload::kDimensions3d:
-    case ValidTextureOverload::kDimensionsCube:
-    case ValidTextureOverload::kDimensionsCubeArray:
-    case ValidTextureOverload::kDimensionsMultisampled2d:
-    case ValidTextureOverload::kDimensionsDepth2d:
-    case ValidTextureOverload::kDimensionsDepth2dArray:
-    case ValidTextureOverload::kDimensionsDepthCube:
-    case ValidTextureOverload::kDimensionsDepthCubeArray:
-    case ValidTextureOverload::kDimensionsDepthMultisampled2d:
-    case ValidTextureOverload::kDimensionsStorageWO1d:
-    case ValidTextureOverload::kDimensionsStorageWO2d:
-    case ValidTextureOverload::kDimensionsStorageWO2dArray:
-    case ValidTextureOverload::kDimensionsStorageWO3d:
-      return R"(textureDimensions(texture))";
-    case ValidTextureOverload::kGather2dF32:
-      return R"(textureGather(component, texture, sampler, coords))";
-    case ValidTextureOverload::kGather2dOffsetF32:
-      return R"(textureGather(component, texture, sampler, coords, offset))";
-    case ValidTextureOverload::kGather2dArrayF32:
-      return R"(textureGather(component, texture, sampler, coords, array_index))";
-    case ValidTextureOverload::kGather2dArrayOffsetF32:
-      return R"(textureGather(component, texture, sampler, coords, array_index, offset))";
-    case ValidTextureOverload::kGatherCubeF32:
-      return R"(textureGather(component, texture, sampler, coords))";
-    case ValidTextureOverload::kGatherCubeArrayF32:
-      return R"(textureGather(component, texture, sampler, coords, array_index))";
-    case ValidTextureOverload::kGatherDepth2dF32:
-      return R"(textureGather(texture, sampler, coords))";
-    case ValidTextureOverload::kGatherDepth2dOffsetF32:
-      return R"(textureGather(texture, sampler, coords, offset))";
-    case ValidTextureOverload::kGatherDepth2dArrayF32:
-      return R"(textureGather(texture, sampler, coords, array_index))";
-    case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
-      return R"(textureGather(texture, sampler, coords, array_index, offset))";
-    case ValidTextureOverload::kGatherDepthCubeF32:
-      return R"(textureGather(texture, sampler, coords))";
-    case ValidTextureOverload::kGatherDepthCubeArrayF32:
-      return R"(textureGather(texture, sampler, coords, array_index))";
-    case ValidTextureOverload::kGatherCompareDepth2dF32:
-      return R"(textureGatherCompare(texture, sampler, coords, depth_ref))";
-    case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
-      return R"(textureGatherCompare(texture, sampler, coords, depth_ref, offset))";
-    case ValidTextureOverload::kGatherCompareDepth2dArrayF32:
-      return R"(textureGatherCompare(texture, sampler, coords, array_index, depth_ref))";
-    case ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32:
-      return R"(textureGatherCompare(texture, sampler, coords, array_index, depth_ref, offset))";
-    case ValidTextureOverload::kGatherCompareDepthCubeF32:
-      return R"(textureGatherCompare(texture, sampler, coords, depth_ref))";
-    case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
-      return R"(textureGatherCompare(texture, sampler, coords, array_index, depth_ref))";
-    case ValidTextureOverload::kNumLayers2dArray:
-    case ValidTextureOverload::kNumLayersCubeArray:
-    case ValidTextureOverload::kNumLayersDepth2dArray:
-    case ValidTextureOverload::kNumLayersDepthCubeArray:
-    case ValidTextureOverload::kNumLayersStorageWO2dArray:
-      return R"(textureNumLayers(texture))";
-    case ValidTextureOverload::kNumLevels2d:
-    case ValidTextureOverload::kNumLevels2dArray:
-    case ValidTextureOverload::kNumLevels3d:
-    case ValidTextureOverload::kNumLevelsCube:
-    case ValidTextureOverload::kNumLevelsCubeArray:
-    case ValidTextureOverload::kNumLevelsDepth2d:
-    case ValidTextureOverload::kNumLevelsDepth2dArray:
-    case ValidTextureOverload::kNumLevelsDepthCube:
-    case ValidTextureOverload::kNumLevelsDepthCubeArray:
-      return R"(textureNumLevels(texture))";
-    case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
-    case ValidTextureOverload::kNumSamplesMultisampled2d:
-      return R"(textureNumSamples(texture))";
-    case ValidTextureOverload::kDimensions2dLevel:
-    case ValidTextureOverload::kDimensions2dArrayLevel:
-    case ValidTextureOverload::kDimensions3dLevel:
-    case ValidTextureOverload::kDimensionsCubeLevel:
-    case ValidTextureOverload::kDimensionsCubeArrayLevel:
-    case ValidTextureOverload::kDimensionsDepth2dLevel:
-    case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
-    case ValidTextureOverload::kDimensionsDepthCubeLevel:
-    case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
-      return R"(textureDimensions(texture, level))";
-    case ValidTextureOverload::kSample1dF32:
-      return R"(textureSample(texture, sampler, coords))";
-    case ValidTextureOverload::kSample2dF32:
-      return R"(textureSample(texture, sampler, coords))";
-    case ValidTextureOverload::kSample2dOffsetF32:
-      return R"(textureSample(texture, sampler, coords, offset))";
-    case ValidTextureOverload::kSample2dArrayF32:
-      return R"(textureSample(texture, sampler, coords, array_index))";
-    case ValidTextureOverload::kSample2dArrayOffsetF32:
-      return R"(textureSample(texture, sampler, coords, array_index, offset))";
-    case ValidTextureOverload::kSample3dF32:
-      return R"(textureSample(texture, sampler, coords))";
-    case ValidTextureOverload::kSample3dOffsetF32:
-      return R"(textureSample(texture, sampler, coords, offset))";
-    case ValidTextureOverload::kSampleCubeF32:
-      return R"(textureSample(texture, sampler, coords))";
-    case ValidTextureOverload::kSampleCubeArrayF32:
-      return R"(textureSample(texture, sampler, coords, array_index))";
-    case ValidTextureOverload::kSampleDepth2dF32:
-      return R"(textureSample(texture, sampler, coords))";
-    case ValidTextureOverload::kSampleDepth2dOffsetF32:
-      return R"(textureSample(texture, sampler, coords, offset))";
-    case ValidTextureOverload::kSampleDepth2dArrayF32:
-      return R"(textureSample(texture, sampler, coords, array_index))";
-    case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
-      return R"(textureSample(texture, sampler, coords, array_index, offset))";
-    case ValidTextureOverload::kSampleDepthCubeF32:
-      return R"(textureSample(texture, sampler, coords))";
-    case ValidTextureOverload::kSampleDepthCubeArrayF32:
-      return R"(textureSample(texture, sampler, coords, array_index))";
-    case ValidTextureOverload::kSampleBias2dF32:
-      return R"(textureSampleBias(texture, sampler, coords, bias))";
-    case ValidTextureOverload::kSampleBias2dOffsetF32:
-      return R"(textureSampleBias(texture, sampler, coords, bias, offset))";
-    case ValidTextureOverload::kSampleBias2dArrayF32:
-      return R"(textureSampleBias(texture, sampler, coords, array_index, bias))";
-    case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
-      return R"(textureSampleBias(texture, sampler, coords, array_index, bias, offset))";
-    case ValidTextureOverload::kSampleBias3dF32:
-      return R"(textureSampleBias(texture, sampler, coords, bias))";
-    case ValidTextureOverload::kSampleBias3dOffsetF32:
-      return R"(textureSampleBias(texture, sampler, coords, bias, offset))";
-    case ValidTextureOverload::kSampleBiasCubeF32:
-      return R"(textureSampleBias(texture, sampler, coords, bias))";
-    case ValidTextureOverload::kSampleBiasCubeArrayF32:
-      return R"(textureSampleBias(texture, sampler, coords, array_index, bias))";
-    case ValidTextureOverload::kSampleLevel2dF32:
-      return R"(textureSampleLevel(texture, sampler, coords, level))";
-    case ValidTextureOverload::kSampleLevel2dOffsetF32:
-      return R"(textureSampleLevel(texture, sampler, coords, level, offset))";
-    case ValidTextureOverload::kSampleLevel2dArrayF32:
-      return R"(textureSampleLevel(texture, sampler, coords, array_index, level))";
-    case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
-      return R"(textureSampleLevel(texture, sampler, coords, array_index, level, offset))";
-    case ValidTextureOverload::kSampleLevel3dF32:
-      return R"(textureSampleLevel(texture, sampler, coords, level))";
-    case ValidTextureOverload::kSampleLevel3dOffsetF32:
-      return R"(textureSampleLevel(texture, sampler, coords, level, offset))";
-    case ValidTextureOverload::kSampleLevelCubeF32:
-      return R"(textureSampleLevel(texture, sampler, coords, level))";
-    case ValidTextureOverload::kSampleLevelCubeArrayF32:
-      return R"(textureSampleLevel(texture, sampler, coords, array_index, level))";
-    case ValidTextureOverload::kSampleLevelDepth2dF32:
-      return R"(textureSampleLevel(texture, sampler, coords, level))";
-    case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
-      return R"(textureSampleLevel(texture, sampler, coords, level, offset))";
-    case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
-      return R"(textureSampleLevel(texture, sampler, coords, array_index, level))";
-    case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
-      return R"(textureSampleLevel(texture, sampler, coords, array_index, level, offset))";
-    case ValidTextureOverload::kSampleLevelDepthCubeF32:
-      return R"(textureSampleLevel(texture, sampler, coords, level))";
-    case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
-      return R"(textureSampleLevel(texture, sampler, coords, array_index, level))";
-    case ValidTextureOverload::kSampleGrad2dF32:
-      return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy))";
-    case ValidTextureOverload::kSampleGrad2dOffsetF32:
-      return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy, offset))";
-    case ValidTextureOverload::kSampleGrad2dArrayF32:
-      return R"(textureSampleGrad(texture, sampler, coords, array_index, ddx, ddy))";
-    case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
-      return R"(textureSampleGrad(texture, sampler, coords, array_index, ddx, ddy, offset))";
-    case ValidTextureOverload::kSampleGrad3dF32:
-      return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy))";
-    case ValidTextureOverload::kSampleGrad3dOffsetF32:
-      return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy, offset))";
-    case ValidTextureOverload::kSampleGradCubeF32:
-      return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy))";
-    case ValidTextureOverload::kSampleGradCubeArrayF32:
-      return R"(textureSampleGrad(texture, sampler, coords, array_index, ddx, ddy))";
-    case ValidTextureOverload::kSampleCompareDepth2dF32:
-      return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
-    case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
-      return R"(textureSampleCompare(texture, sampler, coords, depth_ref, offset))";
-    case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
-      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
-    case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
-      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref, offset))";
-    case ValidTextureOverload::kSampleCompareDepthCubeF32:
-      return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
-    case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
-      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
-      return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
-      return R"(textureSampleCompare(texture, sampler, coords, depth_ref, offset))";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
-      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
-      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref, offset))";
-    case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
-      return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
-    case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
-      return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
-    case ValidTextureOverload::kLoad1dLevelF32:
-    case ValidTextureOverload::kLoad1dLevelU32:
-    case ValidTextureOverload::kLoad1dLevelI32:
-    case ValidTextureOverload::kLoad2dLevelF32:
-    case ValidTextureOverload::kLoad2dLevelU32:
-    case ValidTextureOverload::kLoad2dLevelI32:
-      return R"(textureLoad(texture, coords, level))";
-    case ValidTextureOverload::kLoad2dArrayLevelF32:
-    case ValidTextureOverload::kLoad2dArrayLevelU32:
-    case ValidTextureOverload::kLoad2dArrayLevelI32:
-      return R"(textureLoad(texture, coords, array_index, level))";
-    case ValidTextureOverload::kLoad3dLevelF32:
-    case ValidTextureOverload::kLoad3dLevelU32:
-    case ValidTextureOverload::kLoad3dLevelI32:
-    case ValidTextureOverload::kLoadDepth2dLevelF32:
-      return R"(textureLoad(texture, coords, level))";
-    case ValidTextureOverload::kLoadDepthMultisampled2dF32:
-    case ValidTextureOverload::kLoadMultisampled2dF32:
-    case ValidTextureOverload::kLoadMultisampled2dU32:
-    case ValidTextureOverload::kLoadMultisampled2dI32:
-      return R"(textureLoad(texture, coords, sample_index))";
-    case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
-      return R"(textureLoad(texture, coords, array_index, level))";
-    case ValidTextureOverload::kStoreWO1dRgba32float:
-    case ValidTextureOverload::kStoreWO2dRgba32float:
-    case ValidTextureOverload::kStoreWO3dRgba32float:
-      return R"(textureStore(texture, coords, value))";
-    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
-      return R"(textureStore(texture, coords, array_index, value))";
-  }
-  return "<unmatched texture overload>";
-}
-
-TEST_P(ResolverIntrinsicTest_Texture, Call) {
-  auto param = GetParam();
-
-  param.BuildTextureVariable(this);
-  param.BuildSamplerVariable(this);
-
-  auto* call = Call(param.function, param.args(this));
-  auto* stmt = CallStmt(call);
-  Func("func", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
-
-  ASSERT_TRUE(r()->Resolve()) << r()->error();
-
-  if (std::string(param.function) == "textureDimensions") {
-    switch (param.texture_dimension) {
-      default:
-        FAIL() << "invalid texture dimensions: " << param.texture_dimension;
-      case ast::TextureDimension::k1d:
-        EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
-        break;
-      case ast::TextureDimension::k2d:
-      case ast::TextureDimension::k2dArray:
-      case ast::TextureDimension::kCube:
-      case ast::TextureDimension::kCubeArray: {
-        auto* vec = As<sem::Vector>(TypeOf(call));
-        ASSERT_NE(vec, nullptr);
-        EXPECT_EQ(vec->Width(), 2u);
-        EXPECT_TRUE(vec->type()->Is<sem::I32>());
-        break;
-      }
-      case ast::TextureDimension::k3d: {
-        auto* vec = As<sem::Vector>(TypeOf(call));
-        ASSERT_NE(vec, nullptr);
-        EXPECT_EQ(vec->Width(), 3u);
-        EXPECT_TRUE(vec->type()->Is<sem::I32>());
-        break;
-      }
-    }
-  } else if (std::string(param.function) == "textureNumLayers") {
-    EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
-  } else if (std::string(param.function) == "textureNumLevels") {
-    EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
-  } else if (std::string(param.function) == "textureNumSamples") {
-    EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
-  } else if (std::string(param.function) == "textureStore") {
-    EXPECT_TRUE(TypeOf(call)->Is<sem::Void>());
-  } else if (std::string(param.function) == "textureGather") {
-    auto* vec = As<sem::Vector>(TypeOf(call));
-    ASSERT_NE(vec, nullptr);
-    EXPECT_EQ(vec->Width(), 4u);
-    switch (param.texture_data_type) {
-      case ast::intrinsic::test::TextureDataType::kF32:
-        EXPECT_TRUE(vec->type()->Is<sem::F32>());
-        break;
-      case ast::intrinsic::test::TextureDataType::kU32:
-        EXPECT_TRUE(vec->type()->Is<sem::U32>());
-        break;
-      case ast::intrinsic::test::TextureDataType::kI32:
-        EXPECT_TRUE(vec->type()->Is<sem::I32>());
-        break;
-    }
-  } else if (std::string(param.function) == "textureGatherCompare") {
-    auto* vec = As<sem::Vector>(TypeOf(call));
-    ASSERT_NE(vec, nullptr);
-    EXPECT_EQ(vec->Width(), 4u);
-    EXPECT_TRUE(vec->type()->Is<sem::F32>());
-  } else {
-    switch (param.texture_kind) {
-      case ast::intrinsic::test::TextureKind::kRegular:
-      case ast::intrinsic::test::TextureKind::kMultisampled:
-      case ast::intrinsic::test::TextureKind::kStorage: {
-        auto* vec = TypeOf(call)->As<sem::Vector>();
-        ASSERT_NE(vec, nullptr);
-        switch (param.texture_data_type) {
-          case ast::intrinsic::test::TextureDataType::kF32:
-            EXPECT_TRUE(vec->type()->Is<sem::F32>());
-            break;
-          case ast::intrinsic::test::TextureDataType::kU32:
-            EXPECT_TRUE(vec->type()->Is<sem::U32>());
-            break;
-          case ast::intrinsic::test::TextureDataType::kI32:
-            EXPECT_TRUE(vec->type()->Is<sem::I32>());
-            break;
-        }
-        break;
-      }
-      case ast::intrinsic::test::TextureKind::kDepth:
-      case ast::intrinsic::test::TextureKind::kDepthMultisampled: {
-        EXPECT_TRUE(TypeOf(call)->Is<sem::F32>());
-        break;
-      }
-    }
-  }
-
-  auto* call_sem = Sem().Get(call);
-  ASSERT_NE(call_sem, nullptr);
-  auto* target = call_sem->Target();
-  ASSERT_NE(target, nullptr);
-
-  auto got = resolver::to_str(param.function, target->Parameters());
-  auto* expected = expected_texture_overload(param.overload);
-  EXPECT_EQ(got, expected);
-}
-
-}  // namespace
-}  // namespace resolver
-}  // namespace tint
diff --git a/src/resolver/intrinsic_validation_test.cc b/src/resolver/intrinsic_validation_test.cc
deleted file mode 100644
index 80a3dc9..0000000
--- a/src/resolver/intrinsic_validation_test.cc
+++ /dev/null
@@ -1,403 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/ast/intrinsic_texture_helper_test.h"
-#include "src/resolver/resolver_test_helper.h"
-
-namespace tint {
-namespace resolver {
-namespace {
-
-using ResolverIntrinsicValidationTest = ResolverTest;
-
-TEST_F(ResolverIntrinsicValidationTest,
-       FunctionTypeMustMatchReturnStatementType_void_fail) {
-  // fn func { return workgroupBarrier(); }
-  Func("func", {}, ty.void_(),
-       {
-           Return(Call(Source{Source::Location{12, 34}}, "workgroupBarrier")),
-       });
-
-  EXPECT_FALSE(r()->Resolve());
-  EXPECT_EQ(
-      r()->error(),
-      "12:34 error: intrinsic 'workgroupBarrier' does not return a value");
-}
-
-TEST_F(ResolverIntrinsicValidationTest, InvalidPipelineStageDirect) {
-  // @stage(compute) @workgroup_size(1) fn func { return dpdx(1.0); }
-
-  auto* dpdx = create<ast::CallExpression>(Source{{3, 4}}, Expr("dpdx"),
-                                           ast::ExpressionList{Expr(1.0f)});
-  Func(Source{{1, 2}}, "func", ast::VariableList{}, ty.void_(),
-       {CallStmt(dpdx)},
-       {Stage(ast::PipelineStage::kCompute), WorkgroupSize(1)});
-
-  EXPECT_FALSE(r()->Resolve());
-  EXPECT_EQ(r()->error(),
-            "3:4 error: built-in cannot be used by compute pipeline stage");
-}
-
-TEST_F(ResolverIntrinsicValidationTest, InvalidPipelineStageIndirect) {
-  // fn f0 { return dpdx(1.0); }
-  // fn f1 { f0(); }
-  // fn f2 { f1(); }
-  // @stage(compute) @workgroup_size(1) fn main { return f2(); }
-
-  auto* dpdx = create<ast::CallExpression>(Source{{3, 4}}, Expr("dpdx"),
-                                           ast::ExpressionList{Expr(1.0f)});
-  Func(Source{{1, 2}}, "f0", {}, ty.void_(), {CallStmt(dpdx)});
-
-  Func(Source{{3, 4}}, "f1", {}, ty.void_(), {CallStmt(Call("f0"))});
-
-  Func(Source{{5, 6}}, "f2", {}, ty.void_(), {CallStmt(Call("f1"))});
-
-  Func(Source{{7, 8}}, "main", {}, ty.void_(), {CallStmt(Call("f2"))},
-       {Stage(ast::PipelineStage::kCompute), WorkgroupSize(1)});
-
-  EXPECT_FALSE(r()->Resolve());
-  EXPECT_EQ(r()->error(),
-            R"(3:4 error: built-in cannot be used by compute pipeline stage
-1:2 note: called by function 'f0'
-3:4 note: called by function 'f1'
-5:6 note: called by function 'f2'
-7:8 note: called by entry point 'main')");
-}
-
-TEST_F(ResolverIntrinsicValidationTest, IntrinsicRedeclaredAsFunction) {
-  Func(Source{{12, 34}}, "mix", {}, ty.i32(), {});
-
-  EXPECT_FALSE(r()->Resolve());
-  EXPECT_EQ(
-      r()->error(),
-      R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a function)");
-}
-
-TEST_F(ResolverIntrinsicValidationTest, IntrinsicRedeclaredAsGlobalLet) {
-  GlobalConst(Source{{12, 34}}, "mix", ty.i32(), Expr(1));
-
-  EXPECT_FALSE(r()->Resolve());
-  EXPECT_EQ(
-      r()->error(),
-      R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a module-scope let)");
-}
-
-TEST_F(ResolverIntrinsicValidationTest, IntrinsicRedeclaredAsGlobalVar) {
-  Global(Source{{12, 34}}, "mix", ty.i32(), Expr(1),
-         ast::StorageClass::kPrivate);
-
-  EXPECT_FALSE(r()->Resolve());
-  EXPECT_EQ(
-      r()->error(),
-      R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a module-scope var)");
-}
-
-TEST_F(ResolverIntrinsicValidationTest, IntrinsicRedeclaredAsAlias) {
-  Alias(Source{{12, 34}}, "mix", ty.i32());
-
-  EXPECT_FALSE(r()->Resolve());
-  EXPECT_EQ(
-      r()->error(),
-      R"(12:34 error: 'mix' is a builtin and cannot be redeclared as an alias)");
-}
-
-TEST_F(ResolverIntrinsicValidationTest, IntrinsicRedeclaredAsStruct) {
-  Structure(Source{{12, 34}}, "mix", {Member("m", ty.i32())});
-
-  EXPECT_FALSE(r()->Resolve());
-  EXPECT_EQ(
-      r()->error(),
-      R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a struct)");
-}
-
-namespace texture_constexpr_args {
-
-using TextureOverloadCase = ast::intrinsic::test::TextureOverloadCase;
-using ValidTextureOverload = ast::intrinsic::test::ValidTextureOverload;
-using TextureKind = ast::intrinsic::test::TextureKind;
-using TextureDataType = ast::intrinsic::test::TextureDataType;
-using u32 = ProgramBuilder::u32;
-using i32 = ProgramBuilder::i32;
-using f32 = ProgramBuilder::f32;
-
-static std::vector<TextureOverloadCase> TextureCases(
-    std::unordered_set<ValidTextureOverload> overloads) {
-  std::vector<TextureOverloadCase> cases;
-  for (auto c : TextureOverloadCase::ValidCases()) {
-    if (overloads.count(c.overload)) {
-      cases.push_back(c);
-    }
-  }
-  return cases;
-}
-
-enum class Position {
-  kFirst,
-  kLast,
-};
-
-struct Parameter {
-  const char* const name;
-  const Position position;
-  int min;
-  int max;
-};
-
-class Constexpr {
- public:
-  enum class Kind {
-    kScalar,
-    kVec2,
-    kVec3,
-    kVec3_Scalar_Vec2,
-    kVec3_Vec2_Scalar,
-    kEmptyVec2,
-    kEmptyVec3,
-  };
-
-  Constexpr(int32_t invalid_idx,
-            Kind k,
-            int32_t x = 0,
-            int32_t y = 0,
-            int32_t z = 0)
-      : invalid_index(invalid_idx), kind(k), values{x, y, z} {}
-
-  const ast::Expression* operator()(Source src, ProgramBuilder& b) {
-    switch (kind) {
-      case Kind::kScalar:
-        return b.Expr(src, values[0]);
-      case Kind::kVec2:
-        return b.Construct(src, b.ty.vec2<i32>(), values[0], values[1]);
-      case Kind::kVec3:
-        return b.Construct(src, b.ty.vec3<i32>(), values[0], values[1],
-                           values[2]);
-      case Kind::kVec3_Scalar_Vec2:
-        return b.Construct(src, b.ty.vec3<i32>(), values[0],
-                           b.vec2<i32>(values[1], values[2]));
-      case Kind::kVec3_Vec2_Scalar:
-        return b.Construct(src, b.ty.vec3<i32>(),
-                           b.vec2<i32>(values[0], values[1]), values[2]);
-      case Kind::kEmptyVec2:
-        return b.Construct(src, b.ty.vec2<i32>());
-      case Kind::kEmptyVec3:
-        return b.Construct(src, b.ty.vec3<i32>());
-    }
-    return nullptr;
-  }
-
-  static const constexpr int32_t kValid = -1;
-  const int32_t invalid_index;  // Expected error value, or kValid
-  const Kind kind;
-  const std::array<int32_t, 3> values;
-};
-
-static std::ostream& operator<<(std::ostream& out, Parameter param) {
-  return out << param.name;
-}
-
-static std::ostream& operator<<(std::ostream& out, Constexpr expr) {
-  switch (expr.kind) {
-    case Constexpr::Kind::kScalar:
-      return out << expr.values[0];
-    case Constexpr::Kind::kVec2:
-      return out << "vec2(" << expr.values[0] << ", " << expr.values[1] << ")";
-    case Constexpr::Kind::kVec3:
-      return out << "vec3(" << expr.values[0] << ", " << expr.values[1] << ", "
-                 << expr.values[2] << ")";
-    case Constexpr::Kind::kVec3_Scalar_Vec2:
-      return out << "vec3(" << expr.values[0] << ", vec2(" << expr.values[1]
-                 << ", " << expr.values[2] << "))";
-    case Constexpr::Kind::kVec3_Vec2_Scalar:
-      return out << "vec3(vec2(" << expr.values[0] << ", " << expr.values[1]
-                 << "), " << expr.values[2] << ")";
-    case Constexpr::Kind::kEmptyVec2:
-      return out << "vec2()";
-    case Constexpr::Kind::kEmptyVec3:
-      return out << "vec3()";
-  }
-  return out;
-}
-
-using IntrinsicTextureConstExprArgValidationTest = ResolverTestWithParam<
-    std::tuple<TextureOverloadCase, Parameter, Constexpr>>;
-
-TEST_P(IntrinsicTextureConstExprArgValidationTest, Immediate) {
-  auto& p = GetParam();
-  auto overload = std::get<0>(p);
-  auto param = std::get<1>(p);
-  auto expr = std::get<2>(p);
-
-  overload.BuildTextureVariable(this);
-  overload.BuildSamplerVariable(this);
-
-  auto args = overload.args(this);
-  auto*& arg_to_replace =
-      (param.position == Position::kFirst) ? args.front() : args.back();
-
-  // BuildTextureVariable() uses a Literal for scalars, and a CallExpression for
-  // a vector constructor.
-  bool is_vector = arg_to_replace->Is<ast::CallExpression>();
-
-  // Make the expression to be replaced, reachable. This keeps the resolver
-  // happy.
-  WrapInFunction(arg_to_replace);
-
-  arg_to_replace = expr(Source{{12, 34}}, *this);
-
-  // Call the intrinsic with the constexpr argument replaced
-  Func("func", {}, ty.void_(), {CallStmt(Call(overload.function, args))},
-       {Stage(ast::PipelineStage::kFragment)});
-
-  if (expr.invalid_index == Constexpr::kValid) {
-    EXPECT_TRUE(r()->Resolve()) << r()->error();
-  } else {
-    EXPECT_FALSE(r()->Resolve());
-    std::stringstream err;
-    if (is_vector) {
-      err << "12:34 error: each component of the " << param.name
-          << " argument must be at least " << param.min << " and at most "
-          << param.max << ". " << param.name << " component "
-          << expr.invalid_index << " is "
-          << std::to_string(expr.values[expr.invalid_index]);
-    } else {
-      err << "12:34 error: the " << param.name << " argument must be at least "
-          << param.min << " and at most " << param.max << ". " << param.name
-          << " is " << std::to_string(expr.values[expr.invalid_index]);
-    }
-    EXPECT_EQ(r()->error(), err.str());
-  }
-}
-
-TEST_P(IntrinsicTextureConstExprArgValidationTest, GlobalConst) {
-  auto& p = GetParam();
-  auto overload = std::get<0>(p);
-  auto param = std::get<1>(p);
-  auto expr = std::get<2>(p);
-
-  // Build the global texture and sampler variables
-  overload.BuildTextureVariable(this);
-  overload.BuildSamplerVariable(this);
-
-  // Build the module-scope let 'G' with the offset value
-  GlobalConst("G", nullptr, expr({}, *this));
-
-  auto args = overload.args(this);
-  auto*& arg_to_replace =
-      (param.position == Position::kFirst) ? args.front() : args.back();
-
-  // Make the expression to be replaced, reachable. This keeps the resolver
-  // happy.
-  WrapInFunction(arg_to_replace);
-
-  arg_to_replace = Expr(Source{{12, 34}}, "G");
-
-  // Call the intrinsic with the constexpr argument replaced
-  Func("func", {}, ty.void_(), {CallStmt(Call(overload.function, args))},
-       {Stage(ast::PipelineStage::kFragment)});
-
-  EXPECT_FALSE(r()->Resolve());
-  std::stringstream err;
-  err << "12:34 error: the " << param.name
-      << " argument must be a const_expression";
-  EXPECT_EQ(r()->error(), err.str());
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    Offset2D,
-    IntrinsicTextureConstExprArgValidationTest,
-    testing::Combine(
-        testing::ValuesIn(TextureCases({
-            ValidTextureOverload::kSample2dOffsetF32,
-            ValidTextureOverload::kSample2dArrayOffsetF32,
-            ValidTextureOverload::kSampleDepth2dOffsetF32,
-            ValidTextureOverload::kSampleDepth2dArrayOffsetF32,
-            ValidTextureOverload::kSampleBias2dOffsetF32,
-            ValidTextureOverload::kSampleBias2dArrayOffsetF32,
-            ValidTextureOverload::kSampleLevel2dOffsetF32,
-            ValidTextureOverload::kSampleLevel2dArrayOffsetF32,
-            ValidTextureOverload::kSampleLevelDepth2dOffsetF32,
-            ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32,
-            ValidTextureOverload::kSampleGrad2dOffsetF32,
-            ValidTextureOverload::kSampleGrad2dArrayOffsetF32,
-            ValidTextureOverload::kSampleCompareDepth2dOffsetF32,
-            ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32,
-            ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32,
-            ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32,
-        })),
-        testing::Values(Parameter{"offset", Position::kLast, -8, 7}),
-        testing::Values(
-            Constexpr{Constexpr::kValid, Constexpr::Kind::kEmptyVec2},
-            Constexpr{Constexpr::kValid, Constexpr::Kind::kVec2, -1, 1},
-            Constexpr{Constexpr::kValid, Constexpr::Kind::kVec2, 7, -8},
-            Constexpr{0, Constexpr::Kind::kVec2, 8, 0},
-            Constexpr{1, Constexpr::Kind::kVec2, 0, 8},
-            Constexpr{0, Constexpr::Kind::kVec2, -9, 0},
-            Constexpr{1, Constexpr::Kind::kVec2, 0, -9},
-            Constexpr{0, Constexpr::Kind::kVec2, 8, 8},
-            Constexpr{0, Constexpr::Kind::kVec2, -9, -9})));
-
-INSTANTIATE_TEST_SUITE_P(
-    Offset3D,
-    IntrinsicTextureConstExprArgValidationTest,
-    testing::Combine(
-        testing::ValuesIn(TextureCases({
-            ValidTextureOverload::kSample3dOffsetF32,
-            ValidTextureOverload::kSampleBias3dOffsetF32,
-            ValidTextureOverload::kSampleLevel3dOffsetF32,
-            ValidTextureOverload::kSampleGrad3dOffsetF32,
-        })),
-        testing::Values(Parameter{"offset", Position::kLast, -8, 7}),
-        testing::Values(
-            Constexpr{Constexpr::kValid, Constexpr::Kind::kEmptyVec3},
-            Constexpr{Constexpr::kValid, Constexpr::Kind::kVec3, 0, 0, 0},
-            Constexpr{Constexpr::kValid, Constexpr::Kind::kVec3, 7, -8, 7},
-            Constexpr{0, Constexpr::Kind::kVec3, 10, 0, 0},
-            Constexpr{1, Constexpr::Kind::kVec3, 0, 10, 0},
-            Constexpr{2, Constexpr::Kind::kVec3, 0, 0, 10},
-            Constexpr{0, Constexpr::Kind::kVec3, 10, 11, 12},
-            Constexpr{0, Constexpr::Kind::kVec3_Scalar_Vec2, 10, 0, 0},
-            Constexpr{1, Constexpr::Kind::kVec3_Scalar_Vec2, 0, 10, 0},
-            Constexpr{2, Constexpr::Kind::kVec3_Scalar_Vec2, 0, 0, 10},
-            Constexpr{0, Constexpr::Kind::kVec3_Scalar_Vec2, 10, 11, 12},
-            Constexpr{0, Constexpr::Kind::kVec3_Vec2_Scalar, 10, 0, 0},
-            Constexpr{1, Constexpr::Kind::kVec3_Vec2_Scalar, 0, 10, 0},
-            Constexpr{2, Constexpr::Kind::kVec3_Vec2_Scalar, 0, 0, 10},
-            Constexpr{0, Constexpr::Kind::kVec3_Vec2_Scalar, 10, 11, 12})));
-
-INSTANTIATE_TEST_SUITE_P(
-    Component,
-    IntrinsicTextureConstExprArgValidationTest,
-    testing::Combine(
-        testing::ValuesIn(
-            TextureCases({ValidTextureOverload::kGather2dF32,
-                          ValidTextureOverload::kGather2dOffsetF32,
-                          ValidTextureOverload::kGather2dArrayF32,
-                          ValidTextureOverload::kGather2dArrayOffsetF32,
-                          ValidTextureOverload::kGatherCubeF32,
-                          ValidTextureOverload::kGatherCubeArrayF32})),
-        testing::Values(Parameter{"component", Position::kFirst, 0, 3}),
-        testing::Values(
-            Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 0},
-            Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 1},
-            Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 2},
-            Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 3},
-            Constexpr{0, Constexpr::Kind::kScalar, 4},
-            Constexpr{0, Constexpr::Kind::kScalar, 123},
-            Constexpr{0, Constexpr::Kind::kScalar, -1})));
-
-}  // namespace texture_constexpr_args
-
-}  // namespace
-}  // namespace resolver
-}  // namespace tint
diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc
index 934d602..6ab3630 100644
--- a/src/resolver/resolver.cc
+++ b/src/resolver/resolver.cc
@@ -84,7 +84,7 @@
 Resolver::Resolver(ProgramBuilder* builder)
     : builder_(builder),
       diagnostics_(builder->Diagnostics()),
-      intrinsic_table_(IntrinsicTable::Create(*builder)) {}
+      builtin_table_(BuiltinTable::Create(*builder)) {}
 
 Resolver::~Resolver() = default;
 
@@ -1354,10 +1354,9 @@
   }
 
   auto name = builder_->Symbols().NameFor(ident->symbol);
-  auto intrinsic_type = sem::ParseIntrinsicType(name);
-  if (intrinsic_type != sem::IntrinsicType::kNone) {
-    return IntrinsicCall(expr, intrinsic_type, std::move(args),
-                         std::move(arg_tys));
+  auto builtin_type = sem::ParseBuiltinType(name);
+  if (builtin_type != sem::BuiltinType::kNone) {
+    return BuiltinCall(expr, builtin_type, std::move(args), std::move(arg_tys));
   }
 
   TINT_ICE(Resolver, diagnostics_)
@@ -1368,36 +1367,35 @@
   return nullptr;
 }
 
-sem::Call* Resolver::IntrinsicCall(
-    const ast::CallExpression* expr,
-    sem::IntrinsicType intrinsic_type,
-    const std::vector<const sem::Expression*> args,
-    const std::vector<const sem::Type*> arg_tys) {
-  auto* intrinsic = intrinsic_table_->Lookup(intrinsic_type, std::move(arg_tys),
-                                             expr->source);
-  if (!intrinsic) {
+sem::Call* Resolver::BuiltinCall(const ast::CallExpression* expr,
+                                 sem::BuiltinType builtin_type,
+                                 const std::vector<const sem::Expression*> args,
+                                 const std::vector<const sem::Type*> arg_tys) {
+  auto* builtin =
+      builtin_table_->Lookup(builtin_type, std::move(arg_tys), expr->source);
+  if (!builtin) {
     return nullptr;
   }
 
-  if (intrinsic->IsDeprecated()) {
-    AddWarning("use of deprecated intrinsic", expr->source);
+  if (builtin->IsDeprecated()) {
+    AddWarning("use of deprecated builtin", expr->source);
   }
 
-  auto* call = builder_->create<sem::Call>(expr, intrinsic, std::move(args),
+  auto* call = builder_->create<sem::Call>(expr, builtin, std::move(args),
                                            current_statement_, sem::Constant{});
 
-  current_function_->AddDirectlyCalledIntrinsic(intrinsic);
+  current_function_->AddDirectlyCalledBuiltin(builtin);
 
-  if (IsTextureIntrinsic(intrinsic_type)) {
-    if (!ValidateTextureIntrinsicFunction(call)) {
+  if (IsTextureBuiltin(builtin_type)) {
+    if (!ValidateTextureBuiltinFunction(call)) {
       return nullptr;
     }
-    // Collect a texture/sampler pair for this intrinsic.
-    const auto& signature = intrinsic->Signature();
+    // Collect a texture/sampler pair for this builtin.
+    const auto& signature = builtin->Signature();
     int texture_index = signature.IndexOf(sem::ParameterUsage::kTexture);
     if (texture_index == -1) {
       TINT_ICE(Resolver, diagnostics_)
-          << "texture intrinsic without texture parameter";
+          << "texture builtin without texture parameter";
     }
 
     auto* texture = args[texture_index]->As<sem::VariableUser>()->Variable();
@@ -1409,7 +1407,7 @@
     current_function_->AddTextureSamplerPair(texture, sampler);
   }
 
-  if (!ValidateIntrinsicCall(call)) {
+  if (!ValidateBuiltinCall(call)) {
     return nullptr;
   }
 
@@ -1662,8 +1660,8 @@
     return nullptr;
   }
 
-  if (IsIntrinsic(symbol)) {
-    AddError("missing '(' for intrinsic call", expr->source.End());
+  if (IsBuiltin(symbol)) {
+    AddError("missing '(' for builtin call", expr->source.End());
     return nullptr;
   }
 
@@ -2786,9 +2784,9 @@
   return false;
 }
 
-bool Resolver::IsIntrinsic(Symbol symbol) const {
+bool Resolver::IsBuiltin(Symbol symbol) const {
   std::string name = builder_->Symbols().NameFor(symbol);
-  return sem::ParseIntrinsicType(name) != sem::IntrinsicType::kNone;
+  return sem::ParseBuiltinType(name) != sem::BuiltinType::kNone;
 }
 
 bool Resolver::IsCallStatement(const ast::Expression* expr) const {
diff --git a/src/resolver/resolver.h b/src/resolver/resolver.h
index eaf1dca..33d945d 100644
--- a/src/resolver/resolver.h
+++ b/src/resolver/resolver.h
@@ -23,7 +23,7 @@
 #include <utility>
 #include <vector>
 
-#include "src/intrinsic_table.h"
+#include "src/builtin_table.h"
 #include "src/program_builder.h"
 #include "src/resolver/dependency_graph.h"
 #include "src/scope_stack.h"
@@ -59,11 +59,11 @@
 class Array;
 class Atomic;
 class BlockStatement;
+class Builtin;
 class CaseStatement;
 class ElseStatement;
 class ForLoopStatement;
 class IfStatement;
-class Intrinsic;
 class LoopStatement;
 class Statement;
 class SwitchStatement;
@@ -191,10 +191,10 @@
                           const std::vector<const sem::Expression*> args,
                           sem::Behaviors arg_behaviors);
   sem::Expression* Identifier(const ast::IdentifierExpression*);
-  sem::Call* IntrinsicCall(const ast::CallExpression*,
-                           sem::IntrinsicType,
-                           const std::vector<const sem::Expression*> args,
-                           const std::vector<const sem::Type*> arg_tys);
+  sem::Call* BuiltinCall(const ast::CallExpression*,
+                         sem::BuiltinType,
+                         const std::vector<const sem::Expression*> args,
+                         const std::vector<const sem::Type*> arg_tys);
   sem::Expression* Literal(const ast::LiteralExpression*);
   sem::Expression* MemberAccessor(const ast::MemberAccessorExpression*);
   sem::Call* TypeConversion(const ast::CallExpression* expr,
@@ -258,7 +258,7 @@
   bool ValidateIfStatement(const sem::IfStatement* stmt);
   bool ValidateInterpolateAttribute(const ast::InterpolateAttribute* attr,
                                     const sem::Type* storage_type);
-  bool ValidateIntrinsicCall(const sem::Call* call);
+  bool ValidateBuiltinCall(const sem::Call* call);
   bool ValidateLocationAttribute(const ast::LocationAttribute* location,
                                  const sem::Type* type,
                                  std::unordered_set<uint32_t>& locations,
@@ -290,7 +290,7 @@
                                        const sem::Type* type);
   bool ValidateArrayConstructorOrCast(const ast::CallExpression* ctor,
                                       const sem::Array* arr_type);
-  bool ValidateTextureIntrinsicFunction(const sem::Call* call);
+  bool ValidateTextureBuiltinFunction(const sem::Call* call);
   bool ValidateNoDuplicateAttributes(const ast::AttributeList& attributes);
   bool ValidateStorageClassLayout(const sem::Type* type,
                                   ast::StorageClass sc,
@@ -462,9 +462,8 @@
     return const_cast<T*>(As<T>(sem));
   }
 
-  /// @returns true if the symbol is the name of an intrinsic (builtin)
-  /// function.
-  bool IsIntrinsic(Symbol) const;
+  /// @returns true if the symbol is the name of a builtin function.
+  bool IsBuiltin(Symbol) const;
 
   /// @returns true if `expr` is the current CallStatement's CallExpression
   bool IsCallStatement(const ast::Expression* expr) const;
@@ -520,7 +519,7 @@
 
   ProgramBuilder* const builder_;
   diag::List& diagnostics_;
-  std::unique_ptr<IntrinsicTable> const intrinsic_table_;
+  std::unique_ptr<BuiltinTable> const builtin_table_;
   DependencyGraph dependencies_;
   std::vector<sem::Function*> entry_points_;
   std::unordered_map<const sem::Type*, const Source&> atomic_composite_info_;
diff --git a/src/resolver/resolver_test.cc b/src/resolver/resolver_test.cc
index 14e177b..239a77a 100644
--- a/src/resolver/resolver_test.cc
+++ b/src/resolver/resolver_test.cc
@@ -21,11 +21,11 @@
 #include "src/ast/assignment_statement.h"
 #include "src/ast/bitcast_expression.h"
 #include "src/ast/break_statement.h"
+#include "src/ast/builtin_texture_helper_test.h"
 #include "src/ast/call_statement.h"
 #include "src/ast/continue_statement.h"
 #include "src/ast/float_literal_expression.h"
 #include "src/ast/if_statement.h"
-#include "src/ast/intrinsic_texture_helper_test.h"
 #include "src/ast/loop_statement.h"
 #include "src/ast/override_attribute.h"
 #include "src/ast/return_statement.h"
@@ -535,7 +535,7 @@
   EXPECT_TRUE(TypeOf(param)->Is<sem::F32>());
 }
 
-TEST_F(ResolverTest, Expr_Call_Intrinsic) {
+TEST_F(ResolverTest, Expr_Call_Builtin) {
   auto* call = Call("round", 2.4f);
   WrapInFunction(call);
 
diff --git a/src/resolver/resolver_validation.cc b/src/resolver/resolver_validation.cc
index acd9c76..0668bd9 100644
--- a/src/resolver/resolver_validation.cc
+++ b/src/resolver/resolver_validation.cc
@@ -560,7 +560,7 @@
 
   if (var->Is<sem::GlobalVariable>()) {
     auto name = builder_->Symbols().NameFor(decl->symbol);
-    if (sem::ParseIntrinsicType(name) != sem::IntrinsicType::kNone) {
+    if (sem::ParseBuiltinType(name) != sem::BuiltinType::kNone) {
       auto* kind = var->Declaration()->is_const ? "let" : "var";
       AddError(
           "'" + name +
@@ -840,7 +840,7 @@
   auto* decl = func->Declaration();
 
   auto name = builder_->Symbols().NameFor(decl->symbol);
-  if (sem::ParseIntrinsicType(name) != sem::IntrinsicType::kNone) {
+  if (sem::ParseBuiltinType(name) != sem::BuiltinType::kNone) {
     AddError(
         "'" + name + "' is a builtin and cannot be redeclared as a function",
         decl->source);
@@ -1369,7 +1369,7 @@
   return true;
 }
 
-bool Resolver::ValidateIntrinsicCall(const sem::Call* call) {
+bool Resolver::ValidateBuiltinCall(const sem::Call* call) {
   if (call->Type()->Is<sem::Void>()) {
     bool is_call_statement = false;
     if (auto* call_stmt = As<ast::CallStatement>(call->Stmt()->Declaration())) {
@@ -1383,7 +1383,7 @@
       // statement should be used instead.
       auto* ident = call->Declaration()->target.name;
       auto name = builder_->Symbols().NameFor(ident->symbol);
-      AddError("intrinsic '" + name + "' does not return a value",
+      AddError("builtin '" + name + "' does not return a value",
                call->Declaration()->source);
       return false;
     }
@@ -1392,14 +1392,14 @@
   return true;
 }
 
-bool Resolver::ValidateTextureIntrinsicFunction(const sem::Call* call) {
-  auto* intrinsic = call->Target()->As<sem::Intrinsic>();
-  if (!intrinsic) {
+bool Resolver::ValidateTextureBuiltinFunction(const sem::Call* call) {
+  auto* builtin = call->Target()->As<sem::Builtin>();
+  if (!builtin) {
     return false;
   }
 
-  std::string func_name = intrinsic->str();
-  auto& signature = intrinsic->Signature();
+  std::string func_name = builtin->str();
+  auto& signature = builtin->Signature();
 
   auto check_arg_is_constexpr = [&](sem::ParameterUsage usage, int min,
                                     int max) {
@@ -1431,7 +1431,7 @@
             return ast::TraverseAction::Stop;
           });
       if (is_const_expr) {
-        auto vector = intrinsic->Parameters()[index]->Type()->Is<sem::Vector>();
+        auto vector = builtin->Parameters()[index]->Type()->Is<sem::Vector>();
         for (size_t i = 0; i < values.Elements().size(); i++) {
           auto value = values.Elements()[i].i32;
           if (value < min || value > max) {
@@ -1895,12 +1895,12 @@
     }
   }
 
-  auto check_intrinsic_calls = [&](const sem::Function* func,
-                                   const sem::Function* entry_point) {
+  auto check_builtin_calls = [&](const sem::Function* func,
+                                 const sem::Function* entry_point) {
     auto stage = entry_point->Declaration()->PipelineStage();
-    for (auto* intrinsic : func->DirectlyCalledIntrinsics()) {
-      if (!intrinsic->SupportedStages().Contains(stage)) {
-        auto* call = func->FindDirectCallTo(intrinsic);
+    for (auto* builtin : func->DirectlyCalledBuiltins()) {
+      if (!builtin->SupportedStages().Contains(stage)) {
+        auto* call = func->FindDirectCallTo(builtin);
         std::stringstream err;
         err << "built-in cannot be used by " << stage << " pipeline stage";
         AddError(err.str(), call ? call->Declaration()->source
@@ -1927,11 +1927,11 @@
   };
 
   for (auto* entry_point : entry_points_) {
-    if (!check_intrinsic_calls(entry_point, entry_point)) {
+    if (!check_builtin_calls(entry_point, entry_point)) {
       return false;
     }
     for (auto* func : entry_point->TransitivelyCalledFunctions()) {
-      if (!check_intrinsic_calls(func, entry_point)) {
+      if (!check_builtin_calls(func, entry_point)) {
         return false;
       }
     }
@@ -1974,7 +1974,7 @@
 
 bool Resolver::ValidateAlias(const ast::Alias* alias) {
   auto name = builder_->Symbols().NameFor(alias->name);
-  if (sem::ParseIntrinsicType(name) != sem::IntrinsicType::kNone) {
+  if (sem::ParseBuiltinType(name) != sem::BuiltinType::kNone) {
     AddError("'" + name + "' is a builtin and cannot be redeclared as an alias",
              alias->source);
     return false;
@@ -1985,7 +1985,7 @@
 
 bool Resolver::ValidateStructure(const sem::Struct* str) {
   auto name = builder_->Symbols().NameFor(str->Declaration()->name);
-  if (sem::ParseIntrinsicType(name) != sem::IntrinsicType::kNone) {
+  if (sem::ParseBuiltinType(name) != sem::BuiltinType::kNone) {
     AddError("'" + name + "' is a builtin and cannot be redeclared as a struct",
              str->Declaration()->source);
     return false;
diff --git a/src/resolver/validation_test.cc b/src/resolver/validation_test.cc
index 89a5151..65b9108 100644
--- a/src/resolver/validation_test.cc
+++ b/src/resolver/validation_test.cc
@@ -19,11 +19,11 @@
 #include "src/ast/assignment_statement.h"
 #include "src/ast/bitcast_expression.h"
 #include "src/ast/break_statement.h"
+#include "src/ast/builtin_texture_helper_test.h"
 #include "src/ast/call_statement.h"
 #include "src/ast/continue_statement.h"
 #include "src/ast/discard_statement.h"
 #include "src/ast/if_statement.h"
-#include "src/ast/intrinsic_texture_helper_test.h"
 #include "src/ast/loop_statement.h"
 #include "src/ast/return_statement.h"
 #include "src/ast/stage_attribute.h"
@@ -156,11 +156,11 @@
   EXPECT_EQ(r()->error(), "3:8 error: missing '(' for function call");
 }
 
-TEST_F(ResolverValidationTest, Expr_DontCall_Intrinsic) {
+TEST_F(ResolverValidationTest, Expr_DontCall_Builtin) {
   WrapInFunction(Expr(Source{{{3, 3}, {3, 8}}}, "round"));
 
   EXPECT_FALSE(r()->Resolve());
-  EXPECT_EQ(r()->error(), "3:8 error: missing '(' for intrinsic call");
+  EXPECT_EQ(r()->error(), "3:8 error: missing '(' for builtin call");
 }
 
 TEST_F(ResolverValidationTest, Expr_DontCall_Type) {
@@ -172,8 +172,7 @@
             "3:8 error: missing '(' for type constructor or cast");
 }
 
-TEST_F(ResolverValidationTest,
-       AssignmentStmt_InvalidLHS_IntrinsicFunctionName) {
+TEST_F(ResolverValidationTest, AssignmentStmt_InvalidLHS_BuiltinFunctionName) {
   // normalize = 2;
 
   auto* lhs = Expr(Source{{12, 34}}, "normalize");
@@ -182,7 +181,7 @@
   WrapInFunction(assign);
 
   EXPECT_FALSE(r()->Resolve());
-  EXPECT_EQ(r()->error(), "12:34 error: missing '(' for intrinsic call");
+  EXPECT_EQ(r()->error(), "12:34 error: missing '(' for builtin call");
 }
 
 TEST_F(ResolverValidationTest, UsingUndefinedVariable_Fail) {
diff --git a/src/sem/builtin.cc b/src/sem/builtin.cc
new file mode 100644
index 0000000..917fee9
--- /dev/null
+++ b/src/sem/builtin.cc
@@ -0,0 +1,166 @@
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Doxygen seems to trip over this file for some unknown reason. Disable.
+//! @cond Doxygen_Suppress
+
+#include "src/sem/builtin.h"
+
+#include <vector>
+
+#include "src/utils/to_const_ptr_vec.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::sem::Builtin);
+
+namespace tint {
+namespace sem {
+
+const char* Builtin::str() const {
+  return sem::str(type_);
+}
+
+bool IsCoarseDerivativeBuiltin(BuiltinType i) {
+  return i == BuiltinType::kDpdxCoarse || i == BuiltinType::kDpdyCoarse ||
+         i == BuiltinType::kFwidthCoarse;
+}
+
+bool IsFineDerivativeBuiltin(BuiltinType i) {
+  return i == BuiltinType::kDpdxFine || i == BuiltinType::kDpdyFine ||
+         i == BuiltinType::kFwidthFine;
+}
+
+bool IsDerivativeBuiltin(BuiltinType i) {
+  return i == BuiltinType::kDpdx || i == BuiltinType::kDpdy ||
+         i == BuiltinType::kFwidth || IsCoarseDerivativeBuiltin(i) ||
+         IsFineDerivativeBuiltin(i);
+}
+
+bool IsFloatClassificationBuiltin(BuiltinType i) {
+  return i == BuiltinType::kIsFinite || i == BuiltinType::kIsInf ||
+         i == BuiltinType::kIsNan || i == BuiltinType::kIsNormal;
+}
+
+bool IsTextureBuiltin(BuiltinType i) {
+  return IsImageQueryBuiltin(i) || i == BuiltinType::kTextureLoad ||
+         i == BuiltinType::kTextureGather ||
+         i == BuiltinType::kTextureGatherCompare ||
+         i == BuiltinType::kTextureSample ||
+         i == BuiltinType::kTextureSampleLevel ||
+         i == BuiltinType::kTextureSampleBias ||
+         i == BuiltinType::kTextureSampleCompare ||
+         i == BuiltinType::kTextureSampleCompareLevel ||
+         i == BuiltinType::kTextureSampleGrad ||
+         i == BuiltinType::kTextureStore;
+}
+
+bool IsImageQueryBuiltin(BuiltinType i) {
+  return i == BuiltinType::kTextureDimensions ||
+         i == BuiltinType::kTextureNumLayers ||
+         i == BuiltinType::kTextureNumLevels ||
+         i == BuiltinType::kTextureNumSamples;
+}
+
+bool IsDataPackingBuiltin(BuiltinType i) {
+  return i == BuiltinType::kPack4x8snorm || i == BuiltinType::kPack4x8unorm ||
+         i == BuiltinType::kPack2x16snorm || i == BuiltinType::kPack2x16unorm ||
+         i == BuiltinType::kPack2x16float;
+}
+
+bool IsDataUnpackingBuiltin(BuiltinType i) {
+  return i == BuiltinType::kUnpack4x8snorm ||
+         i == BuiltinType::kUnpack4x8unorm ||
+         i == BuiltinType::kUnpack2x16snorm ||
+         i == BuiltinType::kUnpack2x16unorm ||
+         i == BuiltinType::kUnpack2x16float;
+}
+
+bool IsBarrierBuiltin(BuiltinType i) {
+  return i == BuiltinType::kWorkgroupBarrier ||
+         i == BuiltinType::kStorageBarrier;
+}
+
+bool IsAtomicBuiltin(BuiltinType i) {
+  return i == sem::BuiltinType::kAtomicLoad ||
+         i == sem::BuiltinType::kAtomicStore ||
+         i == sem::BuiltinType::kAtomicAdd ||
+         i == sem::BuiltinType::kAtomicSub ||
+         i == sem::BuiltinType::kAtomicMax ||
+         i == sem::BuiltinType::kAtomicMin ||
+         i == sem::BuiltinType::kAtomicAnd ||
+         i == sem::BuiltinType::kAtomicOr ||
+         i == sem::BuiltinType::kAtomicXor ||
+         i == sem::BuiltinType::kAtomicExchange ||
+         i == sem::BuiltinType::kAtomicCompareExchangeWeak;
+}
+
+Builtin::Builtin(BuiltinType type,
+                 const sem::Type* return_type,
+                 std::vector<Parameter*> parameters,
+                 PipelineStageSet supported_stages,
+                 bool is_deprecated)
+    : Base(return_type, utils::ToConstPtrVec(parameters)),
+      type_(type),
+      supported_stages_(supported_stages),
+      is_deprecated_(is_deprecated) {
+  for (auto* parameter : parameters) {
+    parameter->SetOwner(this);
+  }
+}
+
+Builtin::~Builtin() = default;
+
+bool Builtin::IsCoarseDerivative() const {
+  return IsCoarseDerivativeBuiltin(type_);
+}
+
+bool Builtin::IsFineDerivative() const {
+  return IsFineDerivativeBuiltin(type_);
+}
+
+bool Builtin::IsDerivative() const {
+  return IsDerivativeBuiltin(type_);
+}
+
+bool Builtin::IsFloatClassification() const {
+  return IsFloatClassificationBuiltin(type_);
+}
+
+bool Builtin::IsTexture() const {
+  return IsTextureBuiltin(type_);
+}
+
+bool Builtin::IsImageQuery() const {
+  return IsImageQueryBuiltin(type_);
+}
+
+bool Builtin::IsDataPacking() const {
+  return IsDataPackingBuiltin(type_);
+}
+
+bool Builtin::IsDataUnpacking() const {
+  return IsDataUnpackingBuiltin(type_);
+}
+
+bool Builtin::IsBarrier() const {
+  return IsBarrierBuiltin(type_);
+}
+
+bool Builtin::IsAtomic() const {
+  return IsAtomicBuiltin(type_);
+}
+
+}  // namespace sem
+}  // namespace tint
+
+//! @endcond
diff --git a/src/sem/builtin.h b/src/sem/builtin.h
new file mode 100644
index 0000000..cb5dc30
--- /dev/null
+++ b/src/sem/builtin.h
@@ -0,0 +1,173 @@
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_SEM_BUILTIN_H_
+#define SRC_SEM_BUILTIN_H_
+
+#include <string>
+#include <vector>
+
+#include "src/sem/builtin_type.h"
+#include "src/sem/call_target.h"
+#include "src/sem/pipeline_stage_set.h"
+#include "src/utils/hash.h"
+
+namespace tint {
+namespace sem {
+
+/// Determines if the given `i` is a coarse derivative
+/// @param i the builtin type
+/// @returns true if the given derivative is coarse.
+bool IsCoarseDerivativeBuiltin(BuiltinType i);
+
+/// Determines if the given `i` is a fine derivative
+/// @param i the builtin type
+/// @returns true if the given derivative is fine.
+bool IsFineDerivativeBuiltin(BuiltinType i);
+
+/// Determine if the given `i` is a derivative builtin
+/// @param i the builtin type
+/// @returns true if the given `i` is a derivative builtin
+bool IsDerivativeBuiltin(BuiltinType i);
+
+/// Determines if the given `i` is a float classification builtin
+/// @param i the builtin type
+/// @returns true if the given `i` is a float builtin
+bool IsFloatClassificationBuiltin(BuiltinType i);
+
+/// Determines if the given `i` is a texture operation builtin
+/// @param i the builtin type
+/// @returns true if the given `i` is a texture operation builtin
+bool IsTextureBuiltin(BuiltinType i);
+
+/// Determines if the given `i` is a image query builtin
+/// @param i the builtin type
+/// @returns true if the given `i` is a image query builtin
+bool IsImageQueryBuiltin(BuiltinType i);
+
+/// Determines if the given `i` is a data packing builtin
+/// @param i the builtin
+/// @returns true if the given `i` is a data packing builtin
+bool IsDataPackingBuiltin(BuiltinType i);
+
+/// Determines if the given `i` is a data unpacking builtin
+/// @param i the builtin
+/// @returns true if the given `i` is a data unpacking builtin
+bool IsDataUnpackingBuiltin(BuiltinType i);
+
+/// Determines if the given `i` is a barrier builtin
+/// @param i the builtin
+/// @returns true if the given `i` is a barrier builtin
+bool IsBarrierBuiltin(BuiltinType i);
+
+/// Determines if the given `i` is a atomic builtin
+/// @param i the builtin
+/// @returns true if the given `i` is a atomic builtin
+bool IsAtomicBuiltin(BuiltinType i);
+
+/// Builtin holds the semantic information for a builtin function.
+class Builtin : public Castable<Builtin, CallTarget> {
+ public:
+  /// Constructor
+  /// @param type the builtin type
+  /// @param return_type the return type for the builtin call
+  /// @param parameters the parameters for the builtin overload
+  /// @param supported_stages the pipeline stages that this builtin can be
+  /// used in
+  /// @param is_deprecated true if the particular overload is considered
+  /// deprecated
+  Builtin(BuiltinType type,
+          const sem::Type* return_type,
+          std::vector<Parameter*> parameters,
+          PipelineStageSet supported_stages,
+          bool is_deprecated);
+
+  /// Destructor
+  ~Builtin() override;
+
+  /// @return the type of the builtin
+  BuiltinType Type() const { return type_; }
+
+  /// @return the pipeline stages that this builtin can be used in
+  PipelineStageSet SupportedStages() const { return supported_stages_; }
+
+  /// @return true if the builtin overload is considered deprecated
+  bool IsDeprecated() const { return is_deprecated_; }
+
+  /// @returns the name of the builtin function type. The spelling, including
+  /// case, matches the name in the WGSL spec.
+  const char* str() const;
+
+  /// @returns true if builtin is a coarse derivative builtin
+  bool IsCoarseDerivative() const;
+
+  /// @returns true if builtin is a fine a derivative builtin
+  bool IsFineDerivative() const;
+
+  /// @returns true if builtin is a derivative builtin
+  bool IsDerivative() const;
+
+  /// @returns true if builtin is a float builtin
+  bool IsFloatClassification() const;
+
+  /// @returns true if builtin is a texture operation builtin
+  bool IsTexture() const;
+
+  /// @returns true if builtin is a image query builtin
+  bool IsImageQuery() const;
+
+  /// @returns true if builtin is a data packing builtin
+  bool IsDataPacking() const;
+
+  /// @returns true if builtin is a data unpacking builtin
+  bool IsDataUnpacking() const;
+
+  /// @returns true if builtin is a barrier builtin
+  bool IsBarrier() const;
+
+  /// @returns true if builtin is a atomic builtin
+  bool IsAtomic() const;
+
+ private:
+  const BuiltinType type_;
+  const PipelineStageSet supported_stages_;
+  const bool is_deprecated_;
+};
+
+/// Constant value used by the degrees() builtin
+static constexpr double kRadToDeg = 57.295779513082322865;
+
+/// Constant value used by the radians() builtin
+static constexpr double kDegToRad = 0.017453292519943295474;
+
+}  // namespace sem
+}  // namespace tint
+
+namespace std {
+
+/// Custom std::hash specialization for tint::sem::Builtin
+template <>
+class hash<tint::sem::Builtin> {
+ public:
+  /// @param i the Builtin to create a hash for
+  /// @return the hash value
+  inline std::size_t operator()(const tint::sem::Builtin& i) const {
+    return tint::utils::Hash(i.Type(), i.SupportedStages(), i.ReturnType(),
+                             i.Parameters(), i.IsDeprecated());
+  }
+};
+
+}  // namespace std
+
+#endif  // SRC_SEM_BUILTIN_H_
diff --git a/src/sem/builtin_test.cc b/src/sem/builtin_test.cc
new file mode 100644
index 0000000..e646404
--- /dev/null
+++ b/src/sem/builtin_test.cc
@@ -0,0 +1,131 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/sem/builtin.h"
+
+#include "gtest/gtest.h"
+
+namespace tint {
+namespace sem {
+namespace {
+
+struct BuiltinData {
+  const char* name;
+  BuiltinType builtin;
+};
+
+inline std::ostream& operator<<(std::ostream& out, BuiltinData data) {
+  out << data.name;
+  return out;
+}
+
+using BuiltinTypeTest = testing::TestWithParam<BuiltinData>;
+
+TEST_P(BuiltinTypeTest, Parse) {
+  auto param = GetParam();
+  EXPECT_EQ(ParseBuiltinType(param.name), param.builtin);
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    BuiltinTypeTest,
+    BuiltinTypeTest,
+    testing::Values(
+        BuiltinData{"abs", BuiltinType::kAbs},
+        BuiltinData{"acos", BuiltinType::kAcos},
+        BuiltinData{"all", BuiltinType::kAll},
+        BuiltinData{"any", BuiltinType::kAny},
+        BuiltinData{"arrayLength", BuiltinType::kArrayLength},
+        BuiltinData{"asin", BuiltinType::kAsin},
+        BuiltinData{"atan", BuiltinType::kAtan},
+        BuiltinData{"atan2", BuiltinType::kAtan2},
+        BuiltinData{"ceil", BuiltinType::kCeil},
+        BuiltinData{"clamp", BuiltinType::kClamp},
+        BuiltinData{"cos", BuiltinType::kCos},
+        BuiltinData{"cosh", BuiltinType::kCosh},
+        BuiltinData{"countOneBits", BuiltinType::kCountOneBits},
+        BuiltinData{"cross", BuiltinType::kCross},
+        BuiltinData{"determinant", BuiltinType::kDeterminant},
+        BuiltinData{"distance", BuiltinType::kDistance},
+        BuiltinData{"dot", BuiltinType::kDot},
+        BuiltinData{"dpdx", BuiltinType::kDpdx},
+        BuiltinData{"dpdxCoarse", BuiltinType::kDpdxCoarse},
+        BuiltinData{"dpdxFine", BuiltinType::kDpdxFine},
+        BuiltinData{"dpdy", BuiltinType::kDpdy},
+        BuiltinData{"dpdyCoarse", BuiltinType::kDpdyCoarse},
+        BuiltinData{"dpdyFine", BuiltinType::kDpdyFine},
+        BuiltinData{"exp", BuiltinType::kExp},
+        BuiltinData{"exp2", BuiltinType::kExp2},
+        BuiltinData{"faceForward", BuiltinType::kFaceForward},
+        BuiltinData{"floor", BuiltinType::kFloor},
+        BuiltinData{"fma", BuiltinType::kFma},
+        BuiltinData{"fract", BuiltinType::kFract},
+        BuiltinData{"frexp", BuiltinType::kFrexp},
+        BuiltinData{"fwidth", BuiltinType::kFwidth},
+        BuiltinData{"fwidthCoarse", BuiltinType::kFwidthCoarse},
+        BuiltinData{"fwidthFine", BuiltinType::kFwidthFine},
+        BuiltinData{"inverseSqrt", BuiltinType::kInverseSqrt},
+        BuiltinData{"isFinite", BuiltinType::kIsFinite},
+        BuiltinData{"isInf", BuiltinType::kIsInf},
+        BuiltinData{"isNan", BuiltinType::kIsNan},
+        BuiltinData{"isNormal", BuiltinType::kIsNormal},
+        BuiltinData{"ldexp", BuiltinType::kLdexp},
+        BuiltinData{"length", BuiltinType::kLength},
+        BuiltinData{"log", BuiltinType::kLog},
+        BuiltinData{"log2", BuiltinType::kLog2},
+        BuiltinData{"max", BuiltinType::kMax},
+        BuiltinData{"min", BuiltinType::kMin},
+        BuiltinData{"mix", BuiltinType::kMix},
+        BuiltinData{"modf", BuiltinType::kModf},
+        BuiltinData{"normalize", BuiltinType::kNormalize},
+        BuiltinData{"pow", BuiltinType::kPow},
+        BuiltinData{"reflect", BuiltinType::kReflect},
+        BuiltinData{"reverseBits", BuiltinType::kReverseBits},
+        BuiltinData{"round", BuiltinType::kRound},
+        BuiltinData{"select", BuiltinType::kSelect},
+        BuiltinData{"sign", BuiltinType::kSign},
+        BuiltinData{"sin", BuiltinType::kSin},
+        BuiltinData{"sinh", BuiltinType::kSinh},
+        BuiltinData{"smoothStep", BuiltinType::kSmoothStep},
+        BuiltinData{"sqrt", BuiltinType::kSqrt},
+        BuiltinData{"step", BuiltinType::kStep},
+        BuiltinData{"storageBarrier", BuiltinType::kStorageBarrier},
+        BuiltinData{"tan", BuiltinType::kTan},
+        BuiltinData{"tanh", BuiltinType::kTanh},
+        BuiltinData{"textureDimensions", BuiltinType::kTextureDimensions},
+        BuiltinData{"textureLoad", BuiltinType::kTextureLoad},
+        BuiltinData{"textureNumLayers", BuiltinType::kTextureNumLayers},
+        BuiltinData{"textureNumLevels", BuiltinType::kTextureNumLevels},
+        BuiltinData{"textureNumSamples", BuiltinType::kTextureNumSamples},
+        BuiltinData{"textureSample", BuiltinType::kTextureSample},
+        BuiltinData{"textureSampleBias", BuiltinType::kTextureSampleBias},
+        BuiltinData{"textureSampleCompare", BuiltinType::kTextureSampleCompare},
+        BuiltinData{"textureSampleCompareLevel",
+                    BuiltinType::kTextureSampleCompareLevel},
+        BuiltinData{"textureSampleGrad", BuiltinType::kTextureSampleGrad},
+        BuiltinData{"textureSampleLevel", BuiltinType::kTextureSampleLevel},
+        BuiltinData{"trunc", BuiltinType::kTrunc},
+        BuiltinData{"unpack2x16float", BuiltinType::kUnpack2x16float},
+        BuiltinData{"unpack2x16snorm", BuiltinType::kUnpack2x16snorm},
+        BuiltinData{"unpack2x16unorm", BuiltinType::kUnpack2x16unorm},
+        BuiltinData{"unpack4x8snorm", BuiltinType::kUnpack4x8snorm},
+        BuiltinData{"unpack4x8unorm", BuiltinType::kUnpack4x8unorm},
+        BuiltinData{"workgroupBarrier", BuiltinType::kWorkgroupBarrier}));
+
+TEST_F(BuiltinTypeTest, ParseNoMatch) {
+  EXPECT_EQ(ParseBuiltinType("not_builtin"), BuiltinType::kNone);
+}
+
+}  // namespace
+}  // namespace sem
+}  // namespace tint
diff --git a/src/sem/builtin_type.cc b/src/sem/builtin_type.cc
new file mode 100644
index 0000000..3145f0a
--- /dev/null
+++ b/src/sem/builtin_type.cc
@@ -0,0 +1,560 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   src/sem/builtin_type.cc.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+#include "src/sem/builtin_type.h"
+
+#include <sstream>
+
+namespace tint {
+namespace sem {
+
+BuiltinType ParseBuiltinType(const std::string& name) {
+  if (name == "abs") {
+    return BuiltinType::kAbs;
+  }
+  if (name == "acos") {
+    return BuiltinType::kAcos;
+  }
+  if (name == "all") {
+    return BuiltinType::kAll;
+  }
+  if (name == "any") {
+    return BuiltinType::kAny;
+  }
+  if (name == "arrayLength") {
+    return BuiltinType::kArrayLength;
+  }
+  if (name == "asin") {
+    return BuiltinType::kAsin;
+  }
+  if (name == "atan") {
+    return BuiltinType::kAtan;
+  }
+  if (name == "atan2") {
+    return BuiltinType::kAtan2;
+  }
+  if (name == "ceil") {
+    return BuiltinType::kCeil;
+  }
+  if (name == "clamp") {
+    return BuiltinType::kClamp;
+  }
+  if (name == "cos") {
+    return BuiltinType::kCos;
+  }
+  if (name == "cosh") {
+    return BuiltinType::kCosh;
+  }
+  if (name == "countOneBits") {
+    return BuiltinType::kCountOneBits;
+  }
+  if (name == "cross") {
+    return BuiltinType::kCross;
+  }
+  if (name == "degrees") {
+    return BuiltinType::kDegrees;
+  }
+  if (name == "determinant") {
+    return BuiltinType::kDeterminant;
+  }
+  if (name == "distance") {
+    return BuiltinType::kDistance;
+  }
+  if (name == "dot") {
+    return BuiltinType::kDot;
+  }
+  if (name == "dpdx") {
+    return BuiltinType::kDpdx;
+  }
+  if (name == "dpdxCoarse") {
+    return BuiltinType::kDpdxCoarse;
+  }
+  if (name == "dpdxFine") {
+    return BuiltinType::kDpdxFine;
+  }
+  if (name == "dpdy") {
+    return BuiltinType::kDpdy;
+  }
+  if (name == "dpdyCoarse") {
+    return BuiltinType::kDpdyCoarse;
+  }
+  if (name == "dpdyFine") {
+    return BuiltinType::kDpdyFine;
+  }
+  if (name == "exp") {
+    return BuiltinType::kExp;
+  }
+  if (name == "exp2") {
+    return BuiltinType::kExp2;
+  }
+  if (name == "faceForward") {
+    return BuiltinType::kFaceForward;
+  }
+  if (name == "floor") {
+    return BuiltinType::kFloor;
+  }
+  if (name == "fma") {
+    return BuiltinType::kFma;
+  }
+  if (name == "fract") {
+    return BuiltinType::kFract;
+  }
+  if (name == "frexp") {
+    return BuiltinType::kFrexp;
+  }
+  if (name == "fwidth") {
+    return BuiltinType::kFwidth;
+  }
+  if (name == "fwidthCoarse") {
+    return BuiltinType::kFwidthCoarse;
+  }
+  if (name == "fwidthFine") {
+    return BuiltinType::kFwidthFine;
+  }
+  if (name == "inverseSqrt") {
+    return BuiltinType::kInverseSqrt;
+  }
+  if (name == "isFinite") {
+    return BuiltinType::kIsFinite;
+  }
+  if (name == "isInf") {
+    return BuiltinType::kIsInf;
+  }
+  if (name == "isNan") {
+    return BuiltinType::kIsNan;
+  }
+  if (name == "isNormal") {
+    return BuiltinType::kIsNormal;
+  }
+  if (name == "ldexp") {
+    return BuiltinType::kLdexp;
+  }
+  if (name == "length") {
+    return BuiltinType::kLength;
+  }
+  if (name == "log") {
+    return BuiltinType::kLog;
+  }
+  if (name == "log2") {
+    return BuiltinType::kLog2;
+  }
+  if (name == "max") {
+    return BuiltinType::kMax;
+  }
+  if (name == "min") {
+    return BuiltinType::kMin;
+  }
+  if (name == "mix") {
+    return BuiltinType::kMix;
+  }
+  if (name == "modf") {
+    return BuiltinType::kModf;
+  }
+  if (name == "normalize") {
+    return BuiltinType::kNormalize;
+  }
+  if (name == "pack2x16float") {
+    return BuiltinType::kPack2x16float;
+  }
+  if (name == "pack2x16snorm") {
+    return BuiltinType::kPack2x16snorm;
+  }
+  if (name == "pack2x16unorm") {
+    return BuiltinType::kPack2x16unorm;
+  }
+  if (name == "pack4x8snorm") {
+    return BuiltinType::kPack4x8snorm;
+  }
+  if (name == "pack4x8unorm") {
+    return BuiltinType::kPack4x8unorm;
+  }
+  if (name == "pow") {
+    return BuiltinType::kPow;
+  }
+  if (name == "radians") {
+    return BuiltinType::kRadians;
+  }
+  if (name == "reflect") {
+    return BuiltinType::kReflect;
+  }
+  if (name == "refract") {
+    return BuiltinType::kRefract;
+  }
+  if (name == "reverseBits") {
+    return BuiltinType::kReverseBits;
+  }
+  if (name == "round") {
+    return BuiltinType::kRound;
+  }
+  if (name == "select") {
+    return BuiltinType::kSelect;
+  }
+  if (name == "sign") {
+    return BuiltinType::kSign;
+  }
+  if (name == "sin") {
+    return BuiltinType::kSin;
+  }
+  if (name == "sinh") {
+    return BuiltinType::kSinh;
+  }
+  if (name == "smoothStep") {
+    return BuiltinType::kSmoothStep;
+  }
+  if (name == "sqrt") {
+    return BuiltinType::kSqrt;
+  }
+  if (name == "step") {
+    return BuiltinType::kStep;
+  }
+  if (name == "storageBarrier") {
+    return BuiltinType::kStorageBarrier;
+  }
+  if (name == "tan") {
+    return BuiltinType::kTan;
+  }
+  if (name == "tanh") {
+    return BuiltinType::kTanh;
+  }
+  if (name == "transpose") {
+    return BuiltinType::kTranspose;
+  }
+  if (name == "trunc") {
+    return BuiltinType::kTrunc;
+  }
+  if (name == "unpack2x16float") {
+    return BuiltinType::kUnpack2x16float;
+  }
+  if (name == "unpack2x16snorm") {
+    return BuiltinType::kUnpack2x16snorm;
+  }
+  if (name == "unpack2x16unorm") {
+    return BuiltinType::kUnpack2x16unorm;
+  }
+  if (name == "unpack4x8snorm") {
+    return BuiltinType::kUnpack4x8snorm;
+  }
+  if (name == "unpack4x8unorm") {
+    return BuiltinType::kUnpack4x8unorm;
+  }
+  if (name == "workgroupBarrier") {
+    return BuiltinType::kWorkgroupBarrier;
+  }
+  if (name == "textureDimensions") {
+    return BuiltinType::kTextureDimensions;
+  }
+  if (name == "textureGather") {
+    return BuiltinType::kTextureGather;
+  }
+  if (name == "textureGatherCompare") {
+    return BuiltinType::kTextureGatherCompare;
+  }
+  if (name == "textureNumLayers") {
+    return BuiltinType::kTextureNumLayers;
+  }
+  if (name == "textureNumLevels") {
+    return BuiltinType::kTextureNumLevels;
+  }
+  if (name == "textureNumSamples") {
+    return BuiltinType::kTextureNumSamples;
+  }
+  if (name == "textureSample") {
+    return BuiltinType::kTextureSample;
+  }
+  if (name == "textureSampleBias") {
+    return BuiltinType::kTextureSampleBias;
+  }
+  if (name == "textureSampleCompare") {
+    return BuiltinType::kTextureSampleCompare;
+  }
+  if (name == "textureSampleCompareLevel") {
+    return BuiltinType::kTextureSampleCompareLevel;
+  }
+  if (name == "textureSampleGrad") {
+    return BuiltinType::kTextureSampleGrad;
+  }
+  if (name == "textureSampleLevel") {
+    return BuiltinType::kTextureSampleLevel;
+  }
+  if (name == "textureStore") {
+    return BuiltinType::kTextureStore;
+  }
+  if (name == "textureLoad") {
+    return BuiltinType::kTextureLoad;
+  }
+  if (name == "atomicLoad") {
+    return BuiltinType::kAtomicLoad;
+  }
+  if (name == "atomicStore") {
+    return BuiltinType::kAtomicStore;
+  }
+  if (name == "atomicAdd") {
+    return BuiltinType::kAtomicAdd;
+  }
+  if (name == "atomicSub") {
+    return BuiltinType::kAtomicSub;
+  }
+  if (name == "atomicMax") {
+    return BuiltinType::kAtomicMax;
+  }
+  if (name == "atomicMin") {
+    return BuiltinType::kAtomicMin;
+  }
+  if (name == "atomicAnd") {
+    return BuiltinType::kAtomicAnd;
+  }
+  if (name == "atomicOr") {
+    return BuiltinType::kAtomicOr;
+  }
+  if (name == "atomicXor") {
+    return BuiltinType::kAtomicXor;
+  }
+  if (name == "atomicExchange") {
+    return BuiltinType::kAtomicExchange;
+  }
+  if (name == "atomicCompareExchangeWeak") {
+    return BuiltinType::kAtomicCompareExchangeWeak;
+  }
+  return BuiltinType::kNone;
+}
+
+const char* str(BuiltinType i) {
+  switch (i) {
+    case BuiltinType::kNone:
+      return "<none>";
+    case BuiltinType::kAbs:
+      return "abs";
+    case BuiltinType::kAcos:
+      return "acos";
+    case BuiltinType::kAll:
+      return "all";
+    case BuiltinType::kAny:
+      return "any";
+    case BuiltinType::kArrayLength:
+      return "arrayLength";
+    case BuiltinType::kAsin:
+      return "asin";
+    case BuiltinType::kAtan:
+      return "atan";
+    case BuiltinType::kAtan2:
+      return "atan2";
+    case BuiltinType::kCeil:
+      return "ceil";
+    case BuiltinType::kClamp:
+      return "clamp";
+    case BuiltinType::kCos:
+      return "cos";
+    case BuiltinType::kCosh:
+      return "cosh";
+    case BuiltinType::kCountOneBits:
+      return "countOneBits";
+    case BuiltinType::kCross:
+      return "cross";
+    case BuiltinType::kDegrees:
+      return "degrees";
+    case BuiltinType::kDeterminant:
+      return "determinant";
+    case BuiltinType::kDistance:
+      return "distance";
+    case BuiltinType::kDot:
+      return "dot";
+    case BuiltinType::kDpdx:
+      return "dpdx";
+    case BuiltinType::kDpdxCoarse:
+      return "dpdxCoarse";
+    case BuiltinType::kDpdxFine:
+      return "dpdxFine";
+    case BuiltinType::kDpdy:
+      return "dpdy";
+    case BuiltinType::kDpdyCoarse:
+      return "dpdyCoarse";
+    case BuiltinType::kDpdyFine:
+      return "dpdyFine";
+    case BuiltinType::kExp:
+      return "exp";
+    case BuiltinType::kExp2:
+      return "exp2";
+    case BuiltinType::kFaceForward:
+      return "faceForward";
+    case BuiltinType::kFloor:
+      return "floor";
+    case BuiltinType::kFma:
+      return "fma";
+    case BuiltinType::kFract:
+      return "fract";
+    case BuiltinType::kFrexp:
+      return "frexp";
+    case BuiltinType::kFwidth:
+      return "fwidth";
+    case BuiltinType::kFwidthCoarse:
+      return "fwidthCoarse";
+    case BuiltinType::kFwidthFine:
+      return "fwidthFine";
+    case BuiltinType::kInverseSqrt:
+      return "inverseSqrt";
+    case BuiltinType::kIsFinite:
+      return "isFinite";
+    case BuiltinType::kIsInf:
+      return "isInf";
+    case BuiltinType::kIsNan:
+      return "isNan";
+    case BuiltinType::kIsNormal:
+      return "isNormal";
+    case BuiltinType::kLdexp:
+      return "ldexp";
+    case BuiltinType::kLength:
+      return "length";
+    case BuiltinType::kLog:
+      return "log";
+    case BuiltinType::kLog2:
+      return "log2";
+    case BuiltinType::kMax:
+      return "max";
+    case BuiltinType::kMin:
+      return "min";
+    case BuiltinType::kMix:
+      return "mix";
+    case BuiltinType::kModf:
+      return "modf";
+    case BuiltinType::kNormalize:
+      return "normalize";
+    case BuiltinType::kPack2x16float:
+      return "pack2x16float";
+    case BuiltinType::kPack2x16snorm:
+      return "pack2x16snorm";
+    case BuiltinType::kPack2x16unorm:
+      return "pack2x16unorm";
+    case BuiltinType::kPack4x8snorm:
+      return "pack4x8snorm";
+    case BuiltinType::kPack4x8unorm:
+      return "pack4x8unorm";
+    case BuiltinType::kPow:
+      return "pow";
+    case BuiltinType::kRadians:
+      return "radians";
+    case BuiltinType::kReflect:
+      return "reflect";
+    case BuiltinType::kRefract:
+      return "refract";
+    case BuiltinType::kReverseBits:
+      return "reverseBits";
+    case BuiltinType::kRound:
+      return "round";
+    case BuiltinType::kSelect:
+      return "select";
+    case BuiltinType::kSign:
+      return "sign";
+    case BuiltinType::kSin:
+      return "sin";
+    case BuiltinType::kSinh:
+      return "sinh";
+    case BuiltinType::kSmoothStep:
+      return "smoothStep";
+    case BuiltinType::kSqrt:
+      return "sqrt";
+    case BuiltinType::kStep:
+      return "step";
+    case BuiltinType::kStorageBarrier:
+      return "storageBarrier";
+    case BuiltinType::kTan:
+      return "tan";
+    case BuiltinType::kTanh:
+      return "tanh";
+    case BuiltinType::kTranspose:
+      return "transpose";
+    case BuiltinType::kTrunc:
+      return "trunc";
+    case BuiltinType::kUnpack2x16float:
+      return "unpack2x16float";
+    case BuiltinType::kUnpack2x16snorm:
+      return "unpack2x16snorm";
+    case BuiltinType::kUnpack2x16unorm:
+      return "unpack2x16unorm";
+    case BuiltinType::kUnpack4x8snorm:
+      return "unpack4x8snorm";
+    case BuiltinType::kUnpack4x8unorm:
+      return "unpack4x8unorm";
+    case BuiltinType::kWorkgroupBarrier:
+      return "workgroupBarrier";
+    case BuiltinType::kTextureDimensions:
+      return "textureDimensions";
+    case BuiltinType::kTextureGather:
+      return "textureGather";
+    case BuiltinType::kTextureGatherCompare:
+      return "textureGatherCompare";
+    case BuiltinType::kTextureNumLayers:
+      return "textureNumLayers";
+    case BuiltinType::kTextureNumLevels:
+      return "textureNumLevels";
+    case BuiltinType::kTextureNumSamples:
+      return "textureNumSamples";
+    case BuiltinType::kTextureSample:
+      return "textureSample";
+    case BuiltinType::kTextureSampleBias:
+      return "textureSampleBias";
+    case BuiltinType::kTextureSampleCompare:
+      return "textureSampleCompare";
+    case BuiltinType::kTextureSampleCompareLevel:
+      return "textureSampleCompareLevel";
+    case BuiltinType::kTextureSampleGrad:
+      return "textureSampleGrad";
+    case BuiltinType::kTextureSampleLevel:
+      return "textureSampleLevel";
+    case BuiltinType::kTextureStore:
+      return "textureStore";
+    case BuiltinType::kTextureLoad:
+      return "textureLoad";
+    case BuiltinType::kAtomicLoad:
+      return "atomicLoad";
+    case BuiltinType::kAtomicStore:
+      return "atomicStore";
+    case BuiltinType::kAtomicAdd:
+      return "atomicAdd";
+    case BuiltinType::kAtomicSub:
+      return "atomicSub";
+    case BuiltinType::kAtomicMax:
+      return "atomicMax";
+    case BuiltinType::kAtomicMin:
+      return "atomicMin";
+    case BuiltinType::kAtomicAnd:
+      return "atomicAnd";
+    case BuiltinType::kAtomicOr:
+      return "atomicOr";
+    case BuiltinType::kAtomicXor:
+      return "atomicXor";
+    case BuiltinType::kAtomicExchange:
+      return "atomicExchange";
+    case BuiltinType::kAtomicCompareExchangeWeak:
+      return "atomicCompareExchangeWeak";
+  }
+  return "<unknown>";
+}
+
+std::ostream& operator<<(std::ostream& out, BuiltinType i) {
+  out << str(i);
+  return out;
+}
+
+}  // namespace sem
+}  // namespace tint
diff --git a/src/sem/builtin_type.cc.tmpl b/src/sem/builtin_type.cc.tmpl
new file mode 100644
index 0000000..aca86fa
--- /dev/null
+++ b/src/sem/builtin_type.cc.tmpl
@@ -0,0 +1,45 @@
+{{- /*
+--------------------------------------------------------------------------------
+Template file for use with tools/builtin-gen to generate builtin_type.cc
+
+See:
+* tools/cmd/builtin-gen/gen for structures used by this template
+* https://golang.org/pkg/text/template/ for documentation on the template syntax
+--------------------------------------------------------------------------------
+*/ -}}
+
+#include "src/sem/builtin_type.h"
+
+#include <sstream>
+
+namespace tint {
+namespace sem {
+
+BuiltinType ParseBuiltinType(const std::string& name) {
+{{- range .Sem.Functions  }}
+  if (name == "{{.Name}}") {
+    return BuiltinType::k{{Title .Name}};
+  }
+{{- end  }}
+  return BuiltinType::kNone;
+}
+
+const char* str(BuiltinType i) {
+  switch (i) {
+    case BuiltinType::kNone:
+      return "<none>";
+{{- range .Sem.Functions  }}
+    case BuiltinType::k{{Title .Name}}:
+      return "{{.Name}}";
+{{- end  }}
+  }
+  return "<unknown>";
+}
+
+std::ostream& operator<<(std::ostream& out, BuiltinType i) {
+  out << str(i);
+  return out;
+}
+
+}  // namespace sem
+}  // namespace tint
diff --git a/src/sem/builtin_type.h b/src/sem/builtin_type.h
new file mode 100644
index 0000000..3055fb7
--- /dev/null
+++ b/src/sem/builtin_type.h
@@ -0,0 +1,158 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   src/sem/builtin_type.h.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef SRC_SEM_BUILTIN_TYPE_H_
+#define SRC_SEM_BUILTIN_TYPE_H_
+
+#include <sstream>
+#include <string>
+
+namespace tint {
+namespace sem {
+
+/// Enumerator of all builtin functions
+enum class BuiltinType {
+  kNone = -1,
+  kAbs,
+  kAcos,
+  kAll,
+  kAny,
+  kArrayLength,
+  kAsin,
+  kAtan,
+  kAtan2,
+  kCeil,
+  kClamp,
+  kCos,
+  kCosh,
+  kCountOneBits,
+  kCross,
+  kDegrees,
+  kDeterminant,
+  kDistance,
+  kDot,
+  kDpdx,
+  kDpdxCoarse,
+  kDpdxFine,
+  kDpdy,
+  kDpdyCoarse,
+  kDpdyFine,
+  kExp,
+  kExp2,
+  kFaceForward,
+  kFloor,
+  kFma,
+  kFract,
+  kFrexp,
+  kFwidth,
+  kFwidthCoarse,
+  kFwidthFine,
+  kInverseSqrt,
+  kIsFinite,
+  kIsInf,
+  kIsNan,
+  kIsNormal,
+  kLdexp,
+  kLength,
+  kLog,
+  kLog2,
+  kMax,
+  kMin,
+  kMix,
+  kModf,
+  kNormalize,
+  kPack2x16float,
+  kPack2x16snorm,
+  kPack2x16unorm,
+  kPack4x8snorm,
+  kPack4x8unorm,
+  kPow,
+  kRadians,
+  kReflect,
+  kRefract,
+  kReverseBits,
+  kRound,
+  kSelect,
+  kSign,
+  kSin,
+  kSinh,
+  kSmoothStep,
+  kSqrt,
+  kStep,
+  kStorageBarrier,
+  kTan,
+  kTanh,
+  kTranspose,
+  kTrunc,
+  kUnpack2x16float,
+  kUnpack2x16snorm,
+  kUnpack2x16unorm,
+  kUnpack4x8snorm,
+  kUnpack4x8unorm,
+  kWorkgroupBarrier,
+  kTextureDimensions,
+  kTextureGather,
+  kTextureGatherCompare,
+  kTextureNumLayers,
+  kTextureNumLevels,
+  kTextureNumSamples,
+  kTextureSample,
+  kTextureSampleBias,
+  kTextureSampleCompare,
+  kTextureSampleCompareLevel,
+  kTextureSampleGrad,
+  kTextureSampleLevel,
+  kTextureStore,
+  kTextureLoad,
+  kAtomicLoad,
+  kAtomicStore,
+  kAtomicAdd,
+  kAtomicSub,
+  kAtomicMax,
+  kAtomicMin,
+  kAtomicAnd,
+  kAtomicOr,
+  kAtomicXor,
+  kAtomicExchange,
+  kAtomicCompareExchangeWeak,
+};
+
+/// Matches the BuiltinType by name
+/// @param name the builtin name to parse
+/// @returns the parsed BuiltinType, or BuiltinType::kNone if `name` did not
+/// match any builtin.
+BuiltinType ParseBuiltinType(const std::string& name);
+
+/// @returns the name of the builtin function type. The spelling, including
+/// case, matches the name in the WGSL spec.
+const char* str(BuiltinType i);
+
+/// Emits the name of the builtin function type. The spelling, including case,
+/// matches the name in the WGSL spec.
+std::ostream& operator<<(std::ostream& out, BuiltinType i);
+
+}  // namespace sem
+}  // namespace tint
+
+#endif  // SRC_SEM_BUILTIN_TYPE_H_
diff --git a/src/sem/builtin_type.h.tmpl b/src/sem/builtin_type.h.tmpl
new file mode 100644
index 0000000..5610be3
--- /dev/null
+++ b/src/sem/builtin_type.h.tmpl
@@ -0,0 +1,45 @@
+{{- /*
+--------------------------------------------------------------------------------
+Template file for use with tools/builtin-gen to generate builtin_type.h
+
+See:
+* tools/cmd/builtin-gen/gen for structures used by this template
+* https://golang.org/pkg/text/template/ for documentation on the template syntax
+--------------------------------------------------------------------------------
+*/ -}}
+
+#ifndef SRC_SEM_BUILTIN_TYPE_H_
+#define SRC_SEM_BUILTIN_TYPE_H_
+
+#include <sstream>
+#include <string>
+
+namespace tint {
+namespace sem {
+
+/// Enumerator of all builtin functions
+enum class BuiltinType {
+  kNone = -1,
+{{- range .Sem.Functions }}
+  k{{Title .Name}},
+{{- end }}
+};
+
+/// Matches the BuiltinType by name
+/// @param name the builtin name to parse
+/// @returns the parsed BuiltinType, or BuiltinType::kNone if `name` did not
+/// match any builtin.
+BuiltinType ParseBuiltinType(const std::string& name);
+
+/// @returns the name of the builtin function type. The spelling, including
+/// case, matches the name in the WGSL spec.
+const char* str(BuiltinType i);
+
+/// Emits the name of the builtin function type. The spelling, including case,
+/// matches the name in the WGSL spec.
+std::ostream& operator<<(std::ostream& out, BuiltinType i);
+
+}  // namespace sem
+}  // namespace tint
+
+#endif  // SRC_SEM_BUILTIN_TYPE_H_
diff --git a/src/sem/call.h b/src/sem/call.h
index adae212..bcf8689 100644
--- a/src/sem/call.h
+++ b/src/sem/call.h
@@ -17,8 +17,8 @@
 
 #include <vector>
 
+#include "src/sem/builtin.h"
 #include "src/sem/expression.h"
-#include "src/sem/intrinsic.h"
 
 namespace tint {
 namespace sem {
diff --git a/src/sem/call_target.h b/src/sem/call_target.h
index 0281d5a..ea8bdcb 100644
--- a/src/sem/call_target.h
+++ b/src/sem/call_target.h
@@ -56,7 +56,7 @@
   int IndexOf(ParameterUsage usage) const;
 };
 
-/// CallTarget is the base for callable functions, intrinsics, type constructors
+/// CallTarget is the base for callable functions, builtins, type constructors
 /// and type casts.
 class CallTarget : public Castable<CallTarget, Node> {
  public:
diff --git a/src/sem/function.h b/src/sem/function.h
index 022f2fe..62a591b 100644
--- a/src/sem/function.h
+++ b/src/sem/function.h
@@ -35,7 +35,7 @@
 
 namespace sem {
 
-class Intrinsic;
+class Builtin;
 class Variable;
 
 /// WorkgroupDimension describes the size of a single dimension of an entry
@@ -120,16 +120,15 @@
     transitively_called_functions_.add(function);
   }
 
-  /// @returns the list of intrinsics that this function directly calls.
-  const utils::UniqueVector<const Intrinsic*>& DirectlyCalledIntrinsics()
-      const {
-    return directly_called_intrinsics_;
+  /// @returns the list of builtins that this function directly calls.
+  const utils::UniqueVector<const Builtin*>& DirectlyCalledBuiltins() const {
+    return directly_called_builtins_;
   }
 
-  /// Records that this function transitively calls `intrinsic`.
-  /// @param intrinsic the intrinsic this function directly calls
-  void AddDirectlyCalledIntrinsic(const Intrinsic* intrinsic) {
-    directly_called_intrinsics_.add(intrinsic);
+  /// Records that this function transitively calls `builtin`.
+  /// @param builtin the builtin this function directly calls
+  void AddDirectlyCalledBuiltin(const Builtin* builtin) {
+    directly_called_builtins_.add(builtin);
   }
 
   /// Adds the given texture/sampler pair to the list of unique pairs
@@ -149,13 +148,13 @@
     return texture_sampler_pairs_;
   }
 
-  /// @returns the list of direct calls to functions / intrinsics made by this
+  /// @returns the list of direct calls to functions / builtins made by this
   /// function
   std::vector<const Call*> DirectCallStatements() const {
     return direct_calls_;
   }
 
-  /// Adds a record of the direct function / intrinsic calls made by this
+  /// Adds a record of the direct function / builtin calls made by this
   /// function
   /// @param call the call
   void AddDirectCall(const Call* call) { direct_calls_.emplace_back(call); }
@@ -275,7 +274,7 @@
   utils::UniqueVector<const GlobalVariable*> directly_referenced_globals_;
   utils::UniqueVector<const GlobalVariable*> transitively_referenced_globals_;
   utils::UniqueVector<const Function*> transitively_called_functions_;
-  utils::UniqueVector<const Intrinsic*> directly_called_intrinsics_;
+  utils::UniqueVector<const Builtin*> directly_called_builtins_;
   utils::UniqueVector<VariablePair> texture_sampler_pairs_;
   std::vector<const Call*> direct_calls_;
   std::vector<const Call*> callsites_;
diff --git a/src/sem/intrinsic.cc b/src/sem/intrinsic.cc
deleted file mode 100644
index bc90549..0000000
--- a/src/sem/intrinsic.cc
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2020 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/sem/intrinsic.h"
-
-#include <vector>
-
-#include "src/utils/to_const_ptr_vec.h"
-
-TINT_INSTANTIATE_TYPEINFO(tint::sem::Intrinsic);
-
-namespace tint {
-namespace sem {
-
-const char* Intrinsic::str() const {
-  return sem::str(type_);
-}
-
-bool IsCoarseDerivativeIntrinsic(IntrinsicType i) {
-  return i == IntrinsicType::kDpdxCoarse || i == IntrinsicType::kDpdyCoarse ||
-         i == IntrinsicType::kFwidthCoarse;
-}
-
-bool IsFineDerivativeIntrinsic(IntrinsicType i) {
-  return i == IntrinsicType::kDpdxFine || i == IntrinsicType::kDpdyFine ||
-         i == IntrinsicType::kFwidthFine;
-}
-
-bool IsDerivativeIntrinsic(IntrinsicType i) {
-  return i == IntrinsicType::kDpdx || i == IntrinsicType::kDpdy ||
-         i == IntrinsicType::kFwidth || IsCoarseDerivativeIntrinsic(i) ||
-         IsFineDerivativeIntrinsic(i);
-}
-
-bool IsFloatClassificationIntrinsic(IntrinsicType i) {
-  return i == IntrinsicType::kIsFinite || i == IntrinsicType::kIsInf ||
-         i == IntrinsicType::kIsNan || i == IntrinsicType::kIsNormal;
-}
-
-bool IsTextureIntrinsic(IntrinsicType i) {
-  return IsImageQueryIntrinsic(i) || i == IntrinsicType::kTextureLoad ||
-         i == IntrinsicType::kTextureGather ||
-         i == IntrinsicType::kTextureGatherCompare ||
-         i == IntrinsicType::kTextureSample ||
-         i == IntrinsicType::kTextureSampleLevel ||
-         i == IntrinsicType::kTextureSampleBias ||
-         i == IntrinsicType::kTextureSampleCompare ||
-         i == IntrinsicType::kTextureSampleCompareLevel ||
-         i == IntrinsicType::kTextureSampleGrad ||
-         i == IntrinsicType::kTextureStore;
-}
-
-bool IsImageQueryIntrinsic(IntrinsicType i) {
-  return i == IntrinsicType::kTextureDimensions ||
-         i == IntrinsicType::kTextureNumLayers ||
-         i == IntrinsicType::kTextureNumLevels ||
-         i == IntrinsicType::kTextureNumSamples;
-}
-
-bool IsDataPackingIntrinsic(IntrinsicType i) {
-  return i == IntrinsicType::kPack4x8snorm ||
-         i == IntrinsicType::kPack4x8unorm ||
-         i == IntrinsicType::kPack2x16snorm ||
-         i == IntrinsicType::kPack2x16unorm ||
-         i == IntrinsicType::kPack2x16float;
-}
-
-bool IsDataUnpackingIntrinsic(IntrinsicType i) {
-  return i == IntrinsicType::kUnpack4x8snorm ||
-         i == IntrinsicType::kUnpack4x8unorm ||
-         i == IntrinsicType::kUnpack2x16snorm ||
-         i == IntrinsicType::kUnpack2x16unorm ||
-         i == IntrinsicType::kUnpack2x16float;
-}
-
-bool IsBarrierIntrinsic(IntrinsicType i) {
-  return i == IntrinsicType::kWorkgroupBarrier ||
-         i == IntrinsicType::kStorageBarrier;
-}
-
-bool IsAtomicIntrinsic(IntrinsicType i) {
-  return i == sem::IntrinsicType::kAtomicLoad ||
-         i == sem::IntrinsicType::kAtomicStore ||
-         i == sem::IntrinsicType::kAtomicAdd ||
-         i == sem::IntrinsicType::kAtomicSub ||
-         i == sem::IntrinsicType::kAtomicMax ||
-         i == sem::IntrinsicType::kAtomicMin ||
-         i == sem::IntrinsicType::kAtomicAnd ||
-         i == sem::IntrinsicType::kAtomicOr ||
-         i == sem::IntrinsicType::kAtomicXor ||
-         i == sem::IntrinsicType::kAtomicExchange ||
-         i == sem::IntrinsicType::kAtomicCompareExchangeWeak;
-}
-
-Intrinsic::Intrinsic(IntrinsicType type,
-                     const sem::Type* return_type,
-                     std::vector<Parameter*> parameters,
-                     PipelineStageSet supported_stages,
-                     bool is_deprecated)
-    : Base(return_type, utils::ToConstPtrVec(parameters)),
-      type_(type),
-      supported_stages_(supported_stages),
-      is_deprecated_(is_deprecated) {
-  for (auto* parameter : parameters) {
-    parameter->SetOwner(this);
-  }
-}
-
-Intrinsic::~Intrinsic() = default;
-
-bool Intrinsic::IsCoarseDerivative() const {
-  return IsCoarseDerivativeIntrinsic(type_);
-}
-
-bool Intrinsic::IsFineDerivative() const {
-  return IsFineDerivativeIntrinsic(type_);
-}
-
-bool Intrinsic::IsDerivative() const {
-  return IsDerivativeIntrinsic(type_);
-}
-
-bool Intrinsic::IsFloatClassification() const {
-  return IsFloatClassificationIntrinsic(type_);
-}
-
-bool Intrinsic::IsTexture() const {
-  return IsTextureIntrinsic(type_);
-}
-
-bool Intrinsic::IsImageQuery() const {
-  return IsImageQueryIntrinsic(type_);
-}
-
-bool Intrinsic::IsDataPacking() const {
-  return IsDataPackingIntrinsic(type_);
-}
-
-bool Intrinsic::IsDataUnpacking() const {
-  return IsDataUnpackingIntrinsic(type_);
-}
-
-bool Intrinsic::IsBarrier() const {
-  return IsBarrierIntrinsic(type_);
-}
-
-bool Intrinsic::IsAtomic() const {
-  return IsAtomicIntrinsic(type_);
-}
-
-}  // namespace sem
-}  // namespace tint
diff --git a/src/sem/intrinsic.h b/src/sem/intrinsic.h
deleted file mode 100644
index dc19243..0000000
--- a/src/sem/intrinsic.h
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright 2020 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef SRC_SEM_INTRINSIC_H_
-#define SRC_SEM_INTRINSIC_H_
-
-#include <string>
-#include <vector>
-
-#include "src/sem/call_target.h"
-#include "src/sem/intrinsic_type.h"
-#include "src/sem/pipeline_stage_set.h"
-#include "src/utils/hash.h"
-
-namespace tint {
-namespace sem {
-
-/// Determines if the given `i` is a coarse derivative
-/// @param i the intrinsic type
-/// @returns true if the given derivative is coarse.
-bool IsCoarseDerivativeIntrinsic(IntrinsicType i);
-
-/// Determines if the given `i` is a fine derivative
-/// @param i the intrinsic type
-/// @returns true if the given derivative is fine.
-bool IsFineDerivativeIntrinsic(IntrinsicType i);
-
-/// Determine if the given `i` is a derivative intrinsic
-/// @param i the intrinsic type
-/// @returns true if the given `i` is a derivative intrinsic
-bool IsDerivativeIntrinsic(IntrinsicType i);
-
-/// Determines if the given `i` is a float classification intrinsic
-/// @param i the intrinsic type
-/// @returns true if the given `i` is a float intrinsic
-bool IsFloatClassificationIntrinsic(IntrinsicType i);
-
-/// Determines if the given `i` is a texture operation intrinsic
-/// @param i the intrinsic type
-/// @returns true if the given `i` is a texture operation intrinsic
-bool IsTextureIntrinsic(IntrinsicType i);
-
-/// Determines if the given `i` is a image query intrinsic
-/// @param i the intrinsic type
-/// @returns true if the given `i` is a image query intrinsic
-bool IsImageQueryIntrinsic(IntrinsicType i);
-
-/// Determines if the given `i` is a data packing intrinsic
-/// @param i the intrinsic
-/// @returns true if the given `i` is a data packing intrinsic
-bool IsDataPackingIntrinsic(IntrinsicType i);
-
-/// Determines if the given `i` is a data unpacking intrinsic
-/// @param i the intrinsic
-/// @returns true if the given `i` is a data unpacking intrinsic
-bool IsDataUnpackingIntrinsic(IntrinsicType i);
-
-/// Determines if the given `i` is a barrier intrinsic
-/// @param i the intrinsic
-/// @returns true if the given `i` is a barrier intrinsic
-bool IsBarrierIntrinsic(IntrinsicType i);
-
-/// Determines if the given `i` is a atomic intrinsic
-/// @param i the intrinsic
-/// @returns true if the given `i` is a atomic intrinsic
-bool IsAtomicIntrinsic(IntrinsicType i);
-
-/// Intrinsic holds the semantic information for an intrinsic function.
-class Intrinsic : public Castable<Intrinsic, CallTarget> {
- public:
-  /// Constructor
-  /// @param type the intrinsic type
-  /// @param return_type the return type for the intrinsic call
-  /// @param parameters the parameters for the intrinsic overload
-  /// @param supported_stages the pipeline stages that this intrinsic can be
-  /// used in
-  /// @param is_deprecated true if the particular overload is considered
-  /// deprecated
-  Intrinsic(IntrinsicType type,
-            const sem::Type* return_type,
-            std::vector<Parameter*> parameters,
-            PipelineStageSet supported_stages,
-            bool is_deprecated);
-
-  /// Destructor
-  ~Intrinsic() override;
-
-  /// @return the type of the intrinsic
-  IntrinsicType Type() const { return type_; }
-
-  /// @return the pipeline stages that this intrinsic can be used in
-  PipelineStageSet SupportedStages() const { return supported_stages_; }
-
-  /// @return true if the intrinsic overload is considered deprecated
-  bool IsDeprecated() const { return is_deprecated_; }
-
-  /// @returns the name of the intrinsic function type. The spelling, including
-  /// case, matches the name in the WGSL spec.
-  const char* str() const;
-
-  /// @returns true if intrinsic is a coarse derivative intrinsic
-  bool IsCoarseDerivative() const;
-
-  /// @returns true if intrinsic is a fine a derivative intrinsic
-  bool IsFineDerivative() const;
-
-  /// @returns true if intrinsic is a derivative intrinsic
-  bool IsDerivative() const;
-
-  /// @returns true if intrinsic is a float intrinsic
-  bool IsFloatClassification() const;
-
-  /// @returns true if intrinsic is a texture operation intrinsic
-  bool IsTexture() const;
-
-  /// @returns true if intrinsic is a image query intrinsic
-  bool IsImageQuery() const;
-
-  /// @returns true if intrinsic is a data packing intrinsic
-  bool IsDataPacking() const;
-
-  /// @returns true if intrinsic is a data unpacking intrinsic
-  bool IsDataUnpacking() const;
-
-  /// @returns true if intrinsic is a barrier intrinsic
-  bool IsBarrier() const;
-
-  /// @returns true if intrinsic is a atomic intrinsic
-  bool IsAtomic() const;
-
- private:
-  const IntrinsicType type_;
-  const PipelineStageSet supported_stages_;
-  const bool is_deprecated_;
-};
-
-/// Constant value used by the degrees() intrinsic
-static constexpr double kRadToDeg = 57.295779513082322865;
-
-/// Constant value used by the radians() intrinsic
-static constexpr double kDegToRad = 0.017453292519943295474;
-
-}  // namespace sem
-}  // namespace tint
-
-namespace std {
-
-/// Custom std::hash specialization for tint::sem::Intrinsic
-template <>
-class hash<tint::sem::Intrinsic> {
- public:
-  /// @param i the Intrinsic to create a hash for
-  /// @return the hash value
-  inline std::size_t operator()(const tint::sem::Intrinsic& i) const {
-    return tint::utils::Hash(i.Type(), i.SupportedStages(), i.ReturnType(),
-                             i.Parameters(), i.IsDeprecated());
-  }
-};
-
-}  // namespace std
-
-#endif  // SRC_SEM_INTRINSIC_H_
diff --git a/src/sem/intrinsic_test.cc b/src/sem/intrinsic_test.cc
deleted file mode 100644
index 3c70087..0000000
--- a/src/sem/intrinsic_test.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/sem/intrinsic.h"
-
-#include "gtest/gtest.h"
-
-namespace tint {
-namespace sem {
-namespace {
-
-struct IntrinsicData {
-  const char* name;
-  IntrinsicType intrinsic;
-};
-
-inline std::ostream& operator<<(std::ostream& out, IntrinsicData data) {
-  out << data.name;
-  return out;
-}
-
-using IntrinsicTypeTest = testing::TestWithParam<IntrinsicData>;
-
-TEST_P(IntrinsicTypeTest, Parse) {
-  auto param = GetParam();
-  EXPECT_EQ(ParseIntrinsicType(param.name), param.intrinsic);
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    IntrinsicTypeTest,
-    IntrinsicTypeTest,
-    testing::Values(
-        IntrinsicData{"abs", IntrinsicType::kAbs},
-        IntrinsicData{"acos", IntrinsicType::kAcos},
-        IntrinsicData{"all", IntrinsicType::kAll},
-        IntrinsicData{"any", IntrinsicType::kAny},
-        IntrinsicData{"arrayLength", IntrinsicType::kArrayLength},
-        IntrinsicData{"asin", IntrinsicType::kAsin},
-        IntrinsicData{"atan", IntrinsicType::kAtan},
-        IntrinsicData{"atan2", IntrinsicType::kAtan2},
-        IntrinsicData{"ceil", IntrinsicType::kCeil},
-        IntrinsicData{"clamp", IntrinsicType::kClamp},
-        IntrinsicData{"cos", IntrinsicType::kCos},
-        IntrinsicData{"cosh", IntrinsicType::kCosh},
-        IntrinsicData{"countOneBits", IntrinsicType::kCountOneBits},
-        IntrinsicData{"cross", IntrinsicType::kCross},
-        IntrinsicData{"determinant", IntrinsicType::kDeterminant},
-        IntrinsicData{"distance", IntrinsicType::kDistance},
-        IntrinsicData{"dot", IntrinsicType::kDot},
-        IntrinsicData{"dpdx", IntrinsicType::kDpdx},
-        IntrinsicData{"dpdxCoarse", IntrinsicType::kDpdxCoarse},
-        IntrinsicData{"dpdxFine", IntrinsicType::kDpdxFine},
-        IntrinsicData{"dpdy", IntrinsicType::kDpdy},
-        IntrinsicData{"dpdyCoarse", IntrinsicType::kDpdyCoarse},
-        IntrinsicData{"dpdyFine", IntrinsicType::kDpdyFine},
-        IntrinsicData{"exp", IntrinsicType::kExp},
-        IntrinsicData{"exp2", IntrinsicType::kExp2},
-        IntrinsicData{"faceForward", IntrinsicType::kFaceForward},
-        IntrinsicData{"floor", IntrinsicType::kFloor},
-        IntrinsicData{"fma", IntrinsicType::kFma},
-        IntrinsicData{"fract", IntrinsicType::kFract},
-        IntrinsicData{"frexp", IntrinsicType::kFrexp},
-        IntrinsicData{"fwidth", IntrinsicType::kFwidth},
-        IntrinsicData{"fwidthCoarse", IntrinsicType::kFwidthCoarse},
-        IntrinsicData{"fwidthFine", IntrinsicType::kFwidthFine},
-        IntrinsicData{"inverseSqrt", IntrinsicType::kInverseSqrt},
-        IntrinsicData{"isFinite", IntrinsicType::kIsFinite},
-        IntrinsicData{"isInf", IntrinsicType::kIsInf},
-        IntrinsicData{"isNan", IntrinsicType::kIsNan},
-        IntrinsicData{"isNormal", IntrinsicType::kIsNormal},
-        IntrinsicData{"ldexp", IntrinsicType::kLdexp},
-        IntrinsicData{"length", IntrinsicType::kLength},
-        IntrinsicData{"log", IntrinsicType::kLog},
-        IntrinsicData{"log2", IntrinsicType::kLog2},
-        IntrinsicData{"max", IntrinsicType::kMax},
-        IntrinsicData{"min", IntrinsicType::kMin},
-        IntrinsicData{"mix", IntrinsicType::kMix},
-        IntrinsicData{"modf", IntrinsicType::kModf},
-        IntrinsicData{"normalize", IntrinsicType::kNormalize},
-        IntrinsicData{"pow", IntrinsicType::kPow},
-        IntrinsicData{"reflect", IntrinsicType::kReflect},
-        IntrinsicData{"reverseBits", IntrinsicType::kReverseBits},
-        IntrinsicData{"round", IntrinsicType::kRound},
-        IntrinsicData{"select", IntrinsicType::kSelect},
-        IntrinsicData{"sign", IntrinsicType::kSign},
-        IntrinsicData{"sin", IntrinsicType::kSin},
-        IntrinsicData{"sinh", IntrinsicType::kSinh},
-        IntrinsicData{"smoothStep", IntrinsicType::kSmoothStep},
-        IntrinsicData{"sqrt", IntrinsicType::kSqrt},
-        IntrinsicData{"step", IntrinsicType::kStep},
-        IntrinsicData{"storageBarrier", IntrinsicType::kStorageBarrier},
-        IntrinsicData{"tan", IntrinsicType::kTan},
-        IntrinsicData{"tanh", IntrinsicType::kTanh},
-        IntrinsicData{"textureDimensions", IntrinsicType::kTextureDimensions},
-        IntrinsicData{"textureLoad", IntrinsicType::kTextureLoad},
-        IntrinsicData{"textureNumLayers", IntrinsicType::kTextureNumLayers},
-        IntrinsicData{"textureNumLevels", IntrinsicType::kTextureNumLevels},
-        IntrinsicData{"textureNumSamples", IntrinsicType::kTextureNumSamples},
-        IntrinsicData{"textureSample", IntrinsicType::kTextureSample},
-        IntrinsicData{"textureSampleBias", IntrinsicType::kTextureSampleBias},
-        IntrinsicData{"textureSampleCompare",
-                      IntrinsicType::kTextureSampleCompare},
-        IntrinsicData{"textureSampleCompareLevel",
-                      IntrinsicType::kTextureSampleCompareLevel},
-        IntrinsicData{"textureSampleGrad", IntrinsicType::kTextureSampleGrad},
-        IntrinsicData{"textureSampleLevel", IntrinsicType::kTextureSampleLevel},
-        IntrinsicData{"trunc", IntrinsicType::kTrunc},
-        IntrinsicData{"unpack2x16float", IntrinsicType::kUnpack2x16float},
-        IntrinsicData{"unpack2x16snorm", IntrinsicType::kUnpack2x16snorm},
-        IntrinsicData{"unpack2x16unorm", IntrinsicType::kUnpack2x16unorm},
-        IntrinsicData{"unpack4x8snorm", IntrinsicType::kUnpack4x8snorm},
-        IntrinsicData{"unpack4x8unorm", IntrinsicType::kUnpack4x8unorm},
-        IntrinsicData{"workgroupBarrier", IntrinsicType::kWorkgroupBarrier}));
-
-TEST_F(IntrinsicTypeTest, ParseNoMatch) {
-  EXPECT_EQ(ParseIntrinsicType("not_intrinsic"), IntrinsicType::kNone);
-}
-
-}  // namespace
-}  // namespace sem
-}  // namespace tint
diff --git a/src/sem/intrinsic_type.cc b/src/sem/intrinsic_type.cc
deleted file mode 100644
index 8e4b535..0000000
--- a/src/sem/intrinsic_type.cc
+++ /dev/null
@@ -1,560 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   src/sem/intrinsic_type.cc.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-#include "src/sem/intrinsic_type.h"
-
-#include <sstream>
-
-namespace tint {
-namespace sem {
-
-IntrinsicType ParseIntrinsicType(const std::string& name) {
-  if (name == "abs") {
-    return IntrinsicType::kAbs;
-  }
-  if (name == "acos") {
-    return IntrinsicType::kAcos;
-  }
-  if (name == "all") {
-    return IntrinsicType::kAll;
-  }
-  if (name == "any") {
-    return IntrinsicType::kAny;
-  }
-  if (name == "arrayLength") {
-    return IntrinsicType::kArrayLength;
-  }
-  if (name == "asin") {
-    return IntrinsicType::kAsin;
-  }
-  if (name == "atan") {
-    return IntrinsicType::kAtan;
-  }
-  if (name == "atan2") {
-    return IntrinsicType::kAtan2;
-  }
-  if (name == "ceil") {
-    return IntrinsicType::kCeil;
-  }
-  if (name == "clamp") {
-    return IntrinsicType::kClamp;
-  }
-  if (name == "cos") {
-    return IntrinsicType::kCos;
-  }
-  if (name == "cosh") {
-    return IntrinsicType::kCosh;
-  }
-  if (name == "countOneBits") {
-    return IntrinsicType::kCountOneBits;
-  }
-  if (name == "cross") {
-    return IntrinsicType::kCross;
-  }
-  if (name == "degrees") {
-    return IntrinsicType::kDegrees;
-  }
-  if (name == "determinant") {
-    return IntrinsicType::kDeterminant;
-  }
-  if (name == "distance") {
-    return IntrinsicType::kDistance;
-  }
-  if (name == "dot") {
-    return IntrinsicType::kDot;
-  }
-  if (name == "dpdx") {
-    return IntrinsicType::kDpdx;
-  }
-  if (name == "dpdxCoarse") {
-    return IntrinsicType::kDpdxCoarse;
-  }
-  if (name == "dpdxFine") {
-    return IntrinsicType::kDpdxFine;
-  }
-  if (name == "dpdy") {
-    return IntrinsicType::kDpdy;
-  }
-  if (name == "dpdyCoarse") {
-    return IntrinsicType::kDpdyCoarse;
-  }
-  if (name == "dpdyFine") {
-    return IntrinsicType::kDpdyFine;
-  }
-  if (name == "exp") {
-    return IntrinsicType::kExp;
-  }
-  if (name == "exp2") {
-    return IntrinsicType::kExp2;
-  }
-  if (name == "faceForward") {
-    return IntrinsicType::kFaceForward;
-  }
-  if (name == "floor") {
-    return IntrinsicType::kFloor;
-  }
-  if (name == "fma") {
-    return IntrinsicType::kFma;
-  }
-  if (name == "fract") {
-    return IntrinsicType::kFract;
-  }
-  if (name == "frexp") {
-    return IntrinsicType::kFrexp;
-  }
-  if (name == "fwidth") {
-    return IntrinsicType::kFwidth;
-  }
-  if (name == "fwidthCoarse") {
-    return IntrinsicType::kFwidthCoarse;
-  }
-  if (name == "fwidthFine") {
-    return IntrinsicType::kFwidthFine;
-  }
-  if (name == "inverseSqrt") {
-    return IntrinsicType::kInverseSqrt;
-  }
-  if (name == "isFinite") {
-    return IntrinsicType::kIsFinite;
-  }
-  if (name == "isInf") {
-    return IntrinsicType::kIsInf;
-  }
-  if (name == "isNan") {
-    return IntrinsicType::kIsNan;
-  }
-  if (name == "isNormal") {
-    return IntrinsicType::kIsNormal;
-  }
-  if (name == "ldexp") {
-    return IntrinsicType::kLdexp;
-  }
-  if (name == "length") {
-    return IntrinsicType::kLength;
-  }
-  if (name == "log") {
-    return IntrinsicType::kLog;
-  }
-  if (name == "log2") {
-    return IntrinsicType::kLog2;
-  }
-  if (name == "max") {
-    return IntrinsicType::kMax;
-  }
-  if (name == "min") {
-    return IntrinsicType::kMin;
-  }
-  if (name == "mix") {
-    return IntrinsicType::kMix;
-  }
-  if (name == "modf") {
-    return IntrinsicType::kModf;
-  }
-  if (name == "normalize") {
-    return IntrinsicType::kNormalize;
-  }
-  if (name == "pack2x16float") {
-    return IntrinsicType::kPack2x16float;
-  }
-  if (name == "pack2x16snorm") {
-    return IntrinsicType::kPack2x16snorm;
-  }
-  if (name == "pack2x16unorm") {
-    return IntrinsicType::kPack2x16unorm;
-  }
-  if (name == "pack4x8snorm") {
-    return IntrinsicType::kPack4x8snorm;
-  }
-  if (name == "pack4x8unorm") {
-    return IntrinsicType::kPack4x8unorm;
-  }
-  if (name == "pow") {
-    return IntrinsicType::kPow;
-  }
-  if (name == "radians") {
-    return IntrinsicType::kRadians;
-  }
-  if (name == "reflect") {
-    return IntrinsicType::kReflect;
-  }
-  if (name == "refract") {
-    return IntrinsicType::kRefract;
-  }
-  if (name == "reverseBits") {
-    return IntrinsicType::kReverseBits;
-  }
-  if (name == "round") {
-    return IntrinsicType::kRound;
-  }
-  if (name == "select") {
-    return IntrinsicType::kSelect;
-  }
-  if (name == "sign") {
-    return IntrinsicType::kSign;
-  }
-  if (name == "sin") {
-    return IntrinsicType::kSin;
-  }
-  if (name == "sinh") {
-    return IntrinsicType::kSinh;
-  }
-  if (name == "smoothStep") {
-    return IntrinsicType::kSmoothStep;
-  }
-  if (name == "sqrt") {
-    return IntrinsicType::kSqrt;
-  }
-  if (name == "step") {
-    return IntrinsicType::kStep;
-  }
-  if (name == "storageBarrier") {
-    return IntrinsicType::kStorageBarrier;
-  }
-  if (name == "tan") {
-    return IntrinsicType::kTan;
-  }
-  if (name == "tanh") {
-    return IntrinsicType::kTanh;
-  }
-  if (name == "transpose") {
-    return IntrinsicType::kTranspose;
-  }
-  if (name == "trunc") {
-    return IntrinsicType::kTrunc;
-  }
-  if (name == "unpack2x16float") {
-    return IntrinsicType::kUnpack2x16float;
-  }
-  if (name == "unpack2x16snorm") {
-    return IntrinsicType::kUnpack2x16snorm;
-  }
-  if (name == "unpack2x16unorm") {
-    return IntrinsicType::kUnpack2x16unorm;
-  }
-  if (name == "unpack4x8snorm") {
-    return IntrinsicType::kUnpack4x8snorm;
-  }
-  if (name == "unpack4x8unorm") {
-    return IntrinsicType::kUnpack4x8unorm;
-  }
-  if (name == "workgroupBarrier") {
-    return IntrinsicType::kWorkgroupBarrier;
-  }
-  if (name == "textureDimensions") {
-    return IntrinsicType::kTextureDimensions;
-  }
-  if (name == "textureGather") {
-    return IntrinsicType::kTextureGather;
-  }
-  if (name == "textureGatherCompare") {
-    return IntrinsicType::kTextureGatherCompare;
-  }
-  if (name == "textureNumLayers") {
-    return IntrinsicType::kTextureNumLayers;
-  }
-  if (name == "textureNumLevels") {
-    return IntrinsicType::kTextureNumLevels;
-  }
-  if (name == "textureNumSamples") {
-    return IntrinsicType::kTextureNumSamples;
-  }
-  if (name == "textureSample") {
-    return IntrinsicType::kTextureSample;
-  }
-  if (name == "textureSampleBias") {
-    return IntrinsicType::kTextureSampleBias;
-  }
-  if (name == "textureSampleCompare") {
-    return IntrinsicType::kTextureSampleCompare;
-  }
-  if (name == "textureSampleCompareLevel") {
-    return IntrinsicType::kTextureSampleCompareLevel;
-  }
-  if (name == "textureSampleGrad") {
-    return IntrinsicType::kTextureSampleGrad;
-  }
-  if (name == "textureSampleLevel") {
-    return IntrinsicType::kTextureSampleLevel;
-  }
-  if (name == "textureStore") {
-    return IntrinsicType::kTextureStore;
-  }
-  if (name == "textureLoad") {
-    return IntrinsicType::kTextureLoad;
-  }
-  if (name == "atomicLoad") {
-    return IntrinsicType::kAtomicLoad;
-  }
-  if (name == "atomicStore") {
-    return IntrinsicType::kAtomicStore;
-  }
-  if (name == "atomicAdd") {
-    return IntrinsicType::kAtomicAdd;
-  }
-  if (name == "atomicSub") {
-    return IntrinsicType::kAtomicSub;
-  }
-  if (name == "atomicMax") {
-    return IntrinsicType::kAtomicMax;
-  }
-  if (name == "atomicMin") {
-    return IntrinsicType::kAtomicMin;
-  }
-  if (name == "atomicAnd") {
-    return IntrinsicType::kAtomicAnd;
-  }
-  if (name == "atomicOr") {
-    return IntrinsicType::kAtomicOr;
-  }
-  if (name == "atomicXor") {
-    return IntrinsicType::kAtomicXor;
-  }
-  if (name == "atomicExchange") {
-    return IntrinsicType::kAtomicExchange;
-  }
-  if (name == "atomicCompareExchangeWeak") {
-    return IntrinsicType::kAtomicCompareExchangeWeak;
-  }
-  return IntrinsicType::kNone;
-}
-
-const char* str(IntrinsicType i) {
-  switch (i) {
-    case IntrinsicType::kNone:
-      return "<none>";
-    case IntrinsicType::kAbs:
-      return "abs";
-    case IntrinsicType::kAcos:
-      return "acos";
-    case IntrinsicType::kAll:
-      return "all";
-    case IntrinsicType::kAny:
-      return "any";
-    case IntrinsicType::kArrayLength:
-      return "arrayLength";
-    case IntrinsicType::kAsin:
-      return "asin";
-    case IntrinsicType::kAtan:
-      return "atan";
-    case IntrinsicType::kAtan2:
-      return "atan2";
-    case IntrinsicType::kCeil:
-      return "ceil";
-    case IntrinsicType::kClamp:
-      return "clamp";
-    case IntrinsicType::kCos:
-      return "cos";
-    case IntrinsicType::kCosh:
-      return "cosh";
-    case IntrinsicType::kCountOneBits:
-      return "countOneBits";
-    case IntrinsicType::kCross:
-      return "cross";
-    case IntrinsicType::kDegrees:
-      return "degrees";
-    case IntrinsicType::kDeterminant:
-      return "determinant";
-    case IntrinsicType::kDistance:
-      return "distance";
-    case IntrinsicType::kDot:
-      return "dot";
-    case IntrinsicType::kDpdx:
-      return "dpdx";
-    case IntrinsicType::kDpdxCoarse:
-      return "dpdxCoarse";
-    case IntrinsicType::kDpdxFine:
-      return "dpdxFine";
-    case IntrinsicType::kDpdy:
-      return "dpdy";
-    case IntrinsicType::kDpdyCoarse:
-      return "dpdyCoarse";
-    case IntrinsicType::kDpdyFine:
-      return "dpdyFine";
-    case IntrinsicType::kExp:
-      return "exp";
-    case IntrinsicType::kExp2:
-      return "exp2";
-    case IntrinsicType::kFaceForward:
-      return "faceForward";
-    case IntrinsicType::kFloor:
-      return "floor";
-    case IntrinsicType::kFma:
-      return "fma";
-    case IntrinsicType::kFract:
-      return "fract";
-    case IntrinsicType::kFrexp:
-      return "frexp";
-    case IntrinsicType::kFwidth:
-      return "fwidth";
-    case IntrinsicType::kFwidthCoarse:
-      return "fwidthCoarse";
-    case IntrinsicType::kFwidthFine:
-      return "fwidthFine";
-    case IntrinsicType::kInverseSqrt:
-      return "inverseSqrt";
-    case IntrinsicType::kIsFinite:
-      return "isFinite";
-    case IntrinsicType::kIsInf:
-      return "isInf";
-    case IntrinsicType::kIsNan:
-      return "isNan";
-    case IntrinsicType::kIsNormal:
-      return "isNormal";
-    case IntrinsicType::kLdexp:
-      return "ldexp";
-    case IntrinsicType::kLength:
-      return "length";
-    case IntrinsicType::kLog:
-      return "log";
-    case IntrinsicType::kLog2:
-      return "log2";
-    case IntrinsicType::kMax:
-      return "max";
-    case IntrinsicType::kMin:
-      return "min";
-    case IntrinsicType::kMix:
-      return "mix";
-    case IntrinsicType::kModf:
-      return "modf";
-    case IntrinsicType::kNormalize:
-      return "normalize";
-    case IntrinsicType::kPack2x16float:
-      return "pack2x16float";
-    case IntrinsicType::kPack2x16snorm:
-      return "pack2x16snorm";
-    case IntrinsicType::kPack2x16unorm:
-      return "pack2x16unorm";
-    case IntrinsicType::kPack4x8snorm:
-      return "pack4x8snorm";
-    case IntrinsicType::kPack4x8unorm:
-      return "pack4x8unorm";
-    case IntrinsicType::kPow:
-      return "pow";
-    case IntrinsicType::kRadians:
-      return "radians";
-    case IntrinsicType::kReflect:
-      return "reflect";
-    case IntrinsicType::kRefract:
-      return "refract";
-    case IntrinsicType::kReverseBits:
-      return "reverseBits";
-    case IntrinsicType::kRound:
-      return "round";
-    case IntrinsicType::kSelect:
-      return "select";
-    case IntrinsicType::kSign:
-      return "sign";
-    case IntrinsicType::kSin:
-      return "sin";
-    case IntrinsicType::kSinh:
-      return "sinh";
-    case IntrinsicType::kSmoothStep:
-      return "smoothStep";
-    case IntrinsicType::kSqrt:
-      return "sqrt";
-    case IntrinsicType::kStep:
-      return "step";
-    case IntrinsicType::kStorageBarrier:
-      return "storageBarrier";
-    case IntrinsicType::kTan:
-      return "tan";
-    case IntrinsicType::kTanh:
-      return "tanh";
-    case IntrinsicType::kTranspose:
-      return "transpose";
-    case IntrinsicType::kTrunc:
-      return "trunc";
-    case IntrinsicType::kUnpack2x16float:
-      return "unpack2x16float";
-    case IntrinsicType::kUnpack2x16snorm:
-      return "unpack2x16snorm";
-    case IntrinsicType::kUnpack2x16unorm:
-      return "unpack2x16unorm";
-    case IntrinsicType::kUnpack4x8snorm:
-      return "unpack4x8snorm";
-    case IntrinsicType::kUnpack4x8unorm:
-      return "unpack4x8unorm";
-    case IntrinsicType::kWorkgroupBarrier:
-      return "workgroupBarrier";
-    case IntrinsicType::kTextureDimensions:
-      return "textureDimensions";
-    case IntrinsicType::kTextureGather:
-      return "textureGather";
-    case IntrinsicType::kTextureGatherCompare:
-      return "textureGatherCompare";
-    case IntrinsicType::kTextureNumLayers:
-      return "textureNumLayers";
-    case IntrinsicType::kTextureNumLevels:
-      return "textureNumLevels";
-    case IntrinsicType::kTextureNumSamples:
-      return "textureNumSamples";
-    case IntrinsicType::kTextureSample:
-      return "textureSample";
-    case IntrinsicType::kTextureSampleBias:
-      return "textureSampleBias";
-    case IntrinsicType::kTextureSampleCompare:
-      return "textureSampleCompare";
-    case IntrinsicType::kTextureSampleCompareLevel:
-      return "textureSampleCompareLevel";
-    case IntrinsicType::kTextureSampleGrad:
-      return "textureSampleGrad";
-    case IntrinsicType::kTextureSampleLevel:
-      return "textureSampleLevel";
-    case IntrinsicType::kTextureStore:
-      return "textureStore";
-    case IntrinsicType::kTextureLoad:
-      return "textureLoad";
-    case IntrinsicType::kAtomicLoad:
-      return "atomicLoad";
-    case IntrinsicType::kAtomicStore:
-      return "atomicStore";
-    case IntrinsicType::kAtomicAdd:
-      return "atomicAdd";
-    case IntrinsicType::kAtomicSub:
-      return "atomicSub";
-    case IntrinsicType::kAtomicMax:
-      return "atomicMax";
-    case IntrinsicType::kAtomicMin:
-      return "atomicMin";
-    case IntrinsicType::kAtomicAnd:
-      return "atomicAnd";
-    case IntrinsicType::kAtomicOr:
-      return "atomicOr";
-    case IntrinsicType::kAtomicXor:
-      return "atomicXor";
-    case IntrinsicType::kAtomicExchange:
-      return "atomicExchange";
-    case IntrinsicType::kAtomicCompareExchangeWeak:
-      return "atomicCompareExchangeWeak";
-  }
-  return "<unknown>";
-}
-
-std::ostream& operator<<(std::ostream& out, IntrinsicType i) {
-  out << str(i);
-  return out;
-}
-
-}  // namespace sem
-}  // namespace tint
diff --git a/src/sem/intrinsic_type.cc.tmpl b/src/sem/intrinsic_type.cc.tmpl
deleted file mode 100644
index f02c13f..0000000
--- a/src/sem/intrinsic_type.cc.tmpl
+++ /dev/null
@@ -1,45 +0,0 @@
-{{- /*
---------------------------------------------------------------------------------
-Template file for use with tools/intrinsic-gen to generate intrinsic_type.cc
-
-See:
-* tools/cmd/intrinsic-gen/gen for structures used by this template
-* https://golang.org/pkg/text/template/ for documentation on the template syntax
---------------------------------------------------------------------------------
-*/ -}}
-
-#include "src/sem/intrinsic_type.h"
-
-#include <sstream>
-
-namespace tint {
-namespace sem {
-
-IntrinsicType ParseIntrinsicType(const std::string& name) {
-{{- range .Sem.Functions  }}
-  if (name == "{{.Name}}") {
-    return IntrinsicType::k{{Title .Name}};
-  }
-{{- end  }}
-  return IntrinsicType::kNone;
-}
-
-const char* str(IntrinsicType i) {
-  switch (i) {
-    case IntrinsicType::kNone:
-      return "<none>";
-{{- range .Sem.Functions  }}
-    case IntrinsicType::k{{Title .Name}}:
-      return "{{.Name}}";
-{{- end  }}
-  }
-  return "<unknown>";
-}
-
-std::ostream& operator<<(std::ostream& out, IntrinsicType i) {
-  out << str(i);
-  return out;
-}
-
-}  // namespace sem
-}  // namespace tint
diff --git a/src/sem/intrinsic_type.h b/src/sem/intrinsic_type.h
deleted file mode 100644
index 64df9a4..0000000
--- a/src/sem/intrinsic_type.h
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   src/sem/intrinsic_type.h.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef SRC_SEM_INTRINSIC_TYPE_H_
-#define SRC_SEM_INTRINSIC_TYPE_H_
-
-#include <sstream>
-#include <string>
-
-namespace tint {
-namespace sem {
-
-/// Enumerator of all intrinsic functions
-enum class IntrinsicType {
-  kNone = -1,
-  kAbs,
-  kAcos,
-  kAll,
-  kAny,
-  kArrayLength,
-  kAsin,
-  kAtan,
-  kAtan2,
-  kCeil,
-  kClamp,
-  kCos,
-  kCosh,
-  kCountOneBits,
-  kCross,
-  kDegrees,
-  kDeterminant,
-  kDistance,
-  kDot,
-  kDpdx,
-  kDpdxCoarse,
-  kDpdxFine,
-  kDpdy,
-  kDpdyCoarse,
-  kDpdyFine,
-  kExp,
-  kExp2,
-  kFaceForward,
-  kFloor,
-  kFma,
-  kFract,
-  kFrexp,
-  kFwidth,
-  kFwidthCoarse,
-  kFwidthFine,
-  kInverseSqrt,
-  kIsFinite,
-  kIsInf,
-  kIsNan,
-  kIsNormal,
-  kLdexp,
-  kLength,
-  kLog,
-  kLog2,
-  kMax,
-  kMin,
-  kMix,
-  kModf,
-  kNormalize,
-  kPack2x16float,
-  kPack2x16snorm,
-  kPack2x16unorm,
-  kPack4x8snorm,
-  kPack4x8unorm,
-  kPow,
-  kRadians,
-  kReflect,
-  kRefract,
-  kReverseBits,
-  kRound,
-  kSelect,
-  kSign,
-  kSin,
-  kSinh,
-  kSmoothStep,
-  kSqrt,
-  kStep,
-  kStorageBarrier,
-  kTan,
-  kTanh,
-  kTranspose,
-  kTrunc,
-  kUnpack2x16float,
-  kUnpack2x16snorm,
-  kUnpack2x16unorm,
-  kUnpack4x8snorm,
-  kUnpack4x8unorm,
-  kWorkgroupBarrier,
-  kTextureDimensions,
-  kTextureGather,
-  kTextureGatherCompare,
-  kTextureNumLayers,
-  kTextureNumLevels,
-  kTextureNumSamples,
-  kTextureSample,
-  kTextureSampleBias,
-  kTextureSampleCompare,
-  kTextureSampleCompareLevel,
-  kTextureSampleGrad,
-  kTextureSampleLevel,
-  kTextureStore,
-  kTextureLoad,
-  kAtomicLoad,
-  kAtomicStore,
-  kAtomicAdd,
-  kAtomicSub,
-  kAtomicMax,
-  kAtomicMin,
-  kAtomicAnd,
-  kAtomicOr,
-  kAtomicXor,
-  kAtomicExchange,
-  kAtomicCompareExchangeWeak,
-};
-
-/// Matches the IntrinsicType by name
-/// @param name the intrinsic name to parse
-/// @returns the parsed IntrinsicType, or IntrinsicType::kNone if `name` did not
-/// match any intrinsic.
-IntrinsicType ParseIntrinsicType(const std::string& name);
-
-/// @returns the name of the intrinsic function type. The spelling, including
-/// case, matches the name in the WGSL spec.
-const char* str(IntrinsicType i);
-
-/// Emits the name of the intrinsic function type. The spelling, including case,
-/// matches the name in the WGSL spec.
-std::ostream& operator<<(std::ostream& out, IntrinsicType i);
-
-}  // namespace sem
-}  // namespace tint
-
-#endif  // SRC_SEM_INTRINSIC_TYPE_H_
diff --git a/src/sem/intrinsic_type.h.tmpl b/src/sem/intrinsic_type.h.tmpl
deleted file mode 100644
index 2833e20..0000000
--- a/src/sem/intrinsic_type.h.tmpl
+++ /dev/null
@@ -1,45 +0,0 @@
-{{- /*
---------------------------------------------------------------------------------
-Template file for use with tools/intrinsic-gen to generate intrinsic_type.h
-
-See:
-* tools/cmd/intrinsic-gen/gen for structures used by this template
-* https://golang.org/pkg/text/template/ for documentation on the template syntax
---------------------------------------------------------------------------------
-*/ -}}
-
-#ifndef SRC_SEM_INTRINSIC_TYPE_H_
-#define SRC_SEM_INTRINSIC_TYPE_H_
-
-#include <sstream>
-#include <string>
-
-namespace tint {
-namespace sem {
-
-/// Enumerator of all intrinsic functions
-enum class IntrinsicType {
-  kNone = -1,
-{{- range .Sem.Functions }}
-  k{{Title .Name}},
-{{- end }}
-};
-
-/// Matches the IntrinsicType by name
-/// @param name the intrinsic name to parse
-/// @returns the parsed IntrinsicType, or IntrinsicType::kNone if `name` did not
-/// match any intrinsic.
-IntrinsicType ParseIntrinsicType(const std::string& name);
-
-/// @returns the name of the intrinsic function type. The spelling, including
-/// case, matches the name in the WGSL spec.
-const char* str(IntrinsicType i);
-
-/// Emits the name of the intrinsic function type. The spelling, including case,
-/// matches the name in the WGSL spec.
-std::ostream& operator<<(std::ostream& out, IntrinsicType i);
-
-}  // namespace sem
-}  // namespace tint
-
-#endif  // SRC_SEM_INTRINSIC_TYPE_H_
diff --git a/src/sem/parameter_usage.cc b/src/sem/parameter_usage.cc
index 753283b7..6f0e071 100644
--- a/src/sem/parameter_usage.cc
+++ b/src/sem/parameter_usage.cc
@@ -13,11 +13,11 @@
 // limitations under the License.
 
 ////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
+// File generated by tools/builtin-gen
 // using the template:
 //   src/sem/parameter_usage.cc.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
+// and the builtin defintion file:
+//   src/builtins.def
 //
 // Do not modify this file directly
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/src/sem/parameter_usage.cc.tmpl b/src/sem/parameter_usage.cc.tmpl
index 7650226..b8125e7 100644
--- a/src/sem/parameter_usage.cc.tmpl
+++ b/src/sem/parameter_usage.cc.tmpl
@@ -1,9 +1,9 @@
 {{- /*
 --------------------------------------------------------------------------------
-Template file for use with tools/intrinsic-gen to generate parameter_usage.cc
+Template file for use with tools/builtin-gen to generate parameter_usage.cc
 
 See:
-* tools/cmd/intrinsic-gen/gen for structures used by this template
+* tools/cmd/builtin-gen/gen for structures used by this template
 * https://golang.org/pkg/text/template/ for documentation on the template syntax
 --------------------------------------------------------------------------------
 */ -}}
diff --git a/src/sem/parameter_usage.h b/src/sem/parameter_usage.h
index c6dbf39..adcd41b 100644
--- a/src/sem/parameter_usage.h
+++ b/src/sem/parameter_usage.h
@@ -13,11 +13,11 @@
 // limitations under the License.
 
 ////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
+// File generated by tools/builtin-gen
 // using the template:
 //   src/sem/parameter_usage.h.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
+// and the builtin defintion file:
+//   src/builtins.def
 //
 // Do not modify this file directly
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/src/sem/parameter_usage.h.tmpl b/src/sem/parameter_usage.h.tmpl
index 3110b20..ef51d17 100644
--- a/src/sem/parameter_usage.h.tmpl
+++ b/src/sem/parameter_usage.h.tmpl
@@ -1,9 +1,9 @@
 {{- /*
 --------------------------------------------------------------------------------
-Template file for use with tools/intrinsic-gen to generate parameter_usage.h
+Template file for use with tools/builtin-gen to generate parameter_usage.h
 
 See:
-* tools/cmd/intrinsic-gen/gen for structures used by this template
+* tools/cmd/builtin-gen/gen for structures used by this template
 * https://golang.org/pkg/text/template/ for documentation on the template syntax
 --------------------------------------------------------------------------------
 */ -}}
diff --git a/src/transform/array_length_from_uniform.cc b/src/transform/array_length_from_uniform.cc
index 5ab30a7..9270fd9 100644
--- a/src/transform/array_length_from_uniform.cc
+++ b/src/transform/array_length_from_uniform.cc
@@ -34,7 +34,7 @@
 ArrayLengthFromUniform::ArrayLengthFromUniform() = default;
 ArrayLengthFromUniform::~ArrayLengthFromUniform() = default;
 
-/// Iterate over all arrayLength() intrinsics that operate on
+/// Iterate over all arrayLength() builtins that operate on
 /// storage buffer variables.
 /// @param ctx the CloneContext.
 /// @param functor of type void(const ast::CallExpression*, const
@@ -46,7 +46,7 @@
 static void IterateArrayLengthOnStorageVar(CloneContext& ctx, F&& functor) {
   auto& sem = ctx.src->Sem();
 
-  // Find all calls to the arrayLength() intrinsic.
+  // Find all calls to the arrayLength() builtin.
   for (auto* node : ctx.src->ASTNodes().Objects()) {
     auto* call_expr = node->As<ast::CallExpression>();
     if (!call_expr) {
@@ -54,8 +54,8 @@
     }
 
     auto* call = sem.Get(call_expr);
-    auto* intrinsic = call->Target()->As<sem::Intrinsic>();
-    if (!intrinsic || intrinsic->Type() != sem::IntrinsicType::kArrayLength) {
+    auto* builtin = call->Target()->As<sem::Builtin>();
+    if (!builtin || builtin->Type() != sem::BuiltinType::kArrayLength) {
       continue;
     }
 
@@ -98,8 +98,8 @@
                                        const DataMap&) const {
   for (auto* fn : program->AST().Functions()) {
     if (auto* sem_fn = program->Sem().Get(fn)) {
-      for (auto* intrinsic : sem_fn->DirectlyCalledIntrinsics()) {
-        if (intrinsic->Type() == sem::IntrinsicType::kArrayLength) {
+      for (auto* builtin : sem_fn->DirectlyCalledBuiltins()) {
+        if (builtin->Type() == sem::BuiltinType::kArrayLength) {
           return true;
         }
       }
diff --git a/src/transform/array_length_from_uniform.h b/src/transform/array_length_from_uniform.h
index 6947350..305e47c 100644
--- a/src/transform/array_length_from_uniform.h
+++ b/src/transform/array_length_from_uniform.h
@@ -84,7 +84,7 @@
   };
 
   /// Information produced about what the transform did.
-  /// If there were no calls to the arrayLength() intrinsic, then no Result will
+  /// If there were no calls to the arrayLength() builtin, then no Result will
   /// be emitted.
   struct Result : public Castable<Result, transform::Data> {
     /// Constructor
diff --git a/src/transform/calculate_array_length.cc b/src/transform/calculate_array_length.cc
index 92604a1..ac57650 100644
--- a/src/transform/calculate_array_length.cc
+++ b/src/transform/calculate_array_length.cc
@@ -76,8 +76,8 @@
                                      const DataMap&) const {
   for (auto* fn : program->AST().Functions()) {
     if (auto* sem_fn = program->Sem().Get(fn)) {
-      for (auto* intrinsic : sem_fn->DirectlyCalledIntrinsics()) {
-        if (intrinsic->Type() == sem::IntrinsicType::kArrayLength) {
+      for (auto* builtin : sem_fn->DirectlyCalledBuiltins()) {
+        if (builtin->Type() == sem::BuiltinType::kArrayLength) {
           return true;
         }
       }
@@ -143,8 +143,8 @@
   for (auto* node : ctx.src->ASTNodes().Objects()) {
     if (auto* call_expr = node->As<ast::CallExpression>()) {
       auto* call = sem.Get(call_expr);
-      if (auto* intrinsic = call->Target()->As<sem::Intrinsic>()) {
-        if (intrinsic->Type() == sem::IntrinsicType::kArrayLength) {
+      if (auto* builtin = call->Target()->As<sem::Builtin>()) {
+        if (builtin->Type() == sem::BuiltinType::kArrayLength) {
           // We're dealing with an arrayLength() call
 
           // A runtime-sized array can only appear as the store type of a
diff --git a/src/transform/combine_samplers.cc b/src/transform/combine_samplers.cc
index 6d202f6..cff99d8 100644
--- a/src/transform/combine_samplers.cc
+++ b/src/transform/combine_samplers.cc
@@ -71,7 +71,7 @@
 
   /// Placeholder global samplers used when a function contains texture-only
   /// references (one comparison sampler, one regular). These are also used as
-  /// temporary sampler parameters to the texture intrinsics to satsify the WGSL
+  /// temporary sampler parameters to the texture builtins to satisfy the WGSL
   /// resolver, but are then ignored and removed by the GLSL writer.
   const ast::Variable* placeholder_samplers_[2] = {};
 
@@ -210,9 +210,9 @@
                        -> const ast::Expression* {
       if (auto* call = sem.Get(expr)) {
         ast::ExpressionList args;
-        // Replace all texture intrinsic calls.
-        if (auto* intrinsic = call->Target()->As<sem::Intrinsic>()) {
-          const auto& signature = intrinsic->Signature();
+        // Replace all texture builtin calls.
+        if (auto* builtin = call->Target()->As<sem::Builtin>()) {
+          const auto& signature = builtin->Signature();
           int sampler_index = signature.IndexOf(sem::ParameterUsage::kSampler);
           int texture_index = signature.IndexOf(sem::ParameterUsage::kTexture);
           if (texture_index == -1) {
diff --git a/src/transform/combine_samplers.h b/src/transform/combine_samplers.h
index 2108ccb..588fe16 100644
--- a/src/transform/combine_samplers.h
+++ b/src/transform/combine_samplers.h
@@ -38,9 +38,9 @@
 /// parameter. In this case, a new parameter is added to the function
 /// signature. All separate texture/sampler parameters are removed.
 ///
-/// All texture intrinsic callsites are modified to pass the combined
+/// All texture builtin callsites are modified to pass the combined
 /// texture/sampler as the first argument, and separate texture/sampler
-/// arugments are removed.
+/// arguments are removed.
 ///
 /// Note that the sampler may be null, indicating that only a texture
 /// reference was required (e.g., textureLoad). In this case, a
diff --git a/src/transform/decompose_memory_access.cc b/src/transform/decompose_memory_access.cc
index 21eb28b..bc62b86 100644
--- a/src/transform/decompose_memory_access.cc
+++ b/src/transform/decompose_memory_access.cc
@@ -115,7 +115,7 @@
 struct AtomicKey {
   sem::Type const* buf_ty = nullptr;  // buffer type
   sem::Type const* el_ty = nullptr;   // element type
-  sem::IntrinsicType const op;        // atomic op
+  sem::BuiltinType const op;          // atomic op
   bool operator==(const AtomicKey& rhs) const {
     return buf_ty == rhs.buf_ty && el_ty == rhs.el_ty && op == rhs.op;
   }
@@ -224,41 +224,41 @@
 /// @returns a DecomposeMemoryAccess::Intrinsic attribute that can be applied
 /// to a stub function for the atomic op and the type `ty`.
 DecomposeMemoryAccess::Intrinsic* IntrinsicAtomicFor(ProgramBuilder* builder,
-                                                     sem::IntrinsicType ity,
+                                                     sem::BuiltinType ity,
                                                      const sem::Type* ty) {
   auto op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicLoad;
   switch (ity) {
-    case sem::IntrinsicType::kAtomicLoad:
+    case sem::BuiltinType::kAtomicLoad:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicLoad;
       break;
-    case sem::IntrinsicType::kAtomicStore:
+    case sem::BuiltinType::kAtomicStore:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicStore;
       break;
-    case sem::IntrinsicType::kAtomicAdd:
+    case sem::BuiltinType::kAtomicAdd:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicAdd;
       break;
-    case sem::IntrinsicType::kAtomicSub:
+    case sem::BuiltinType::kAtomicSub:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicSub;
       break;
-    case sem::IntrinsicType::kAtomicMax:
+    case sem::BuiltinType::kAtomicMax:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicMax;
       break;
-    case sem::IntrinsicType::kAtomicMin:
+    case sem::BuiltinType::kAtomicMin:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicMin;
       break;
-    case sem::IntrinsicType::kAtomicAnd:
+    case sem::BuiltinType::kAtomicAnd:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicAnd;
       break;
-    case sem::IntrinsicType::kAtomicOr:
+    case sem::BuiltinType::kAtomicOr:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicOr;
       break;
-    case sem::IntrinsicType::kAtomicXor:
+    case sem::BuiltinType::kAtomicXor:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicXor;
       break;
-    case sem::IntrinsicType::kAtomicExchange:
+    case sem::BuiltinType::kAtomicExchange:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicExchange;
       break;
-    case sem::IntrinsicType::kAtomicCompareExchangeWeak:
+    case sem::BuiltinType::kAtomicCompareExchangeWeak:
       op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicCompareExchangeWeak;
       break;
     default:
@@ -641,7 +641,7 @@
   /// @return the name of the function that performs the load
   Symbol AtomicFunc(const sem::Type* buf_ty,
                     const sem::Type* el_ty,
-                    const sem::Intrinsic* intrinsic,
+                    const sem::Builtin* intrinsic,
                     const sem::VariableUser* var_user) {
     auto op = intrinsic->Type();
     return utils::GetOrCreate(atomic_funcs, AtomicKey{buf_ty, el_ty, op}, [&] {
@@ -921,15 +921,15 @@
 
     if (auto* call_expr = node->As<ast::CallExpression>()) {
       auto* call = sem.Get(call_expr);
-      if (auto* intrinsic = call->Target()->As<sem::Intrinsic>()) {
-        if (intrinsic->Type() == sem::IntrinsicType::kArrayLength) {
+      if (auto* builtin = call->Target()->As<sem::Builtin>()) {
+        if (builtin->Type() == sem::BuiltinType::kArrayLength) {
           // arrayLength(X)
-          // Don't convert X into a load, this intrinsic actually requires the
+          // Don't convert X into a load, this builtin actually requires the
           // real pointer.
           state.TakeAccess(call_expr->args[0]);
           continue;
         }
-        if (intrinsic->IsAtomic()) {
+        if (builtin->IsAtomic()) {
           if (auto access = state.TakeAccess(call_expr->args[0])) {
             // atomic___(X)
             ctx.Replace(call_expr, [=, &ctx, &state] {
@@ -937,9 +937,8 @@
               auto* offset = access.offset->Build(ctx);
               auto* buf_ty = access.var->Type()->UnwrapRef();
               auto* el_ty = access.type->UnwrapRef()->As<sem::Atomic>()->Type();
-              Symbol func =
-                  state.AtomicFunc(buf_ty, el_ty, intrinsic,
-                                   access.var->As<sem::VariableUser>());
+              Symbol func = state.AtomicFunc(
+                  buf_ty, el_ty, builtin, access.var->As<sem::VariableUser>());
 
               ast::ExpressionList args{ctx.Clone(buf), offset};
               for (size_t i = 1; i < call_expr->args.size(); i++) {
diff --git a/src/transform/external_texture_transform.cc b/src/transform/external_texture_transform.cc
index d24149e..45323f0 100644
--- a/src/transform/external_texture_transform.cc
+++ b/src/transform/external_texture_transform.cc
@@ -46,10 +46,9 @@
   // Scan the AST nodes for calls to textureLoad or textureSampleLevel.
   for (auto* node : ctx.src->ASTNodes().Objects()) {
     if (auto* call_expr = node->As<ast::CallExpression>()) {
-      if (auto* intrinsic =
-              sem.Get(call_expr)->Target()->As<sem::Intrinsic>()) {
-        if (intrinsic->Type() == sem::IntrinsicType::kTextureLoad ||
-            intrinsic->Type() == sem::IntrinsicType::kTextureSampleLevel) {
+      if (auto* builtin = sem.Get(call_expr)->Target()->As<sem::Builtin>()) {
+        if (builtin->Type() == sem::BuiltinType::kTextureLoad ||
+            builtin->Type() == sem::BuiltinType::kTextureSampleLevel) {
           // When a textureLoad or textureSampleLevel has been identified, check
           // if the first parameter is an external texture.
           if (auto* var =
@@ -58,7 +57,7 @@
                     ->Type()
                     ->UnwrapRef()
                     ->Is<sem::ExternalTexture>()) {
-              if (intrinsic->Type() == sem::IntrinsicType::kTextureLoad &&
+              if (builtin->Type() == sem::BuiltinType::kTextureLoad &&
                   call_expr->args.size() != 2) {
                 TINT_ICE(Transform, ctx.dst->Diagnostics())
                     << "expected textureLoad call with a texture_external to "
@@ -66,8 +65,7 @@
                     << call_expr->args.size() << " parameters";
               }
 
-              if (intrinsic->Type() ==
-                      sem::IntrinsicType::kTextureSampleLevel &&
+              if (builtin->Type() == sem::BuiltinType::kTextureSampleLevel &&
                   call_expr->args.size() != 3) {
                 TINT_ICE(Transform, ctx.dst->Diagnostics())
                     << "expected textureSampleLevel call with a "
@@ -82,12 +80,12 @@
               auto* externalTextureParam = ctx.Clone(call_expr->args[0]);
 
               ast::ExpressionList params;
-              if (intrinsic->Type() == sem::IntrinsicType::kTextureLoad) {
+              if (builtin->Type() == sem::BuiltinType::kTextureLoad) {
                 auto* coordsParam = ctx.Clone(call_expr->args[1]);
                 auto* levelParam = ctx.dst->Expr(0);
                 params = {externalTextureParam, coordsParam, levelParam};
-              } else if (intrinsic->Type() ==
-                         sem::IntrinsicType::kTextureSampleLevel) {
+              } else if (builtin->Type() ==
+                         sem::BuiltinType::kTextureSampleLevel) {
                 auto* samplerParam = ctx.Clone(call_expr->args[1]);
                 auto* coordsParam = ctx.Clone(call_expr->args[2]);
                 auto* levelParam = ctx.dst->Expr(0.0f);
diff --git a/src/transform/multiplanar_external_texture.cc b/src/transform/multiplanar_external_texture.cc
index a4d2deb..18ded92 100644
--- a/src/transform/multiplanar_external_texture.cc
+++ b/src/transform/multiplanar_external_texture.cc
@@ -148,11 +148,11 @@
     // textureLoadExternal and textureSampleExternal calls.
     ctx.ReplaceAll(
         [&](const ast::CallExpression* expr) -> const ast::CallExpression* {
-          auto* intrinsic = sem.Get(expr)->Target()->As<sem::Intrinsic>();
+          auto* builtin = sem.Get(expr)->Target()->As<sem::Builtin>();
 
-          if (intrinsic && !intrinsic->Parameters().empty() &&
-              intrinsic->Parameters()[0]->Type()->Is<sem::ExternalTexture>() &&
-              intrinsic->Type() != sem::IntrinsicType::kTextureDimensions) {
+          if (builtin && !builtin->Parameters().empty() &&
+              builtin->Parameters()[0]->Type()->Is<sem::ExternalTexture>() &&
+              builtin->Type() != sem::BuiltinType::kTextureDimensions) {
             auto it = new_binding_symbols.find(
                 expr->args[0]->As<ast::IdentifierExpression>()->symbol);
             if (it == new_binding_symbols.end()) {
@@ -164,11 +164,11 @@
             }
             auto& syms = it->second;
 
-            if (intrinsic->Type() == sem::IntrinsicType::kTextureLoad) {
+            if (builtin->Type() == sem::BuiltinType::kTextureLoad) {
               return createTexLdExt(expr, syms);
             }
 
-            if (intrinsic->Type() == sem::IntrinsicType::kTextureSampleLevel) {
+            if (builtin->Type() == sem::BuiltinType::kTextureSampleLevel) {
               return createTexSmpExt(expr, syms);
             }
 
@@ -248,12 +248,12 @@
   /// bodies of the textureSampleExternal and textureLoadExternal functions.
   /// @param call_type determines which function body to generate
   /// @returns a statement list that makes of the body of the chosen function
-  ast::StatementList createTexFnExtStatementList(sem::IntrinsicType call_type) {
+  ast::StatementList createTexFnExtStatementList(sem::BuiltinType call_type) {
     using f32 = ProgramBuilder::f32;
     const ast::CallExpression* single_plane_call = nullptr;
     const ast::CallExpression* plane_0_call = nullptr;
     const ast::CallExpression* plane_1_call = nullptr;
-    if (call_type == sem::IntrinsicType::kTextureSampleLevel) {
+    if (call_type == sem::BuiltinType::kTextureSampleLevel) {
       // textureSampleLevel(plane0, smp, coord.xy, 0.0);
       single_plane_call =
           b.Call("textureSampleLevel", "plane0", "smp", "coord", 0.0f);
@@ -263,7 +263,7 @@
       // textureSampleLevel(plane1, smp, coord.xy, 0.0);
       plane_1_call =
           b.Call("textureSampleLevel", "plane1", "smp", "coord", 0.0f);
-    } else if (call_type == sem::IntrinsicType::kTextureLoad) {
+    } else if (call_type == sem::BuiltinType::kTextureLoad) {
       // textureLoad(plane0, coords.xy, 0);
       single_plane_call = b.Call("textureLoad", "plane0", "coord", 0);
       // textureLoad(plane0, coords.xy, 0);
@@ -272,7 +272,7 @@
       plane_1_call = b.Call("textureLoad", "plane1", "coord", 0);
     } else {
       TINT_ICE(Transform, b.Diagnostics())
-          << "unhandled intrinsic: " << call_type;
+          << "unhandled builtin: " << call_type;
     }
 
     return {
@@ -343,7 +343,7 @@
           b.Param("params", b.ty.type_name(params_struct_sym))};
 
       ast::StatementList statementList =
-          createTexFnExtStatementList(sem::IntrinsicType::kTextureSampleLevel);
+          createTexFnExtStatementList(sem::BuiltinType::kTextureSampleLevel);
 
       b.Func(texture_sample_external_sym, varList, b.ty.vec4(b.ty.f32()),
              statementList, {});
@@ -386,7 +386,7 @@
           b.Param("params", b.ty.type_name(params_struct_sym))};
 
       ast::StatementList statement_list =
-          createTexFnExtStatementList(sem::IntrinsicType::kTextureLoad);
+          createTexFnExtStatementList(sem::BuiltinType::kTextureLoad);
 
       b.Func(texture_load_external_sym, var_list, b.ty.vec4(b.ty.f32()),
              statement_list, {});
diff --git a/src/transform/multiplanar_external_texture.h b/src/transform/multiplanar_external_texture.h
index ecbad65..caf55e8 100644
--- a/src/transform/multiplanar_external_texture.h
+++ b/src/transform/multiplanar_external_texture.h
@@ -20,7 +20,7 @@
 
 #include "src/ast/struct_member.h"
 #include "src/sem/binding_point.h"
-#include "src/sem/intrinsic_type.h"
+#include "src/sem/builtin_type.h"
 #include "src/transform/transform.h"
 
 namespace tint {
diff --git a/src/transform/remove_phonies.cc b/src/transform/remove_phonies.cc
index 06966b2..9555f0a 100644
--- a/src/transform/remove_phonies.cc
+++ b/src/transform/remove_phonies.cc
@@ -89,12 +89,12 @@
         if (!ast::TraverseExpressions(
                 stmt->rhs, ctx.dst->Diagnostics(),
                 [&](const ast::CallExpression* call) {
-                  // ast::CallExpression may map to a function or intrinsic call
+                  // ast::CallExpression may map to a function or builtin call
                   // (both may have side-effects), or a type constructor or
                   // type conversion (both do not have side effects).
                   if (sem.Get(call)
                           ->Target()
-                          ->IsAnyOf<sem::Function, sem::Intrinsic>()) {
+                          ->IsAnyOf<sem::Function, sem::Builtin>()) {
                     side_effects.push_back(call);
                     return ast::TraverseAction::Skip;
                   }
diff --git a/src/transform/renamer.cc b/src/transform/renamer.cc
index c793f86..0b49e6e 100644
--- a/src/transform/renamer.cc
+++ b/src/transform/renamer.cc
@@ -1257,7 +1257,7 @@
   // Disable auto-cloning of symbols, since we want to rename them.
   CloneContext ctx(&out, in, false);
 
-  // Swizzles, intrinsic calls and builtin structure members need to keep their
+  // Swizzles, builtin calls and builtin structure members need to keep their
   // symbols preserved.
   std::unordered_set<const ast::IdentifierExpression*> preserve;
   for (auto* node : in->ASTNodes().Objects()) {
@@ -1284,7 +1284,7 @@
             << "CallExpression has no semantic info";
         continue;
       }
-      if (sem->Target()->Is<sem::Intrinsic>()) {
+      if (sem->Target()->Is<sem::Builtin>()) {
         preserve.emplace(call->target.name);
       }
     }
diff --git a/src/transform/renamer_test.cc b/src/transform/renamer_test.cc
index 21982fb..328605e 100644
--- a/src/transform/renamer_test.cc
+++ b/src/transform/renamer_test.cc
@@ -118,7 +118,7 @@
   EXPECT_THAT(data->remappings, ContainerEq(expected_remappings));
 }
 
-TEST_F(RenamerTest, PreserveIntrinsics) {
+TEST_F(RenamerTest, PreserveBuiltins) {
   auto* src = R"(
 @stage(vertex)
 fn entry() -> @builtin(position) vec4<f32> {
@@ -666,20 +666,20 @@
                                          "VPOS",
                                          "VertexShader",
                                          "abort",
-                                         // "abs",  // WGSL intrinsic
-                                         // "acos",  // WGSL intrinsic
-                                         // "all",  // WGSL intrinsic
+                                         // "abs",  // WGSL builtin
+                                         // "acos",  // WGSL builtin
+                                         // "all",  // WGSL builtin
                                          "allow_uav_condition",
-                                         // "any",  // WGSL intrinsic
+                                         // "any",  // WGSL builtin
                                          "asdouble",
                                          "asfloat",
-                                         // "asin",  // WGSL intrinsic
+                                         // "asin",  // WGSL builtin
                                          "asint",
                                          // "asm",  // WGSL keyword
                                          "asm_fragment",
                                          "asuint",
-                                         // "atan",  // WGSL intrinsic
-                                         // "atan2",  // WGSL intrinsic
+                                         // "atan",  // WGSL builtin
+                                         // "atan2",  // WGSL builtin
                                          "auto",
                                          // "bool",  // WGSL keyword
                                          "bool1",
@@ -704,14 +704,14 @@
                                          "bool4x4",
                                          "branch",
                                          // "break",  // WGSL keyword
-                                         // "call",  // WGSL intrinsic
+                                         // "call",  // WGSL builtin
                                          // "case",  // WGSL keyword
                                          "catch",
                                          "cbuffer",
-                                         // "ceil",  // WGSL intrinsic
+                                         // "ceil",  // WGSL builtin
                                          "centroid",
                                          "char",
-                                         // "clamp",  // WGSL intrinsic
+                                         // "clamp",  // WGSL builtin
                                          "class",
                                          "clip",
                                          "column_major",
@@ -720,10 +720,10 @@
                                          // "const",  // WGSL keyword
                                          "const_cast",
                                          // "continue",  // WGSL keyword
-                                         // "cos",  // WGSL intrinsic
-                                         // "cosh",  // WGSL intrinsic
+                                         // "cos",  // WGSL builtin
+                                         // "cosh",  // WGSL builtin
                                          "countbits",
-                                         // "cross",  // WGSL intrinsic
+                                         // "cross",  // WGSL builtin
                                          "ddx",
                                          "ddx_coarse",
                                          "ddx_fine",
@@ -733,11 +733,11 @@
                                          // "default",  // WGSL keyword
                                          "degrees",
                                          "delete",
-                                         // "determinant",  // WGSL intrinsic
+                                         // "determinant",  // WGSL builtin
                                          // "discard",  // WGSL keyword
-                                         // "distance",  // WGSL intrinsic
+                                         // "distance",  // WGSL builtin
                                          // "do",  // WGSL keyword
-                                         // "dot",  // WGSL intrinsic
+                                         // "dot",  // WGSL builtin
                                          "double",
                                          "double1",
                                          "double1x1",
@@ -785,14 +785,14 @@
                                          // "else",  // WGSL keyword
                                          // "enum",  // WGSL keyword
                                          "errorf",
-                                         // "exp",  // WGSL intrinsic
-                                         // "exp2",  // WGSL intrinsic
+                                         // "exp",  // WGSL builtin
+                                         // "exp2",  // WGSL builtin
                                          "explicit",
                                          "export",
                                          "extern",
                                          "f16to32",
                                          "f32tof16",
-                                         // "faceforward",  // WGSL intrinsic
+                                         // "faceforward",  // WGSL builtin
                                          // "false",  // WGSL keyword
                                          "fastopt",
                                          "firstbithigh",
@@ -819,15 +819,15 @@
                                          "float4x2",
                                          "float4x3",
                                          "float4x4",
-                                         // "floor",  // WGSL intrinsic
-                                         // "fma",  // WGSL intrinsic
+                                         // "floor",  // WGSL builtin
+                                         // "fma",  // WGSL builtin
                                          "fmod",
                                          // "for",  // WGSL keyword
                                          "forcecase",
                                          "frac",
-                                         // "frexp",  // WGSL intrinsic
+                                         // "frexp",  // WGSL builtin
                                          "friend",
-                                         // "fwidth",  // WGSL intrinsic
+                                         // "fwidth",  // WGSL builtin
                                          "fxgroup",
                                          "goto",
                                          "groupshared",
@@ -881,22 +881,22 @@
                                          "isfinite",
                                          "isinf",
                                          "isnan",
-                                         // "ldexp",  // WGSL intrinsic
-                                         // "length",  // WGSL intrinsic
+                                         // "ldexp",  // WGSL builtin
+                                         // "length",  // WGSL builtin
                                          "lerp",
                                          "line",
                                          "lineadj",
                                          "linear",
                                          "lit",
-                                         // "log",  // WGSL intrinsic
+                                         // "log",  // WGSL builtin
                                          "log10",
-                                         // "log2",  // WGSL intrinsic
+                                         // "log2",  // WGSL builtin
                                          "long",
                                          // "loop",  // WGSL keyword
                                          "mad",
                                          "matrix",
-                                         // "max",  // WGSL intrinsic
-                                         // "min",  // WGSL intrinsic
+                                         // "max",  // WGSL builtin
+                                         // "min",  // WGSL builtin
                                          "min10float",
                                          "min10float1",
                                          "min10float1x1",
@@ -1002,7 +1002,7 @@
                                          "min16uint4x2",
                                          "min16uint4x3",
                                          "min16uint4x4",
-                                         // "modf",  // WGSL intrinsic
+                                         // "modf",  // WGSL builtin
                                          "msad4",
                                          "mul",
                                          "mutable",
@@ -1011,7 +1011,7 @@
                                          "nointerpolation",
                                          "noise",
                                          "noperspective",
-                                         // "normalize",  // WGSL intrinsic
+                                         // "normalize",  // WGSL builtin
                                          "numthreads",
                                          "operator",
                                          // "out",  // WGSL keyword
@@ -1020,7 +1020,7 @@
                                          "pixelfragment",
                                          "pixelshader",
                                          "point",
-                                         // "pow",  // WGSL intrinsic
+                                         // "pow",  // WGSL builtin
                                          "precise",
                                          "printf",
                                          // "private",  // WGSL keyword
@@ -1028,13 +1028,13 @@
                                          "public",
                                          "radians",
                                          "rcp",
-                                         // "reflect",  // WGSL intrinsic
+                                         // "reflect",  // WGSL builtin
                                          "refract",
                                          "register",
                                          "reinterpret_cast",
                                          // "return",  // WGSL keyword
-                                         // "reversebits",  // WGSL intrinsic
-                                         // "round",  // WGSL intrinsic
+                                         // "reversebits",  // WGSL builtin
+                                         // "round",  // WGSL builtin
                                          "row_major",
                                          "rsqrt",
                                          "sample",
@@ -1046,25 +1046,25 @@
                                          "saturate",
                                          "shared",
                                          "short",
-                                         // "sign",  // WGSL intrinsic
+                                         // "sign",  // WGSL builtin
                                          "signed",
-                                         // "sin",  // WGSL intrinsic
+                                         // "sin",  // WGSL builtin
                                          "sincos",
-                                         // "sinh",  // WGSL intrinsic
+                                         // "sinh",  // WGSL builtin
                                          "sizeof",
-                                         // "smoothstep",  // WGSL intrinsic
+                                         // "smoothstep",  // WGSL builtin
                                          "snorm",
-                                         // "sqrt",  // WGSL intrinsic
+                                         // "sqrt",  // WGSL builtin
                                          "stateblock",
                                          "stateblock_state",
                                          "static",
                                          "static_cast",
-                                         // "step",  // WGSL intrinsic
+                                         // "step",  // WGSL builtin
                                          "string",
                                          // "struct",  // WGSL keyword
                                          // "switch",  // WGSL keyword
-                                         // "tan",  // WGSL intrinsic
-                                         // "tanh",  // WGSL intrinsic
+                                         // "tan",  // WGSL builtin
+                                         // "tanh",  // WGSL builtin
                                          "tbuffer",
                                          "technique",
                                          "technique10",
@@ -1106,7 +1106,7 @@
                                          "triangle",
                                          "triangleadj",
                                          // "true",  // WGSL keyword
-                                         // "trunc",  // WGSL intrinsic
+                                         // "trunc",  // WGSL builtin
                                          "try",
                                          // "typedef",  // WGSL keyword
                                          "typename",
diff --git a/src/transform/robustness.cc b/src/transform/robustness.cc
index ae01845..577e88e 100644
--- a/src/transform/robustness.cc
+++ b/src/transform/robustness.cc
@@ -200,24 +200,24 @@
     return b.IndexAccessor(src, obj, idx.expr);
   }
 
-  /// @param type intrinsic type
-  /// @returns true if the given intrinsic is a texture function that requires
+  /// @param type builtin type
+  /// @returns true if the given builtin is a texture function that requires
   /// argument clamping,
-  bool TextureIntrinsicNeedsClamping(sem::IntrinsicType type) {
-    return type == sem::IntrinsicType::kTextureLoad ||
-           type == sem::IntrinsicType::kTextureStore;
+  bool TextureBuiltinNeedsClamping(sem::BuiltinType type) {
+    return type == sem::BuiltinType::kTextureLoad ||
+           type == sem::BuiltinType::kTextureStore;
   }
 
   /// Apply bounds clamping to the coordinates, array index and level arguments
-  /// of the `textureLoad()` and `textureStore()` intrinsics.
-  /// @param expr the intrinsic call expression
+  /// of the `textureLoad()` and `textureStore()` builtins.
+  /// @param expr the builtin call expression
   /// @return the clamped replacement call expression, or nullptr if `expr`
   /// should be cloned without changes.
   const ast::CallExpression* Transform(const ast::CallExpression* expr) {
     auto* call = ctx.src->Sem().Get(expr);
     auto* call_target = call->Target();
-    auto* intrinsic = call_target->As<sem::Intrinsic>();
-    if (!intrinsic || !TextureIntrinsicNeedsClamping(intrinsic->Type())) {
+    auto* builtin = call_target->As<sem::Builtin>();
+    if (!builtin || !TextureBuiltinNeedsClamping(builtin->Type())) {
       return nullptr;  // No transform, just clone.
     }
 
@@ -225,7 +225,7 @@
 
     // Indices of the mandatory texture and coords parameters, and the optional
     // array and level parameters.
-    auto& signature = intrinsic->Signature();
+    auto& signature = builtin->Signature();
     auto texture_idx = signature.IndexOf(sem::ParameterUsage::kTexture);
     auto coords_idx = signature.IndexOf(sem::ParameterUsage::kCoords);
     auto array_idx = signature.IndexOf(sem::ParameterUsage::kArrayIndex);
@@ -233,7 +233,7 @@
 
     auto* texture_arg = expr->args[texture_idx];
     auto* coords_arg = expr->args[coords_idx];
-    auto* coords_ty = intrinsic->Parameters()[coords_idx]->Type();
+    auto* coords_ty = builtin->Parameters()[coords_idx]->Type();
 
     // If the level is provided, then we need to clamp this. As the level is
     // used by textureDimensions() and the texture[Load|Store]() calls, we need
diff --git a/src/writer/glsl/generator_impl.cc b/src/writer/glsl/generator_impl.cc
index ab5cc4a..a5e8941 100644
--- a/src/writer/glsl/generator_impl.cc
+++ b/src/writer/glsl/generator_impl.cc
@@ -444,8 +444,8 @@
   if (auto* func = target->As<sem::Function>()) {
     return EmitFunctionCall(out, call, func);
   }
-  if (auto* intrinsic = target->As<sem::Intrinsic>()) {
-    return EmitIntrinsicCall(out, call, intrinsic);
+  if (auto* builtin = target->As<sem::Builtin>()) {
+    return EmitBuiltinCall(out, call, builtin);
   }
   if (auto* cast = target->As<sem::TypeConversion>()) {
     return EmitTypeConversion(out, call, cast);
@@ -501,47 +501,47 @@
   return true;
 }
 
-bool GeneratorImpl::EmitIntrinsicCall(std::ostream& out,
-                                      const sem::Call* call,
-                                      const sem::Intrinsic* intrinsic) {
+bool GeneratorImpl::EmitBuiltinCall(std::ostream& out,
+                                    const sem::Call* call,
+                                    const sem::Builtin* builtin) {
   auto* expr = call->Declaration();
-  if (intrinsic->IsTexture()) {
-    return EmitTextureCall(out, call, intrinsic);
+  if (builtin->IsTexture()) {
+    return EmitTextureCall(out, call, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kSelect) {
+  if (builtin->Type() == sem::BuiltinType::kSelect) {
     return EmitSelectCall(out, expr);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kDot) {
-    return EmitDotCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kDot) {
+    return EmitDotCall(out, expr, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kModf) {
-    return EmitModfCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kModf) {
+    return EmitModfCall(out, expr, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kFrexp) {
-    return EmitFrexpCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kFrexp) {
+    return EmitFrexpCall(out, expr, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kIsNormal) {
-    return EmitIsNormalCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kIsNormal) {
+    return EmitIsNormalCall(out, expr, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kDegrees) {
-    return EmitDegreesCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kDegrees) {
+    return EmitDegreesCall(out, expr, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kRadians) {
-    return EmitRadiansCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kRadians) {
+    return EmitRadiansCall(out, expr, builtin);
   }
-  if (intrinsic->IsDataPacking()) {
-    return EmitDataPackingCall(out, expr, intrinsic);
+  if (builtin->IsDataPacking()) {
+    return EmitDataPackingCall(out, expr, builtin);
   }
-  if (intrinsic->IsDataUnpacking()) {
-    return EmitDataUnpackingCall(out, expr, intrinsic);
+  if (builtin->IsDataUnpacking()) {
+    return EmitDataUnpackingCall(out, expr, builtin);
   }
-  if (intrinsic->IsBarrier()) {
-    return EmitBarrierCall(out, intrinsic);
+  if (builtin->IsBarrier()) {
+    return EmitBarrierCall(out, builtin);
   }
-  if (intrinsic->IsAtomic()) {
-    return EmitWorkgroupAtomicCall(out, expr, intrinsic);
+  if (builtin->IsAtomic()) {
+    return EmitWorkgroupAtomicCall(out, expr, builtin);
   }
-  auto name = generate_builtin_name(intrinsic);
+  auto name = generate_builtin_name(builtin);
   if (name.empty()) {
     return false;
   }
@@ -621,7 +621,7 @@
 
 bool GeneratorImpl::EmitWorkgroupAtomicCall(std::ostream& out,
                                             const ast::CallExpression* expr,
-                                            const sem::Intrinsic* intrinsic) {
+                                            const sem::Builtin* builtin) {
   auto call = [&](const char* name) {
     out << name;
     {
@@ -639,8 +639,8 @@
     return true;
   };
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kAtomicLoad: {
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kAtomicLoad: {
       // GLSL does not have an atomicLoad, so we emulate it with
       // atomicOr using 0 as the OR value
       out << "atomicOr";
@@ -650,19 +650,19 @@
           return false;
         }
         out << ", 0";
-        if (intrinsic->ReturnType()->Is<sem::U32>()) {
+        if (builtin->ReturnType()->Is<sem::U32>()) {
           out << "u";
         }
       }
       return true;
     }
-    case sem::IntrinsicType::kAtomicCompareExchangeWeak: {
-      return CallIntrinsicHelper(
-          out, expr, intrinsic,
+    case sem::BuiltinType::kAtomicCompareExchangeWeak: {
+      return CallBuiltinHelper(
+          out, expr, builtin,
           [&](TextBuffer* b, const std::vector<std::string>& params) {
             {
               auto pre = line(b);
-              if (!EmitTypeAndName(pre, intrinsic->ReturnType(),
+              if (!EmitTypeAndName(pre, builtin->ReturnType(),
                                    ast::StorageClass::kNone,
                                    ast::Access::kUndefined, "result")) {
                 return false;
@@ -694,27 +694,27 @@
           });
     }
 
-    case sem::IntrinsicType::kAtomicAdd:
-    case sem::IntrinsicType::kAtomicSub:
+    case sem::BuiltinType::kAtomicAdd:
+    case sem::BuiltinType::kAtomicSub:
       return call("atomicAdd");
 
-    case sem::IntrinsicType::kAtomicMax:
+    case sem::BuiltinType::kAtomicMax:
       return call("atomicMax");
 
-    case sem::IntrinsicType::kAtomicMin:
+    case sem::BuiltinType::kAtomicMin:
       return call("atomicMin");
 
-    case sem::IntrinsicType::kAtomicAnd:
+    case sem::BuiltinType::kAtomicAnd:
       return call("atomicAnd");
 
-    case sem::IntrinsicType::kAtomicOr:
+    case sem::BuiltinType::kAtomicOr:
       return call("atomicOr");
 
-    case sem::IntrinsicType::kAtomicXor:
+    case sem::BuiltinType::kAtomicXor:
       return call("atomicXor");
 
-    case sem::IntrinsicType::kAtomicExchange:
-    case sem::IntrinsicType::kAtomicStore:
+    case sem::BuiltinType::kAtomicExchange:
+    case sem::BuiltinType::kAtomicStore:
       // GLSL does not have an atomicStore, so we emulate it with
       // atomicExchange.
       return call("atomicExchange");
@@ -724,7 +724,7 @@
   }
 
   TINT_UNREACHABLE(Writer, diagnostics_)
-      << "unsupported atomic intrinsic: " << intrinsic->Type();
+      << "unsupported atomic builtin: " << builtin->Type();
   return false;
 }
 
@@ -755,8 +755,8 @@
 
 bool GeneratorImpl::EmitDotCall(std::ostream& out,
                                 const ast::CallExpression* expr,
-                                const sem::Intrinsic* intrinsic) {
-  auto* vec_ty = intrinsic->Parameters()[0]->Type()->As<sem::Vector>();
+                                const sem::Builtin* builtin) {
+  auto* vec_ty = builtin->Parameters()[0]->Type()->As<sem::Vector>();
   std::string fn = "dot";
   if (vec_ty->type()->is_integer_scalar()) {
     // GLSL does not have a builtin for dot() with integer vector types.
@@ -827,12 +827,12 @@
 
 bool GeneratorImpl::EmitModfCall(std::ostream& out,
                                  const ast::CallExpression* expr,
-                                 const sem::Intrinsic* intrinsic) {
+                                 const sem::Builtin* builtin) {
   if (expr->args.size() == 1) {
-    return CallIntrinsicHelper(
-        out, expr, intrinsic,
+    return CallBuiltinHelper(
+        out, expr, builtin,
         [&](TextBuffer* b, const std::vector<std::string>& params) {
-          auto* ty = intrinsic->Parameters()[0]->Type();
+          auto* ty = builtin->Parameters()[0]->Type();
           auto in = params[0];
 
           std::string width;
@@ -843,7 +843,7 @@
           // Emit the builtin return type unique to this overload. This does not
           // exist in the AST, so it will not be generated in Generate().
           if (!EmitStructType(&helpers_,
-                              intrinsic->ReturnType()->As<sem::Struct>())) {
+                              builtin->ReturnType()->As<sem::Struct>())) {
             return false;
           }
 
@@ -851,7 +851,7 @@
           line(b) << "float" << width << " fract = modf(" << in << ", whole);";
           {
             auto l = line(b);
-            if (!EmitType(l, intrinsic->ReturnType(), ast::StorageClass::kNone,
+            if (!EmitType(l, builtin->ReturnType(), ast::StorageClass::kNone,
                           ast::Access::kUndefined, "")) {
               return false;
             }
@@ -877,12 +877,12 @@
 
 bool GeneratorImpl::EmitFrexpCall(std::ostream& out,
                                   const ast::CallExpression* expr,
-                                  const sem::Intrinsic* intrinsic) {
+                                  const sem::Builtin* builtin) {
   if (expr->args.size() == 1) {
-    return CallIntrinsicHelper(
-        out, expr, intrinsic,
+    return CallBuiltinHelper(
+        out, expr, builtin,
         [&](TextBuffer* b, const std::vector<std::string>& params) {
-          auto* ty = intrinsic->Parameters()[0]->Type();
+          auto* ty = builtin->Parameters()[0]->Type();
           auto in = params[0];
 
           std::string width;
@@ -893,7 +893,7 @@
           // Emit the builtin return type unique to this overload. This does not
           // exist in the AST, so it will not be generated in Generate().
           if (!EmitStructType(&helpers_,
-                              intrinsic->ReturnType()->As<sem::Struct>())) {
+                              builtin->ReturnType()->As<sem::Struct>())) {
             return false;
           }
 
@@ -901,7 +901,7 @@
           line(b) << "float" << width << " sig = frexp(" << in << ", exp);";
           {
             auto l = line(b);
-            if (!EmitType(l, intrinsic->ReturnType(), ast::StorageClass::kNone,
+            if (!EmitType(l, builtin->ReturnType(), ast::StorageClass::kNone,
                           ast::Access::kUndefined, "")) {
               return false;
             }
@@ -914,12 +914,12 @@
   // DEPRECATED
   // Exponent is an integer in WGSL, but HLSL wants a float.
   // We need to make the call with a temporary float, and then cast.
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
-        auto* significand_ty = intrinsic->Parameters()[0]->Type();
+        auto* significand_ty = builtin->Parameters()[0]->Type();
         auto significand = params[0];
-        auto* exponent_ty = intrinsic->Parameters()[1]->Type();
+        auto* exponent_ty = builtin->Parameters()[1]->Type();
         auto exponent = params[1];
 
         std::string width;
@@ -948,12 +948,12 @@
 
 bool GeneratorImpl::EmitIsNormalCall(std::ostream& out,
                                      const ast::CallExpression* expr,
-                                     const sem::Intrinsic* intrinsic) {
-  // GLSL doesn't have a isNormal intrinsic, we need to emulate
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                     const sem::Builtin* builtin) {
+  // GLSL doesn't have a isNormal builtin, we need to emulate
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
-        auto* input_ty = intrinsic->Parameters()[0]->Type();
+        auto* input_ty = builtin->Parameters()[0]->Type();
 
         std::string width;
         if (auto* vec = input_ty->As<sem::Vector>()) {
@@ -976,9 +976,9 @@
 
 bool GeneratorImpl::EmitDegreesCall(std::ostream& out,
                                     const ast::CallExpression* expr,
-                                    const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                    const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
         line(b) << "return " << params[0] << " * " << std::setprecision(20)
                 << sem::kRadToDeg << ";";
@@ -988,9 +988,9 @@
 
 bool GeneratorImpl::EmitRadiansCall(std::ostream& out,
                                     const ast::CallExpression* expr,
-                                    const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                    const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
         line(b) << "return " << params[0] << " * " << std::setprecision(20)
                 << sem::kDegToRad << ";";
@@ -1000,28 +1000,28 @@
 
 bool GeneratorImpl::EmitDataPackingCall(std::ostream& out,
                                         const ast::CallExpression* expr,
-                                        const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                        const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
         uint32_t dims = 2;
         bool is_signed = false;
         uint32_t scale = 65535;
-        if (intrinsic->Type() == sem::IntrinsicType::kPack4x8snorm ||
-            intrinsic->Type() == sem::IntrinsicType::kPack4x8unorm) {
+        if (builtin->Type() == sem::BuiltinType::kPack4x8snorm ||
+            builtin->Type() == sem::BuiltinType::kPack4x8unorm) {
           dims = 4;
           scale = 255;
         }
-        if (intrinsic->Type() == sem::IntrinsicType::kPack4x8snorm ||
-            intrinsic->Type() == sem::IntrinsicType::kPack2x16snorm) {
+        if (builtin->Type() == sem::BuiltinType::kPack4x8snorm ||
+            builtin->Type() == sem::BuiltinType::kPack2x16snorm) {
           is_signed = true;
           scale = (scale - 1) / 2;
         }
-        switch (intrinsic->Type()) {
-          case sem::IntrinsicType::kPack4x8snorm:
-          case sem::IntrinsicType::kPack4x8unorm:
-          case sem::IntrinsicType::kPack2x16snorm:
-          case sem::IntrinsicType::kPack2x16unorm: {
+        switch (builtin->Type()) {
+          case sem::BuiltinType::kPack4x8snorm:
+          case sem::BuiltinType::kPack4x8unorm:
+          case sem::BuiltinType::kPack2x16snorm:
+          case sem::BuiltinType::kPack2x16unorm: {
             {
               auto l = line(b);
               l << (is_signed ? "" : "u") << "int" << dims
@@ -1048,7 +1048,7 @@
             }
             break;
           }
-          case sem::IntrinsicType::kPack2x16float: {
+          case sem::BuiltinType::kPack2x16float: {
             line(b) << "uint2 i = f32tof16(" << params[0] << ");";
             line(b) << "return i.x | (i.y << 16);";
             break;
@@ -1056,7 +1056,7 @@
           default:
             diagnostics_.add_error(
                 diag::System::Writer,
-                "Internal error: unhandled data packing intrinsic");
+                "Internal error: unhandled data packing builtin");
             return false;
         }
 
@@ -1066,26 +1066,26 @@
 
 bool GeneratorImpl::EmitDataUnpackingCall(std::ostream& out,
                                           const ast::CallExpression* expr,
-                                          const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                          const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
         uint32_t dims = 2;
         bool is_signed = false;
         uint32_t scale = 65535;
-        if (intrinsic->Type() == sem::IntrinsicType::kUnpack4x8snorm ||
-            intrinsic->Type() == sem::IntrinsicType::kUnpack4x8unorm) {
+        if (builtin->Type() == sem::BuiltinType::kUnpack4x8snorm ||
+            builtin->Type() == sem::BuiltinType::kUnpack4x8unorm) {
           dims = 4;
           scale = 255;
         }
-        if (intrinsic->Type() == sem::IntrinsicType::kUnpack4x8snorm ||
-            intrinsic->Type() == sem::IntrinsicType::kUnpack2x16snorm) {
+        if (builtin->Type() == sem::BuiltinType::kUnpack4x8snorm ||
+            builtin->Type() == sem::BuiltinType::kUnpack2x16snorm) {
           is_signed = true;
           scale = (scale - 1) / 2;
         }
-        switch (intrinsic->Type()) {
-          case sem::IntrinsicType::kUnpack4x8snorm:
-          case sem::IntrinsicType::kUnpack2x16snorm: {
+        switch (builtin->Type()) {
+          case sem::BuiltinType::kUnpack4x8snorm:
+          case sem::BuiltinType::kUnpack2x16snorm: {
             line(b) << "int j = int(" << params[0] << ");";
             {  // Perform sign extension on the converted values.
               auto l = line(b);
@@ -1101,8 +1101,8 @@
                     << ".0, " << (is_signed ? "-1.0" : "0.0") << ", 1.0);";
             break;
           }
-          case sem::IntrinsicType::kUnpack4x8unorm:
-          case sem::IntrinsicType::kUnpack2x16unorm: {
+          case sem::BuiltinType::kUnpack4x8unorm:
+          case sem::BuiltinType::kUnpack2x16unorm: {
             line(b) << "uint j = " << params[0] << ";";
             {
               auto l = line(b);
@@ -1119,14 +1119,14 @@
             line(b) << "return float" << dims << "(i) / " << scale << ".0;";
             break;
           }
-          case sem::IntrinsicType::kUnpack2x16float:
+          case sem::BuiltinType::kUnpack2x16float:
             line(b) << "uint i = " << params[0] << ";";
             line(b) << "return f16tof32(uint2(i & 0xffff, i >> 16));";
             break;
           default:
             diagnostics_.add_error(
                 diag::System::Writer,
-                "Internal error: unhandled data packing intrinsic");
+                "Internal error: unhandled data packing builtin");
             return false;
         }
 
@@ -1135,16 +1135,16 @@
 }
 
 bool GeneratorImpl::EmitBarrierCall(std::ostream& out,
-                                    const sem::Intrinsic* intrinsic) {
+                                    const sem::Builtin* builtin) {
   // TODO(crbug.com/tint/661): Combine sequential barriers to a single
   // instruction.
-  if (intrinsic->Type() == sem::IntrinsicType::kWorkgroupBarrier) {
+  if (builtin->Type() == sem::BuiltinType::kWorkgroupBarrier) {
     out << "memoryBarrierShared()";
-  } else if (intrinsic->Type() == sem::IntrinsicType::kStorageBarrier) {
+  } else if (builtin->Type() == sem::BuiltinType::kStorageBarrier) {
     out << "memoryBarrierBuffer()";
   } else {
     TINT_UNREACHABLE(Writer, diagnostics_)
-        << "unexpected barrier intrinsic type " << sem::str(intrinsic->Type());
+        << "unexpected barrier builtin type " << sem::str(builtin->Type());
     return false;
   }
   return true;
@@ -1152,10 +1152,10 @@
 
 bool GeneratorImpl::EmitTextureCall(std::ostream& out,
                                     const sem::Call* call,
-                                    const sem::Intrinsic* intrinsic) {
+                                    const sem::Builtin* builtin) {
   using Usage = sem::ParameterUsage;
 
-  auto& signature = intrinsic->Signature();
+  auto& signature = builtin->Signature();
   auto* expr = call->Declaration();
   auto arguments = expr->args;
 
@@ -1173,8 +1173,8 @@
 
   auto* texture_type = TypeOf(texture)->UnwrapRef()->As<sem::Texture>();
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kTextureDimensions: {
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kTextureDimensions: {
       if (texture_type->Is<sem::StorageTexture>()) {
         out << "imageSize(";
       } else {
@@ -1207,8 +1207,8 @@
       return true;
     }
     // TODO(senorblanco): determine if this works for array textures
-    case sem::IntrinsicType::kTextureNumLayers:
-    case sem::IntrinsicType::kTextureNumLevels: {
+    case sem::BuiltinType::kTextureNumLayers:
+    case sem::BuiltinType::kTextureNumLevels: {
       out << "textureQueryLevels(";
       if (!EmitExpression(out, texture)) {
         return false;
@@ -1216,7 +1216,7 @@
       out << ");";
       return true;
     }
-    case sem::IntrinsicType::kTextureNumSamples: {
+    case sem::BuiltinType::kTextureNumSamples: {
       out << "textureSamples(";
       if (!EmitExpression(out, texture)) {
         return false;
@@ -1231,44 +1231,44 @@
   uint32_t glsl_ret_width = 4u;
   bool is_depth = texture_type->Is<sem::DepthTexture>();
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kTextureSample:
-    case sem::IntrinsicType::kTextureSampleBias:
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kTextureSample:
+    case sem::BuiltinType::kTextureSampleBias:
       out << "texture";
       if (is_depth) {
         glsl_ret_width = 1u;
       }
       break;
-    case sem::IntrinsicType::kTextureSampleLevel:
+    case sem::BuiltinType::kTextureSampleLevel:
       out << "textureLod";
       break;
-    case sem::IntrinsicType::kTextureGather:
-    case sem::IntrinsicType::kTextureGatherCompare:
+    case sem::BuiltinType::kTextureGather:
+    case sem::BuiltinType::kTextureGatherCompare:
       out << "textureGather";
       break;
-    case sem::IntrinsicType::kTextureSampleGrad:
+    case sem::BuiltinType::kTextureSampleGrad:
       out << "textureGrad";
       break;
-    case sem::IntrinsicType::kTextureSampleCompare:
-    case sem::IntrinsicType::kTextureSampleCompareLevel:
+    case sem::BuiltinType::kTextureSampleCompare:
+    case sem::BuiltinType::kTextureSampleCompareLevel:
       out << "texture";
       glsl_ret_width = 1;
       break;
-    case sem::IntrinsicType::kTextureLoad:
+    case sem::BuiltinType::kTextureLoad:
       out << "texelFetch";
       break;
-    case sem::IntrinsicType::kTextureStore:
+    case sem::BuiltinType::kTextureStore:
       out << "imageStore";
       break;
     default:
       diagnostics_.add_error(
           diag::System::Writer,
-          "Internal compiler error: Unhandled texture intrinsic '" +
-              std::string(intrinsic->str()) + "'");
+          "Internal compiler error: Unhandled texture builtin '" +
+              std::string(builtin->str()) + "'");
       return false;
   }
 
-  if (intrinsic->Signature().IndexOf(sem::ParameterUsage::kOffset) >= 0) {
+  if (builtin->Signature().IndexOf(sem::ParameterUsage::kOffset) >= 0) {
     out << "Offset";
   }
 
@@ -1299,7 +1299,7 @@
     if (auto* depth_ref = arg(Usage::kDepthRef)) {
       param_coords =
           AppendVector(&builder_, param_coords, depth_ref)->Declaration();
-    } else if (intrinsic->Type() == sem::IntrinsicType::kTextureSample) {
+    } else if (builtin->Type() == sem::BuiltinType::kTextureSample) {
       // Sampling a depth texture in GLSL always requires a depth reference, so
       // append zero here.
       auto* f32 = builder_.create<sem::F32>();
@@ -1327,7 +1327,7 @@
   }
 
   // GLSL's textureGather always requires a refZ parameter.
-  if (is_depth && intrinsic->Type() == sem::IntrinsicType::kTextureGather) {
+  if (is_depth && builtin->Type() == sem::BuiltinType::kTextureGather) {
     out << ", 0.0";
   }
 
@@ -1347,21 +1347,21 @@
       if (!EmitExpression(out, e)) {
         return false;
       }
-    } else if (intrinsic->Type() == sem::IntrinsicType::kTextureSample) {
+    } else if (builtin->Type() == sem::BuiltinType::kTextureSample) {
       out << ", 0.0f";
     }
   }
 
   out << ")";
 
-  if (intrinsic->ReturnType()->Is<sem::Void>()) {
+  if (builtin->ReturnType()->Is<sem::Void>()) {
     return true;
   }
-  // If the intrinsic return type does not match the number of elements of the
-  // GLSL intrinsic, we need to swizzle the expression to generate the correct
+  // If the builtin return type does not match the number of elements of the
+  // GLSL builtin, we need to swizzle the expression to generate the correct
   // number of components.
   uint32_t wgsl_ret_width = 1;
-  if (auto* vec = intrinsic->ReturnType()->As<sem::Vector>()) {
+  if (auto* vec = builtin->ReturnType()->As<sem::Vector>()) {
     wgsl_ret_width = vec->Width();
   }
   if (wgsl_ret_width < glsl_ret_width) {
@@ -1374,100 +1374,99 @@
     TINT_ICE(Writer, diagnostics_)
         << "WGSL return width (" << wgsl_ret_width
         << ") is wider than GLSL return width (" << glsl_ret_width << ") for "
-        << intrinsic->Type();
+        << builtin->Type();
     return false;
   }
 
   return true;
 }
 
-std::string GeneratorImpl::generate_builtin_name(
-    const sem::Intrinsic* intrinsic) {
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kAbs:
-    case sem::IntrinsicType::kAcos:
-    case sem::IntrinsicType::kAll:
-    case sem::IntrinsicType::kAny:
-    case sem::IntrinsicType::kAsin:
-    case sem::IntrinsicType::kAtan:
-    case sem::IntrinsicType::kCeil:
-    case sem::IntrinsicType::kClamp:
-    case sem::IntrinsicType::kCos:
-    case sem::IntrinsicType::kCosh:
-    case sem::IntrinsicType::kCross:
-    case sem::IntrinsicType::kDeterminant:
-    case sem::IntrinsicType::kDistance:
-    case sem::IntrinsicType::kDot:
-    case sem::IntrinsicType::kExp:
-    case sem::IntrinsicType::kExp2:
-    case sem::IntrinsicType::kFloor:
-    case sem::IntrinsicType::kFrexp:
-    case sem::IntrinsicType::kLdexp:
-    case sem::IntrinsicType::kLength:
-    case sem::IntrinsicType::kLog:
-    case sem::IntrinsicType::kLog2:
-    case sem::IntrinsicType::kMax:
-    case sem::IntrinsicType::kMin:
-    case sem::IntrinsicType::kModf:
-    case sem::IntrinsicType::kNormalize:
-    case sem::IntrinsicType::kPow:
-    case sem::IntrinsicType::kReflect:
-    case sem::IntrinsicType::kRefract:
-    case sem::IntrinsicType::kRound:
-    case sem::IntrinsicType::kSign:
-    case sem::IntrinsicType::kSin:
-    case sem::IntrinsicType::kSinh:
-    case sem::IntrinsicType::kSqrt:
-    case sem::IntrinsicType::kStep:
-    case sem::IntrinsicType::kTan:
-    case sem::IntrinsicType::kTanh:
-    case sem::IntrinsicType::kTranspose:
-    case sem::IntrinsicType::kTrunc:
-      return intrinsic->str();
-    case sem::IntrinsicType::kAtan2:
+std::string GeneratorImpl::generate_builtin_name(const sem::Builtin* builtin) {
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kAbs:
+    case sem::BuiltinType::kAcos:
+    case sem::BuiltinType::kAll:
+    case sem::BuiltinType::kAny:
+    case sem::BuiltinType::kAsin:
+    case sem::BuiltinType::kAtan:
+    case sem::BuiltinType::kCeil:
+    case sem::BuiltinType::kClamp:
+    case sem::BuiltinType::kCos:
+    case sem::BuiltinType::kCosh:
+    case sem::BuiltinType::kCross:
+    case sem::BuiltinType::kDeterminant:
+    case sem::BuiltinType::kDistance:
+    case sem::BuiltinType::kDot:
+    case sem::BuiltinType::kExp:
+    case sem::BuiltinType::kExp2:
+    case sem::BuiltinType::kFloor:
+    case sem::BuiltinType::kFrexp:
+    case sem::BuiltinType::kLdexp:
+    case sem::BuiltinType::kLength:
+    case sem::BuiltinType::kLog:
+    case sem::BuiltinType::kLog2:
+    case sem::BuiltinType::kMax:
+    case sem::BuiltinType::kMin:
+    case sem::BuiltinType::kModf:
+    case sem::BuiltinType::kNormalize:
+    case sem::BuiltinType::kPow:
+    case sem::BuiltinType::kReflect:
+    case sem::BuiltinType::kRefract:
+    case sem::BuiltinType::kRound:
+    case sem::BuiltinType::kSign:
+    case sem::BuiltinType::kSin:
+    case sem::BuiltinType::kSinh:
+    case sem::BuiltinType::kSqrt:
+    case sem::BuiltinType::kStep:
+    case sem::BuiltinType::kTan:
+    case sem::BuiltinType::kTanh:
+    case sem::BuiltinType::kTranspose:
+    case sem::BuiltinType::kTrunc:
+      return builtin->str();
+    case sem::BuiltinType::kAtan2:
       return "atan";
-    case sem::IntrinsicType::kCountOneBits:
+    case sem::BuiltinType::kCountOneBits:
       return "countbits";
-    case sem::IntrinsicType::kDpdx:
+    case sem::BuiltinType::kDpdx:
       return "ddx";
-    case sem::IntrinsicType::kDpdxCoarse:
+    case sem::BuiltinType::kDpdxCoarse:
       return "ddx_coarse";
-    case sem::IntrinsicType::kDpdxFine:
+    case sem::BuiltinType::kDpdxFine:
       return "ddx_fine";
-    case sem::IntrinsicType::kDpdy:
+    case sem::BuiltinType::kDpdy:
       return "ddy";
-    case sem::IntrinsicType::kDpdyCoarse:
+    case sem::BuiltinType::kDpdyCoarse:
       return "ddy_coarse";
-    case sem::IntrinsicType::kDpdyFine:
+    case sem::BuiltinType::kDpdyFine:
       return "ddy_fine";
-    case sem::IntrinsicType::kFaceForward:
+    case sem::BuiltinType::kFaceForward:
       return "faceforward";
-    case sem::IntrinsicType::kFract:
+    case sem::BuiltinType::kFract:
       return "frac";
-    case sem::IntrinsicType::kFma:
+    case sem::BuiltinType::kFma:
       return "mad";
-    case sem::IntrinsicType::kFwidth:
-    case sem::IntrinsicType::kFwidthCoarse:
-    case sem::IntrinsicType::kFwidthFine:
+    case sem::BuiltinType::kFwidth:
+    case sem::BuiltinType::kFwidthCoarse:
+    case sem::BuiltinType::kFwidthFine:
       return "fwidth";
-    case sem::IntrinsicType::kInverseSqrt:
+    case sem::BuiltinType::kInverseSqrt:
       return "rsqrt";
-    case sem::IntrinsicType::kIsFinite:
+    case sem::BuiltinType::kIsFinite:
       return "isfinite";
-    case sem::IntrinsicType::kIsInf:
+    case sem::BuiltinType::kIsInf:
       return "isinf";
-    case sem::IntrinsicType::kIsNan:
+    case sem::BuiltinType::kIsNan:
       return "isnan";
-    case sem::IntrinsicType::kMix:
+    case sem::BuiltinType::kMix:
       return "mix";
-    case sem::IntrinsicType::kReverseBits:
+    case sem::BuiltinType::kReverseBits:
       return "reversebits";
-    case sem::IntrinsicType::kSmoothStep:
+    case sem::BuiltinType::kSmoothStep:
       return "smoothstep";
     default:
       diagnostics_.add_error(
           diag::System::Writer,
-          "Unknown builtin method: " + std::string(intrinsic->str()));
+          "Unknown builtin method: " + std::string(builtin->str()));
   }
 
   return "";
@@ -2624,28 +2623,28 @@
 }
 
 template <typename F>
-bool GeneratorImpl::CallIntrinsicHelper(std::ostream& out,
-                                        const ast::CallExpression* call,
-                                        const sem::Intrinsic* intrinsic,
-                                        F&& build) {
+bool GeneratorImpl::CallBuiltinHelper(std::ostream& out,
+                                      const ast::CallExpression* call,
+                                      const sem::Builtin* builtin,
+                                      F&& build) {
   // Generate the helper function if it hasn't been created already
-  auto fn = utils::GetOrCreate(intrinsics_, intrinsic, [&]() -> std::string {
+  auto fn = utils::GetOrCreate(builtins_, builtin, [&]() -> std::string {
     TextBuffer b;
     TINT_DEFER(helpers_.Append(b));
 
     auto fn_name =
-        UniqueIdentifier(std::string("tint_") + sem::str(intrinsic->Type()));
+        UniqueIdentifier(std::string("tint_") + sem::str(builtin->Type()));
     std::vector<std::string> parameter_names;
     {
       auto decl = line(&b);
-      if (!EmitTypeAndName(decl, intrinsic->ReturnType(),
+      if (!EmitTypeAndName(decl, builtin->ReturnType(),
                            ast::StorageClass::kNone, ast::Access::kUndefined,
                            fn_name)) {
         return "";
       }
       {
         ScopedParen sp(decl);
-        for (auto* param : intrinsic->Parameters()) {
+        for (auto* param : builtin->Parameters()) {
           if (!parameter_names.empty()) {
             decl << ", ";
           }
diff --git a/src/writer/glsl/generator_impl.h b/src/writer/glsl/generator_impl.h
index f48b5d6..9bdba66 100644
--- a/src/writer/glsl/generator_impl.h
+++ b/src/writer/glsl/generator_impl.h
@@ -42,7 +42,7 @@
 // Forward declarations
 namespace sem {
 class Call;
-class Intrinsic;
+class Builtin;
 class TypeConstructor;
 class TypeConversion;
 }  // namespace sem
@@ -116,14 +116,14 @@
   bool EmitFunctionCall(std::ostream& out,
                         const sem::Call* call,
                         const sem::Function* function);
-  /// Handles generating an intrinsic call expression
+  /// Handles generating a builtin call expression
   /// @param out the output of the expression stream
   /// @param call the call expression
-  /// @param intrinsic the intrinsic being called
+  /// @param builtin the builtin being called
   /// @returns true if the expression is emitted
-  bool EmitIntrinsicCall(std::ostream& out,
-                         const sem::Call* call,
-                         const sem::Intrinsic* intrinsic);
+  bool EmitBuiltinCall(std::ostream& out,
+                       const sem::Call* call,
+                       const sem::Builtin* builtin);
   /// Handles generating a type conversion expression
   /// @param out the output of the expression stream
   /// @param call the call expression
@@ -140,11 +140,11 @@
   bool EmitTypeConstructor(std::ostream& out,
                            const sem::Call* call,
                            const sem::TypeConstructor* ctor);
-  /// Handles generating a barrier intrinsic call
+  /// Handles generating a barrier builtin call
   /// @param out the output of the expression stream
-  /// @param intrinsic the semantic information for the barrier intrinsic
+  /// @param builtin the semantic information for the barrier builtin
   /// @returns true if the call expression is emitted
-  bool EmitBarrierCall(std::ostream& out, const sem::Intrinsic* intrinsic);
+  bool EmitBarrierCall(std::ostream& out, const sem::Builtin* builtin);
   /// Handles generating an atomic intrinsic call for a storage buffer variable
   /// @param out the output of the expression stream
   /// @param expr the call expression
@@ -154,92 +154,92 @@
       std::ostream& out,
       const ast::CallExpression* expr,
       const transform::DecomposeMemoryAccess::Intrinsic* intrinsic);
-  /// Handles generating an atomic intrinsic call for a workgroup variable
+  /// Handles generating an atomic builtin call for a workgroup variable
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the atomic intrinsic
+  /// @param builtin the semantic information for the atomic builtin
   /// @returns true if the call expression is emitted
   bool EmitWorkgroupAtomicCall(std::ostream& out,
                                const ast::CallExpression* expr,
-                               const sem::Intrinsic* intrinsic);
+                               const sem::Builtin* builtin);
   /// Handles generating a call to a texture function (`textureSample`,
   /// `textureSampleGrad`, etc)
   /// @param out the output of the expression stream
   /// @param call the call expression
-  /// @param intrinsic the semantic information for the texture intrinsic
+  /// @param builtin the semantic information for the texture builtin
   /// @returns true if the call expression is emitted
   bool EmitTextureCall(std::ostream& out,
                        const sem::Call* call,
-                       const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `select()` intrinsic
+                       const sem::Builtin* builtin);
+  /// Handles generating a call to the `select()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
   /// @returns true if the call expression is emitted
   bool EmitSelectCall(std::ostream& out, const ast::CallExpression* expr);
-  /// Handles generating a call to the `dot()` intrinsic
+  /// Handles generating a call to the `dot()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitDotCall(std::ostream& out,
                    const ast::CallExpression* expr,
-                   const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `modf()` intrinsic
+                   const sem::Builtin* builtin);
+  /// Handles generating a call to the `modf()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitModfCall(std::ostream& out,
                     const ast::CallExpression* expr,
-                    const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `frexp()` intrinsic
+                    const sem::Builtin* builtin);
+  /// Handles generating a call to the `frexp()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitFrexpCall(std::ostream& out,
                      const ast::CallExpression* expr,
-                     const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `isNormal()` intrinsic
+                     const sem::Builtin* builtin);
+  /// Handles generating a call to the `isNormal()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitIsNormalCall(std::ostream& out,
                         const ast::CallExpression* expr,
-                        const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `degrees()` intrinsic
+                        const sem::Builtin* builtin);
+  /// Handles generating a call to the `degrees()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitDegreesCall(std::ostream& out,
                        const ast::CallExpression* expr,
-                       const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `radians()` intrinsic
+                       const sem::Builtin* builtin);
+  /// Handles generating a call to the `radians()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitRadiansCall(std::ostream& out,
                        const ast::CallExpression* expr,
-                       const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to data packing intrinsic
+                       const sem::Builtin* builtin);
+  /// Handles generating a call to data packing builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the texture intrinsic
+  /// @param builtin the semantic information for the texture builtin
   /// @returns true if the call expression is emitted
   bool EmitDataPackingCall(std::ostream& out,
                            const ast::CallExpression* expr,
-                           const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to data unpacking intrinsic
+                           const sem::Builtin* builtin);
+  /// Handles generating a call to data unpacking builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the texture intrinsic
+  /// @param builtin the semantic information for the texture builtin
   /// @returns true if the call expression is emitted
   bool EmitDataUnpackingCall(std::ostream& out,
                              const ast::CallExpression* expr,
-                             const sem::Intrinsic* intrinsic);
+                             const sem::Builtin* builtin);
   /// Handles a case statement
   /// @param stmt the statement
   /// @returns true if the statement was emitted successfully
@@ -407,9 +407,9 @@
   /// @returns true if the variable was emitted
   bool EmitProgramConstVariable(const ast::Variable* var);
   /// Handles generating a builtin method name
-  /// @param intrinsic the semantic info for the intrinsic
+  /// @param builtin the semantic info for the builtin
   /// @returns the name or "" if not valid
-  std::string generate_builtin_name(const sem::Intrinsic* intrinsic);
+  std::string generate_builtin_name(const sem::Builtin* builtin);
   /// Converts a builtin to a gl_ string
   /// @param builtin the builtin to convert
   /// @param stage pipeline stage in which this builtin is used
@@ -444,13 +444,13 @@
     };
   };
 
-  /// CallIntrinsicHelper will call the intrinsic helper function, creating it
-  /// if it hasn't been built already. If the intrinsic needs to be built then
-  /// CallIntrinsicHelper will generate the function signature and will call
+  /// CallBuiltinHelper will call the builtin helper function, creating it
+  /// if it hasn't been built already. If the builtin needs to be built then
+  /// CallBuiltinHelper will generate the function signature and will call
   /// `build` to emit the body of the function.
   /// @param out the output of the expression stream
   /// @param call the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @param build a function with the signature:
   ///        `bool(TextBuffer* buffer, const std::vector<std::string>& params)`
   ///        Where:
@@ -458,16 +458,16 @@
   ///          `params` is the name of all the generated function parameters
   /// @returns true if the call expression is emitted
   template <typename F>
-  bool CallIntrinsicHelper(std::ostream& out,
-                           const ast::CallExpression* call,
-                           const sem::Intrinsic* intrinsic,
-                           F&& build);
+  bool CallBuiltinHelper(std::ostream& out,
+                         const ast::CallExpression* call,
+                         const sem::Builtin* builtin,
+                         F&& build);
 
   TextBuffer helpers_;  // Helper functions emitted at the top of the output
   std::function<bool()> emit_continuing_;
   std::unordered_map<DMAIntrinsic, std::string, DMAIntrinsic::Hasher>
       dma_intrinsics_;
-  std::unordered_map<const sem::Intrinsic*, std::string> intrinsics_;
+  std::unordered_map<const sem::Builtin*, std::string> builtins_;
   std::unordered_map<const sem::Struct*, std::string> structure_builders_;
   std::unordered_map<const sem::Vector*, std::string> dynamic_vector_write_;
   std::unordered_map<const sem::Vector*, std::string> int_dot_funcs_;
diff --git a/src/writer/glsl/generator_impl_builtin_test.cc b/src/writer/glsl/generator_impl_builtin_test.cc
new file mode 100644
index 0000000..d88d38a
--- /dev/null
+++ b/src/writer/glsl/generator_impl_builtin_test.cc
@@ -0,0 +1,745 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "gmock/gmock.h"
+#include "src/ast/call_statement.h"
+#include "src/ast/stage_attribute.h"
+#include "src/sem/call.h"
+#include "src/writer/glsl/test_helper.h"
+
+namespace tint {
+namespace writer {
+namespace glsl {
+namespace {
+
+using BuiltinType = sem::BuiltinType;
+
+using ::testing::HasSubstr;
+
+using GlslGeneratorImplTest_Builtin = TestHelper;
+
+enum class ParamType {
+  kF32,
+  kU32,
+  kBool,
+};
+
+struct BuiltinData {
+  BuiltinType builtin;
+  ParamType type;
+  const char* glsl_name;
+};
+inline std::ostream& operator<<(std::ostream& out, BuiltinData data) {
+  out << data.glsl_name;
+  switch (data.type) {
+    case ParamType::kF32:
+      out << "f32";
+      break;
+    case ParamType::kU32:
+      out << "u32";
+      break;
+    case ParamType::kBool:
+      out << "bool";
+      break;
+  }
+  out << ">";
+  return out;
+}
+
+const ast::CallExpression* GenerateCall(BuiltinType builtin,
+                                        ParamType type,
+                                        ProgramBuilder* builder) {
+  std::string name;
+  std::ostringstream str(name);
+  str << builtin;
+  switch (builtin) {
+    case BuiltinType::kAcos:
+    case BuiltinType::kAsin:
+    case BuiltinType::kAtan:
+    case BuiltinType::kCeil:
+    case BuiltinType::kCos:
+    case BuiltinType::kCosh:
+    case BuiltinType::kDpdx:
+    case BuiltinType::kDpdxCoarse:
+    case BuiltinType::kDpdxFine:
+    case BuiltinType::kDpdy:
+    case BuiltinType::kDpdyCoarse:
+    case BuiltinType::kDpdyFine:
+    case BuiltinType::kExp:
+    case BuiltinType::kExp2:
+    case BuiltinType::kFloor:
+    case BuiltinType::kFract:
+    case BuiltinType::kFwidth:
+    case BuiltinType::kFwidthCoarse:
+    case BuiltinType::kFwidthFine:
+    case BuiltinType::kInverseSqrt:
+    case BuiltinType::kIsFinite:
+    case BuiltinType::kIsInf:
+    case BuiltinType::kIsNan:
+    case BuiltinType::kIsNormal:
+    case BuiltinType::kLength:
+    case BuiltinType::kLog:
+    case BuiltinType::kLog2:
+    case BuiltinType::kNormalize:
+    case BuiltinType::kRound:
+    case BuiltinType::kSin:
+    case BuiltinType::kSinh:
+    case BuiltinType::kSqrt:
+    case BuiltinType::kTan:
+    case BuiltinType::kTanh:
+    case BuiltinType::kTrunc:
+    case BuiltinType::kSign:
+      return builder->Call(str.str(), "f2");
+    case BuiltinType::kLdexp:
+      return builder->Call(str.str(), "f2", "i2");
+    case BuiltinType::kAtan2:
+    case BuiltinType::kDot:
+    case BuiltinType::kDistance:
+    case BuiltinType::kPow:
+    case BuiltinType::kReflect:
+    case BuiltinType::kStep:
+      return builder->Call(str.str(), "f2", "f2");
+    case BuiltinType::kCross:
+      return builder->Call(str.str(), "f3", "f3");
+    case BuiltinType::kFma:
+    case BuiltinType::kMix:
+    case BuiltinType::kFaceForward:
+    case BuiltinType::kSmoothStep:
+      return builder->Call(str.str(), "f2", "f2", "f2");
+    case BuiltinType::kAll:
+    case BuiltinType::kAny:
+      return builder->Call(str.str(), "b2");
+    case BuiltinType::kAbs:
+      if (type == ParamType::kF32) {
+        return builder->Call(str.str(), "f2");
+      } else {
+        return builder->Call(str.str(), "u2");
+      }
+    case BuiltinType::kCountOneBits:
+    case BuiltinType::kReverseBits:
+      return builder->Call(str.str(), "u2");
+    case BuiltinType::kMax:
+    case BuiltinType::kMin:
+      if (type == ParamType::kF32) {
+        return builder->Call(str.str(), "f2", "f2");
+      } else {
+        return builder->Call(str.str(), "u2", "u2");
+      }
+    case BuiltinType::kClamp:
+      if (type == ParamType::kF32) {
+        return builder->Call(str.str(), "f2", "f2", "f2");
+      } else {
+        return builder->Call(str.str(), "u2", "u2", "u2");
+      }
+    case BuiltinType::kSelect:
+      return builder->Call(str.str(), "f2", "f2", "b2");
+    case BuiltinType::kDeterminant:
+      return builder->Call(str.str(), "m2x2");
+    case BuiltinType::kTranspose:
+      return builder->Call(str.str(), "m3x2");
+    default:
+      break;
+  }
+  return nullptr;
+}
+using GlslBuiltinTest = TestParamHelper<BuiltinData>;
+TEST_P(GlslBuiltinTest, Emit) {
+  auto param = GetParam();
+
+  Global("f2", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  Global("f3", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+  Global("u2", ty.vec2<u32>(), ast::StorageClass::kPrivate);
+  Global("i2", ty.vec2<i32>(), ast::StorageClass::kPrivate);
+  Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
+  Global("m2x2", ty.mat2x2<f32>(), ast::StorageClass::kPrivate);
+  Global("m3x2", ty.mat3x2<f32>(), ast::StorageClass::kPrivate);
+
+  auto* call = GenerateCall(param.builtin, param.type, this);
+  ASSERT_NE(nullptr, call) << "Unhandled builtin";
+  Func("func", {}, ty.void_(), {CallStmt(call)},
+       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
+
+  GeneratorImpl& gen = Build();
+
+  auto* sem = program->Sem().Get(call);
+  ASSERT_NE(sem, nullptr);
+  auto* target = sem->Target();
+  ASSERT_NE(target, nullptr);
+  auto* builtin = target->As<sem::Builtin>();
+  ASSERT_NE(builtin, nullptr);
+
+  EXPECT_EQ(gen.generate_builtin_name(builtin), param.glsl_name);
+}
+INSTANTIATE_TEST_SUITE_P(
+    GlslGeneratorImplTest_Builtin,
+    GlslBuiltinTest,
+    testing::Values(
+        BuiltinData{BuiltinType::kAbs, ParamType::kF32, "abs"},
+        BuiltinData{BuiltinType::kAbs, ParamType::kU32, "abs"},
+        BuiltinData{BuiltinType::kAcos, ParamType::kF32, "acos"},
+        BuiltinData{BuiltinType::kAll, ParamType::kBool, "all"},
+        BuiltinData{BuiltinType::kAny, ParamType::kBool, "any"},
+        BuiltinData{BuiltinType::kAsin, ParamType::kF32, "asin"},
+        BuiltinData{BuiltinType::kAtan, ParamType::kF32, "atan"},
+        BuiltinData{BuiltinType::kAtan2, ParamType::kF32, "atan"},
+        BuiltinData{BuiltinType::kCeil, ParamType::kF32, "ceil"},
+        BuiltinData{BuiltinType::kClamp, ParamType::kF32, "clamp"},
+        BuiltinData{BuiltinType::kClamp, ParamType::kU32, "clamp"},
+        BuiltinData{BuiltinType::kCos, ParamType::kF32, "cos"},
+        BuiltinData{BuiltinType::kCosh, ParamType::kF32, "cosh"},
+        BuiltinData{BuiltinType::kCountOneBits, ParamType::kU32, "countbits"},
+        BuiltinData{BuiltinType::kCross, ParamType::kF32, "cross"},
+        BuiltinData{BuiltinType::kDeterminant, ParamType::kF32, "determinant"},
+        BuiltinData{BuiltinType::kDistance, ParamType::kF32, "distance"},
+        BuiltinData{BuiltinType::kDot, ParamType::kF32, "dot"},
+        BuiltinData{BuiltinType::kDpdx, ParamType::kF32, "ddx"},
+        BuiltinData{BuiltinType::kDpdxCoarse, ParamType::kF32, "ddx_coarse"},
+        BuiltinData{BuiltinType::kDpdxFine, ParamType::kF32, "ddx_fine"},
+        BuiltinData{BuiltinType::kDpdy, ParamType::kF32, "ddy"},
+        BuiltinData{BuiltinType::kDpdyCoarse, ParamType::kF32, "ddy_coarse"},
+        BuiltinData{BuiltinType::kDpdyFine, ParamType::kF32, "ddy_fine"},
+        BuiltinData{BuiltinType::kExp, ParamType::kF32, "exp"},
+        BuiltinData{BuiltinType::kExp2, ParamType::kF32, "exp2"},
+        BuiltinData{BuiltinType::kFaceForward, ParamType::kF32, "faceforward"},
+        BuiltinData{BuiltinType::kFloor, ParamType::kF32, "floor"},
+        BuiltinData{BuiltinType::kFma, ParamType::kF32, "mad"},
+        BuiltinData{BuiltinType::kFract, ParamType::kF32, "frac"},
+        BuiltinData{BuiltinType::kFwidth, ParamType::kF32, "fwidth"},
+        BuiltinData{BuiltinType::kFwidthCoarse, ParamType::kF32, "fwidth"},
+        BuiltinData{BuiltinType::kFwidthFine, ParamType::kF32, "fwidth"},
+        BuiltinData{BuiltinType::kInverseSqrt, ParamType::kF32, "rsqrt"},
+        BuiltinData{BuiltinType::kIsFinite, ParamType::kF32, "isfinite"},
+        BuiltinData{BuiltinType::kIsInf, ParamType::kF32, "isinf"},
+        BuiltinData{BuiltinType::kIsNan, ParamType::kF32, "isnan"},
+        BuiltinData{BuiltinType::kLdexp, ParamType::kF32, "ldexp"},
+        BuiltinData{BuiltinType::kLength, ParamType::kF32, "length"},
+        BuiltinData{BuiltinType::kLog, ParamType::kF32, "log"},
+        BuiltinData{BuiltinType::kLog2, ParamType::kF32, "log2"},
+        BuiltinData{BuiltinType::kMax, ParamType::kF32, "max"},
+        BuiltinData{BuiltinType::kMax, ParamType::kU32, "max"},
+        BuiltinData{BuiltinType::kMin, ParamType::kF32, "min"},
+        BuiltinData{BuiltinType::kMin, ParamType::kU32, "min"},
+        BuiltinData{BuiltinType::kMix, ParamType::kF32, "mix"},
+        BuiltinData{BuiltinType::kNormalize, ParamType::kF32, "normalize"},
+        BuiltinData{BuiltinType::kPow, ParamType::kF32, "pow"},
+        BuiltinData{BuiltinType::kReflect, ParamType::kF32, "reflect"},
+        BuiltinData{BuiltinType::kReverseBits, ParamType::kU32, "reversebits"},
+        BuiltinData{BuiltinType::kRound, ParamType::kU32, "round"},
+        BuiltinData{BuiltinType::kSign, ParamType::kF32, "sign"},
+        BuiltinData{BuiltinType::kSin, ParamType::kF32, "sin"},
+        BuiltinData{BuiltinType::kSinh, ParamType::kF32, "sinh"},
+        BuiltinData{BuiltinType::kSmoothStep, ParamType::kF32, "smoothstep"},
+        BuiltinData{BuiltinType::kSqrt, ParamType::kF32, "sqrt"},
+        BuiltinData{BuiltinType::kStep, ParamType::kF32, "step"},
+        BuiltinData{BuiltinType::kTan, ParamType::kF32, "tan"},
+        BuiltinData{BuiltinType::kTanh, ParamType::kF32, "tanh"},
+        BuiltinData{BuiltinType::kTranspose, ParamType::kF32, "transpose"},
+        BuiltinData{BuiltinType::kTrunc, ParamType::kF32, "trunc"}));
+
+TEST_F(GlslGeneratorImplTest_Builtin, DISABLED_Builtin_IsNormal) {
+  FAIL();
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Builtin_Call) {
+  auto* call = Call("dot", "param1", "param2");
+
+  Global("param1", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+  Global("param2", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "dot(param1, param2)");
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Select_Scalar) {
+  auto* call = Call("select", 1.0f, 2.0f, true);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "(true ? 2.0f : 1.0f)");
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Select_Vector) {
+  auto* call =
+      Call("select", vec2<i32>(1, 2), vec2<i32>(3, 4), vec2<bool>(true, false));
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "(bvec2(true, false) ? ivec2(3, 4) : ivec2(1, 2))");
+}
+
+#if 0
+TEST_F(GlslGeneratorImplTest_Builtin, Modf_Scalar) {
+  auto* res = Var("res", ty.f32());
+  auto* call = Call("modf", 1.0f, AddressOf(res));
+  WrapInFunction(res, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("modf(1.0f, res)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Modf_Vector) {
+  auto* res = Var("res", ty.vec3<f32>());
+  auto* call = Call("modf", vec3<f32>(), AddressOf(res));
+  WrapInFunction(res, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("modf(vec3(0.0f, 0.0f, 0.0f), res)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Scalar_i32) {
+  auto* exp = Var("exp", ty.i32());
+  auto* call = Call("frexp", 1.0f, AddressOf(exp));
+  WrapInFunction(exp, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr(R"(
+  float tint_tmp;
+  float tint_tmp_1 = frexp(1.0f, tint_tmp);
+  exp = int(tint_tmp);
+  tint_tmp_1;
+)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Vector_i32) {
+  auto* res = Var("res", ty.vec3<i32>());
+  auto* call = Call("frexp", vec3<f32>(), AddressOf(res));
+  WrapInFunction(res, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr(R"(
+  vec3 tint_tmp;
+  vec3 tint_tmp_1 = frexp(vec3(0.0f, 0.0f, 0.0f), tint_tmp);
+  res = ivec3(tint_tmp);
+  tint_tmp_1;
+)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, IsNormal_Scalar) {
+  auto* val = Var("val", ty.f32());
+  auto* call = Call("isNormal", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr(R"(
+  uint tint_isnormal_exponent = asuint(val) & 0x7f80000;
+  uint tint_isnormal_clamped = clamp(tint_isnormal_exponent, 0x0080000, 0x7f00000);
+  (tint_isnormal_clamped == tint_isnormal_exponent);
+)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, IsNormal_Vector) {
+  auto* val = Var("val", ty.vec3<f32>());
+  auto* call = Call("isNormal", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr(R"(
+  uvec3 tint_isnormal_exponent = asuint(val) & 0x7f80000;
+  uvec3 tint_isnormal_clamped = clamp(tint_isnormal_exponent, 0x0080000, 0x7f00000);
+  (tint_isnormal_clamped == tint_isnormal_exponent);
+)"));
+}
+#endif
+
+TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Scalar) {
+  auto* val = Var("val", ty.f32());
+  auto* call = Call("degrees", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#version 310 es
+precision mediump float;
+
+float tint_degrees(float param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+
+void test_function() {
+  float val = 0.0f;
+  float tint_symbol = tint_degrees(val);
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  test_function();
+  return;
+}
+)");
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Vector) {
+  auto* val = Var("val", ty.vec3<f32>());
+  auto* call = Call("degrees", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#version 310 es
+precision mediump float;
+
+vec3 tint_degrees(vec3 param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+
+void test_function() {
+  vec3 val = vec3(0.0f, 0.0f, 0.0f);
+  vec3 tint_symbol = tint_degrees(val);
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  test_function();
+  return;
+}
+)");
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Radians_Scalar) {
+  auto* val = Var("val", ty.f32());
+  auto* call = Call("radians", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#version 310 es
+precision mediump float;
+
+float tint_radians(float param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+
+void test_function() {
+  float val = 0.0f;
+  float tint_symbol = tint_radians(val);
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  test_function();
+  return;
+}
+)");
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Radians_Vector) {
+  auto* val = Var("val", ty.vec3<f32>());
+  auto* call = Call("radians", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#version 310 es
+precision mediump float;
+
+vec3 tint_radians(vec3 param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+
+void test_function() {
+  vec3 val = vec3(0.0f, 0.0f, 0.0f);
+  vec3 tint_symbol = tint_radians(val);
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  test_function();
+  return;
+}
+)");
+}
+
+#if 0
+TEST_F(GlslGeneratorImplTest_Builtin, Pack4x8Snorm) {
+  auto* call = Call("pack4x8snorm", "p1");
+  Global("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("ivec4 tint_tmp = ivec4(round(clamp(p1, "
+                                      "-1.0, 1.0) * 127.0)) & 0xff;"));
+  EXPECT_THAT(out.str(), HasSubstr("asuint(tint_tmp.x | tint_tmp.y << 8 | "
+                                   "tint_tmp.z << 16 | tint_tmp.w << 24)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Pack4x8Unorm) {
+  auto* call = Call("pack4x8unorm", "p1");
+  Global("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("uvec4 tint_tmp = uvec4(round(clamp(p1, "
+                                      "0.0, 1.0) * 255.0));"));
+  EXPECT_THAT(out.str(), HasSubstr("(tint_tmp.x | tint_tmp.y << 8 | "
+                                   "tint_tmp.z << 16 | tint_tmp.w << 24)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Snorm) {
+  auto* call = Call("pack2x16snorm", "p1");
+  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("int2 tint_tmp = int2(round(clamp(p1, "
+                                      "-1.0, 1.0) * 32767.0)) & 0xffff;"));
+  EXPECT_THAT(out.str(), HasSubstr("asuint(tint_tmp.x | tint_tmp.y << 16)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Unorm) {
+  auto* call = Call("pack2x16unorm", "p1");
+  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("uint2 tint_tmp = uint2(round(clamp(p1, "
+                                      "0.0, 1.0) * 65535.0));"));
+  EXPECT_THAT(out.str(), HasSubstr("(tint_tmp.x | tint_tmp.y << 16)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Float) {
+  auto* call = Call("pack2x16float", "p1");
+  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("uint2 tint_tmp = f32tof16(p1);"));
+  EXPECT_THAT(out.str(), HasSubstr("(tint_tmp.x | tint_tmp.y << 16)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Unpack4x8Snorm) {
+  auto* call = Call("unpack4x8snorm", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("int tint_tmp_1 = int(p1);"));
+  EXPECT_THAT(gen.result(),
+              HasSubstr("ivec4 tint_tmp = ivec4(tint_tmp_1 << 24, tint_tmp_1 "
+                        "<< 16, tint_tmp_1 << 8, tint_tmp_1) >> 24;"));
+  EXPECT_THAT(out.str(),
+              HasSubstr("clamp(float4(tint_tmp) / 127.0, -1.0, 1.0)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Unpack4x8Unorm) {
+  auto* call = Call("unpack4x8unorm", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("uint tint_tmp_1 = p1;"));
+  EXPECT_THAT(
+      gen.result(),
+      HasSubstr("uvec4 tint_tmp = uvec4(tint_tmp_1 & 0xff, (tint_tmp_1 >> "
+                "8) & 0xff, (tint_tmp_1 >> 16) & 0xff, tint_tmp_1 >> 24);"));
+  EXPECT_THAT(out.str(), HasSubstr("float4(tint_tmp) / 255.0"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Snorm) {
+  auto* call = Call("unpack2x16snorm", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("int tint_tmp_1 = int(p1);"));
+  EXPECT_THAT(
+      gen.result(),
+      HasSubstr("int2 tint_tmp = int2(tint_tmp_1 << 16, tint_tmp_1) >> 16;"));
+  EXPECT_THAT(out.str(),
+              HasSubstr("clamp(float2(tint_tmp) / 32767.0, -1.0, 1.0)"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Unorm) {
+  auto* call = Call("unpack2x16unorm", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("uint tint_tmp_1 = p1;"));
+  EXPECT_THAT(gen.result(),
+              HasSubstr("uint2 tint_tmp = uint2(tint_tmp_1 & 0xffff, "
+                        "tint_tmp_1 >> 16);"));
+  EXPECT_THAT(out.str(), HasSubstr("float2(tint_tmp) / 65535.0"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Float) {
+  auto* call = Call("unpack2x16float", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_THAT(gen.result(), HasSubstr("uint tint_tmp = p1;"));
+  EXPECT_THAT(out.str(),
+              HasSubstr("f16tof32(uint2(tint_tmp & 0xffff, tint_tmp >> 16))"));
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, StorageBarrier) {
+  Func("main", {}, ty.void_(),
+       {CallStmt(Call("storageBarrier"))},
+       {
+           Stage(ast::PipelineStage::kCompute),
+           WorkgroupSize(1),
+       });
+
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  DeviceMemoryBarrierWithGroupSync();
+  return;
+}
+)");
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, WorkgroupBarrier) {
+  Func("main", {}, ty.void_(),
+       {CallStmt(Call("workgroupBarrier"))},
+       {
+           Stage(ast::PipelineStage::kCompute),
+           WorkgroupSize(1),
+       });
+
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  GroupMemoryBarrierWithGroupSync();
+  return;
+}
+)");
+}
+
+#endif
+
+TEST_F(GlslGeneratorImplTest_Builtin, DotI32) {
+  Global("v", ty.vec3<i32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(Call("dot", "v", "v")));
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#version 310 es
+precision mediump float;
+
+int tint_int_dot(ivec3 a, ivec3 b) {
+  return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+}
+
+ivec3 v = ivec3(0, 0, 0);
+void test_function() {
+  tint_int_dot(v, v);
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  test_function();
+  return;
+}
+)");
+}
+
+TEST_F(GlslGeneratorImplTest_Builtin, DotU32) {
+  Global("v", ty.vec3<u32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(Call("dot", "v", "v")));
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#version 310 es
+precision mediump float;
+
+uint tint_int_dot(uvec3 a, uvec3 b) {
+  return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+}
+
+uvec3 v = uvec3(0u, 0u, 0u);
+void test_function() {
+  tint_int_dot(v, v);
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  test_function();
+  return;
+}
+)");
+}
+
+}  // namespace
+}  // namespace glsl
+}  // namespace writer
+}  // namespace tint
diff --git a/src/writer/glsl/generator_impl_builtin_texture_test.cc b/src/writer/glsl/generator_impl_builtin_texture_test.cc
new file mode 100644
index 0000000..bd6a6a8
--- /dev/null
+++ b/src/writer/glsl/generator_impl_builtin_texture_test.cc
@@ -0,0 +1,302 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "gmock/gmock.h"
+#include "src/ast/builtin_texture_helper_test.h"
+#include "src/ast/call_statement.h"
+#include "src/ast/stage_attribute.h"
+#include "src/writer/glsl/test_helper.h"
+
+namespace tint {
+namespace writer {
+namespace glsl {
+namespace {
+
+using ::testing::HasSubstr;
+
+struct ExpectedResult {
+  ExpectedResult(const char* o) : out(o) {}  // NOLINT
+
+  std::string pre;
+  std::string out;
+};
+
+ExpectedResult expected_texture_overload(
+    ast::builtin::test::ValidTextureOverload overload) {
+  using ValidTextureOverload = ast::builtin::test::ValidTextureOverload;
+  switch (overload) {
+    case ValidTextureOverload::kDimensions1d:
+    case ValidTextureOverload::kDimensions2d:
+    case ValidTextureOverload::kDimensionsDepth2d:
+    case ValidTextureOverload::kDimensionsDepthMultisampled2d:
+    case ValidTextureOverload::kDimensionsMultisampled2d:
+    case ValidTextureOverload::kDimensions2dArray:
+    case ValidTextureOverload::kDimensionsDepth2dArray:
+    case ValidTextureOverload::kDimensions3d:
+    case ValidTextureOverload::kDimensionsCube:
+    case ValidTextureOverload::kDimensionsDepthCube:
+    case ValidTextureOverload::kDimensionsCubeArray:
+    case ValidTextureOverload::kDimensionsDepthCubeArray:
+    case ValidTextureOverload::kDimensions2dLevel:
+    case ValidTextureOverload::kDimensionsDepth2dLevel:
+    case ValidTextureOverload::kDimensions2dArrayLevel:
+    case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
+    case ValidTextureOverload::kDimensions3dLevel:
+    case ValidTextureOverload::kDimensionsCubeLevel:
+    case ValidTextureOverload::kDimensionsDepthCubeLevel:
+    case ValidTextureOverload::kDimensionsCubeArrayLevel:
+    case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
+      return {"textureSize"};
+    case ValidTextureOverload::kDimensionsStorageWO1d:
+    case ValidTextureOverload::kDimensionsStorageWO2d:
+    case ValidTextureOverload::kDimensionsStorageWO2dArray:
+    case ValidTextureOverload::kDimensionsStorageWO3d:
+      return {"imageSize"};
+    case ValidTextureOverload::kGather2dF32:
+      return R"(textureGather(tint_symbol_sampler, vec2(1.0f, 2.0f), 0))";
+    case ValidTextureOverload::kGather2dOffsetF32:
+      return R"(textureGatherOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), ivec2(3, 4), 0))";
+    case ValidTextureOverload::kGather2dArrayF32:
+      return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 0))";
+    case ValidTextureOverload::kGather2dArrayOffsetF32:
+      return R"(textureGatherOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), ivec2(4, 5), 0))";
+    case ValidTextureOverload::kGatherCubeF32:
+      return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 0))";
+    case ValidTextureOverload::kGatherCubeArrayF32:
+      return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 0))";
+    case ValidTextureOverload::kGatherDepth2dF32:
+      return R"(textureGather(tint_symbol_sampler, vec2(1.0f, 2.0f), 0.0))";
+    case ValidTextureOverload::kGatherDepth2dOffsetF32:
+      return R"(textureGatherOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), 0.0, ivec2(3, 4))";
+    case ValidTextureOverload::kGatherDepth2dArrayF32:
+      return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 0.0))";
+    case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
+      return R"(textureGatherOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 0.0, ivec2(4, 5)))";
+    case ValidTextureOverload::kGatherDepthCubeF32:
+      return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 0.0))";
+    case ValidTextureOverload::kGatherDepthCubeArrayF32:
+      return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 0.0))";
+    case ValidTextureOverload::kGatherCompareDepth2dF32:
+      return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f))";
+    case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
+      return R"(textureGatherOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), ivec2(4, 5)))";
+    case ValidTextureOverload::kGatherCompareDepth2dArrayF32:
+      return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 4.0f)))";
+    case ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32:
+      return R"(textureGatherOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 4.0f), ivec2(5, 6)))";
+    case ValidTextureOverload::kGatherCompareDepthCubeF32:
+      return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, 4.0f)))";
+    case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
+      return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
+    case ValidTextureOverload::kNumLayers2dArray:
+    case ValidTextureOverload::kNumLayersDepth2dArray:
+    case ValidTextureOverload::kNumLayersCubeArray:
+    case ValidTextureOverload::kNumLayersDepthCubeArray:
+    case ValidTextureOverload::kNumLayersStorageWO2dArray:
+    case ValidTextureOverload::kNumLevels2d:
+    case ValidTextureOverload::kNumLevelsCube:
+    case ValidTextureOverload::kNumLevelsDepth2d:
+    case ValidTextureOverload::kNumLevelsDepthCube:
+    case ValidTextureOverload::kNumLevels2dArray:
+    case ValidTextureOverload::kNumLevels3d:
+    case ValidTextureOverload::kNumLevelsCubeArray:
+    case ValidTextureOverload::kNumLevelsDepth2dArray:
+    case ValidTextureOverload::kNumLevelsDepthCubeArray:
+      return {"textureQueryLevels"};
+    case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
+    case ValidTextureOverload::kNumSamplesMultisampled2d:
+      return {"textureSamples"};
+    case ValidTextureOverload::kSample1dF32:
+      return R"(texture(tint_symbol_sampler, 1.0f);)";
+    case ValidTextureOverload::kSample2dF32:
+      return R"(texture(tint_symbol_sampler, vec2(1.0f, 2.0f));)";
+    case ValidTextureOverload::kSample2dOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), ivec2(3, 4));)";
+    case ValidTextureOverload::kSample2dArrayF32:
+      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)));)";
+    case ValidTextureOverload::kSample2dArrayOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), ivec2(4, 5));)";
+    case ValidTextureOverload::kSample3dF32:
+      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f));)";
+    case ValidTextureOverload::kSample3dOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), ivec3(4, 5, 6));)";
+    case ValidTextureOverload::kSampleCubeF32:
+      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f));)";
+    case ValidTextureOverload::kSampleCubeArrayF32:
+      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)));)";
+    case ValidTextureOverload::kSampleDepth2dF32:
+      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 0.0f));)";
+    case ValidTextureOverload::kSampleDepth2dOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 0.0f), ivec2(3, 4));)";
+    case ValidTextureOverload::kSampleDepth2dArrayF32:
+      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 0.0f));)";
+    case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 0.0f), ivec2(4, 5));)";
+    case ValidTextureOverload::kSampleDepthCubeF32:
+      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, 0.0f));)";
+    case ValidTextureOverload::kSampleDepthCubeArrayF32:
+      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 0.0f);)";
+    case ValidTextureOverload::kSampleBias2dF32:
+      return R"(texture(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f);)";
+    case ValidTextureOverload::kSampleBias2dOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), ivec2(4, 5), 3.0f);)";
+    case ValidTextureOverload::kSampleBias2dArrayF32:
+      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, float(4)), 3.0f);)";
+    case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), ivec2(5, 6), 4.0f);)";
+    case ValidTextureOverload::kSampleBias3dF32:
+      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleBias3dOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), ivec3(5, 6, 7), 4.0f);)";
+    case ValidTextureOverload::kSampleBiasCubeF32:
+      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleBiasCubeArrayF32:
+      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(3)), 4.0f);)";
+    case ValidTextureOverload::kSampleLevel2dF32:
+      return R"(textureLod(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f);)";
+    case ValidTextureOverload::kSampleLevel2dOffsetF32:
+      return R"(textureLodOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
+    case ValidTextureOverload::kSampleLevel2dArrayF32:
+      return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 4.0f);)";
+    case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
+      return R"(textureLodOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 4.0f, ivec2(5, 6));)";
+    case ValidTextureOverload::kSampleLevel3dF32:
+      return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleLevel3dOffsetF32:
+      return R"(textureLodOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f, ivec3(5, 6, 7));)";
+    case ValidTextureOverload::kSampleLevelCubeF32:
+      return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleLevelCubeArrayF32:
+      return R"(textureLod(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
+    case ValidTextureOverload::kSampleLevelDepth2dF32:
+      return R"(textureLod(tint_symbol_sampler, vec2(1.0f, 2.0f), 3).x;)";
+    case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
+      return R"(textureLodOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), 3, ivec2(4, 5)).x;)";
+    case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
+      return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 4).x;)";
+    case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
+      return R"(textureLodOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 4, ivec2(5, 6)).x;)";
+    case ValidTextureOverload::kSampleLevelDepthCubeF32:
+      return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4).x;)";
+    case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
+      return R"(textureLod(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5).x;)";
+    case ValidTextureOverload::kSampleGrad2dF32:
+      return R"(textureGrad(tint_symbol_sampler, vec2(1.0f, 2.0f), vec2(3.0f, 4.0f), vec2(5.0f, 6.0f));)";
+    case ValidTextureOverload::kSampleGrad2dOffsetF32:
+      return R"(textureGradOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), vec2(3.0f, 4.0f), vec2(5.0f, 6.0f), ivec2(7, 7));)";
+    case ValidTextureOverload::kSampleGrad2dArrayF32:
+      return R"(textureGrad(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));)";
+    case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
+      return R"(textureGradOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f), ivec2(6, 7));)";
+    case ValidTextureOverload::kSampleGrad3dF32:
+      return R"(textureGrad(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));)";
+    case ValidTextureOverload::kSampleGrad3dOffsetF32:
+      return R"(textureGradOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f), ivec3(0, 1, 2));)";
+    case ValidTextureOverload::kSampleGradCubeF32:
+      return R"(textureGrad(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));)";
+    case ValidTextureOverload::kSampleGradCubeArrayF32:
+      return R"(textureGrad(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), vec3(5.0f, 6.0f, 7.0f), vec3(8.0f, 9.0f, 10.0f));)";
+    case ValidTextureOverload::kSampleCompareDepth2dF32:
+      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f));)";
+    case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), ivec2(4, 5));)";
+    case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
+      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, float(4), 3.0f));)";
+    case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(4), 3.0f), ivec2(5, 6));)";
+    case ValidTextureOverload::kSampleCompareDepthCubeF32:
+      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, 4.0f));)";
+    case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
+      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
+      return R"(yyytexture(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f);)";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
+      return R"(yyytextureOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
+      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, float(4)), 3.0f);)";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
+      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(4)), 3.0f, ivec2(5, 6));)";
+    case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
+      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
+      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
+    case ValidTextureOverload::kLoad1dLevelF32:
+    case ValidTextureOverload::kLoad1dLevelU32:
+    case ValidTextureOverload::kLoad1dLevelI32:
+      return R"(texelFetch(tint_symbol_2, 1, 3);)";
+    case ValidTextureOverload::kLoad2dLevelF32:
+    case ValidTextureOverload::kLoad2dLevelU32:
+    case ValidTextureOverload::kLoad2dLevelI32:
+      return R"(texelFetch(tint_symbol_2, ivec2(1, 2), 3);)";
+    case ValidTextureOverload::kLoad2dArrayLevelF32:
+    case ValidTextureOverload::kLoad2dArrayLevelU32:
+    case ValidTextureOverload::kLoad2dArrayLevelI32:
+    case ValidTextureOverload::kLoad3dLevelF32:
+    case ValidTextureOverload::kLoad3dLevelU32:
+    case ValidTextureOverload::kLoad3dLevelI32:
+      return R"(texelFetch(tint_symbol_2, ivec3(1, 2, 3), 4);)";
+    case ValidTextureOverload::kLoadDepthMultisampled2dF32:
+    case ValidTextureOverload::kLoadMultisampled2dF32:
+    case ValidTextureOverload::kLoadMultisampled2dU32:
+    case ValidTextureOverload::kLoadMultisampled2dI32:
+      return R"(texelFetch(tint_symbol_2, ivec2(1, 2), 3);)";
+    case ValidTextureOverload::kLoadDepth2dLevelF32:
+      return R"(texelFetch(tint_symbol_2, ivec2(1, 2), 3).x;)";
+    case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
+      return R"(texelFetch(tint_symbol_2, ivec3(1, 2, 3), 4).x;)";
+    case ValidTextureOverload::kStoreWO1dRgba32float:
+      return R"(imageStore(tint_symbol_2, 1, vec4(2.0f, 3.0f, 4.0f, 5.0f));)";
+    case ValidTextureOverload::kStoreWO2dRgba32float:
+      return R"(imageStore(tint_symbol_2, ivec2(1, 2), vec4(3.0f, 4.0f, 5.0f, 6.0f));)";
+    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
+      return R"(imageStore(tint_symbol_2, ivec3(1, 2, 3), vec4(4.0f, 5.0f, 6.0f, 7.0f));)";
+    case ValidTextureOverload::kStoreWO3dRgba32float:
+      return R"(imageStore(tint_symbol_2, ivec3(1, 2, 3), vec4(4.0f, 5.0f, 6.0f, 7.0f));)";
+  }
+  return "<unmatched texture overload>";
+}  // NOLINT - Ignore the length of this function
+
+class GlslGeneratorBuiltinTextureTest
+    : public TestParamHelper<ast::builtin::test::TextureOverloadCase> {};
+
+TEST_P(GlslGeneratorBuiltinTextureTest, Call) {
+  auto param = GetParam();
+
+  param.BuildTextureVariable(this);
+  param.BuildSamplerVariable(this);
+
+  auto* call = Call(param.function, param.args(this));
+  auto* stmt = CallStmt(call);
+
+  Func("main", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+
+  auto expected = expected_texture_overload(param.overload);
+
+  EXPECT_THAT(gen.result(), HasSubstr(expected.pre));
+  EXPECT_THAT(gen.result(), HasSubstr(expected.out));
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    GlslGeneratorBuiltinTextureTest,
+    GlslGeneratorBuiltinTextureTest,
+    testing::ValuesIn(ast::builtin::test::TextureOverloadCase::ValidCases()));
+
+}  // namespace
+}  // namespace glsl
+}  // namespace writer
+}  // namespace tint
diff --git a/src/writer/glsl/generator_impl_intrinsic_test.cc b/src/writer/glsl/generator_impl_intrinsic_test.cc
deleted file mode 100644
index e57a292..0000000
--- a/src/writer/glsl/generator_impl_intrinsic_test.cc
+++ /dev/null
@@ -1,752 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "gmock/gmock.h"
-#include "src/ast/call_statement.h"
-#include "src/ast/stage_attribute.h"
-#include "src/sem/call.h"
-#include "src/writer/glsl/test_helper.h"
-
-namespace tint {
-namespace writer {
-namespace glsl {
-namespace {
-
-using IntrinsicType = sem::IntrinsicType;
-
-using ::testing::HasSubstr;
-
-using GlslGeneratorImplTest_Intrinsic = TestHelper;
-
-enum class ParamType {
-  kF32,
-  kU32,
-  kBool,
-};
-
-struct IntrinsicData {
-  IntrinsicType intrinsic;
-  ParamType type;
-  const char* glsl_name;
-};
-inline std::ostream& operator<<(std::ostream& out, IntrinsicData data) {
-  out << data.glsl_name;
-  switch (data.type) {
-    case ParamType::kF32:
-      out << "f32";
-      break;
-    case ParamType::kU32:
-      out << "u32";
-      break;
-    case ParamType::kBool:
-      out << "bool";
-      break;
-  }
-  out << ">";
-  return out;
-}
-
-const ast::CallExpression* GenerateCall(IntrinsicType intrinsic,
-                                        ParamType type,
-                                        ProgramBuilder* builder) {
-  std::string name;
-  std::ostringstream str(name);
-  str << intrinsic;
-  switch (intrinsic) {
-    case IntrinsicType::kAcos:
-    case IntrinsicType::kAsin:
-    case IntrinsicType::kAtan:
-    case IntrinsicType::kCeil:
-    case IntrinsicType::kCos:
-    case IntrinsicType::kCosh:
-    case IntrinsicType::kDpdx:
-    case IntrinsicType::kDpdxCoarse:
-    case IntrinsicType::kDpdxFine:
-    case IntrinsicType::kDpdy:
-    case IntrinsicType::kDpdyCoarse:
-    case IntrinsicType::kDpdyFine:
-    case IntrinsicType::kExp:
-    case IntrinsicType::kExp2:
-    case IntrinsicType::kFloor:
-    case IntrinsicType::kFract:
-    case IntrinsicType::kFwidth:
-    case IntrinsicType::kFwidthCoarse:
-    case IntrinsicType::kFwidthFine:
-    case IntrinsicType::kInverseSqrt:
-    case IntrinsicType::kIsFinite:
-    case IntrinsicType::kIsInf:
-    case IntrinsicType::kIsNan:
-    case IntrinsicType::kIsNormal:
-    case IntrinsicType::kLength:
-    case IntrinsicType::kLog:
-    case IntrinsicType::kLog2:
-    case IntrinsicType::kNormalize:
-    case IntrinsicType::kRound:
-    case IntrinsicType::kSin:
-    case IntrinsicType::kSinh:
-    case IntrinsicType::kSqrt:
-    case IntrinsicType::kTan:
-    case IntrinsicType::kTanh:
-    case IntrinsicType::kTrunc:
-    case IntrinsicType::kSign:
-      return builder->Call(str.str(), "f2");
-    case IntrinsicType::kLdexp:
-      return builder->Call(str.str(), "f2", "i2");
-    case IntrinsicType::kAtan2:
-    case IntrinsicType::kDot:
-    case IntrinsicType::kDistance:
-    case IntrinsicType::kPow:
-    case IntrinsicType::kReflect:
-    case IntrinsicType::kStep:
-      return builder->Call(str.str(), "f2", "f2");
-    case IntrinsicType::kCross:
-      return builder->Call(str.str(), "f3", "f3");
-    case IntrinsicType::kFma:
-    case IntrinsicType::kMix:
-    case IntrinsicType::kFaceForward:
-    case IntrinsicType::kSmoothStep:
-      return builder->Call(str.str(), "f2", "f2", "f2");
-    case IntrinsicType::kAll:
-    case IntrinsicType::kAny:
-      return builder->Call(str.str(), "b2");
-    case IntrinsicType::kAbs:
-      if (type == ParamType::kF32) {
-        return builder->Call(str.str(), "f2");
-      } else {
-        return builder->Call(str.str(), "u2");
-      }
-    case IntrinsicType::kCountOneBits:
-    case IntrinsicType::kReverseBits:
-      return builder->Call(str.str(), "u2");
-    case IntrinsicType::kMax:
-    case IntrinsicType::kMin:
-      if (type == ParamType::kF32) {
-        return builder->Call(str.str(), "f2", "f2");
-      } else {
-        return builder->Call(str.str(), "u2", "u2");
-      }
-    case IntrinsicType::kClamp:
-      if (type == ParamType::kF32) {
-        return builder->Call(str.str(), "f2", "f2", "f2");
-      } else {
-        return builder->Call(str.str(), "u2", "u2", "u2");
-      }
-    case IntrinsicType::kSelect:
-      return builder->Call(str.str(), "f2", "f2", "b2");
-    case IntrinsicType::kDeterminant:
-      return builder->Call(str.str(), "m2x2");
-    case IntrinsicType::kTranspose:
-      return builder->Call(str.str(), "m3x2");
-    default:
-      break;
-  }
-  return nullptr;
-}
-using GlslIntrinsicTest = TestParamHelper<IntrinsicData>;
-TEST_P(GlslIntrinsicTest, Emit) {
-  auto param = GetParam();
-
-  Global("f2", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  Global("f3", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-  Global("u2", ty.vec2<u32>(), ast::StorageClass::kPrivate);
-  Global("i2", ty.vec2<i32>(), ast::StorageClass::kPrivate);
-  Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
-  Global("m2x2", ty.mat2x2<f32>(), ast::StorageClass::kPrivate);
-  Global("m3x2", ty.mat3x2<f32>(), ast::StorageClass::kPrivate);
-
-  auto* call = GenerateCall(param.intrinsic, param.type, this);
-  ASSERT_NE(nullptr, call) << "Unhandled intrinsic";
-  Func("func", {}, ty.void_(), {CallStmt(call)},
-       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
-
-  GeneratorImpl& gen = Build();
-
-  auto* sem = program->Sem().Get(call);
-  ASSERT_NE(sem, nullptr);
-  auto* target = sem->Target();
-  ASSERT_NE(target, nullptr);
-  auto* intrinsic = target->As<sem::Intrinsic>();
-  ASSERT_NE(intrinsic, nullptr);
-
-  EXPECT_EQ(gen.generate_builtin_name(intrinsic), param.glsl_name);
-}
-INSTANTIATE_TEST_SUITE_P(
-    GlslGeneratorImplTest_Intrinsic,
-    GlslIntrinsicTest,
-    testing::Values(
-        IntrinsicData{IntrinsicType::kAbs, ParamType::kF32, "abs"},
-        IntrinsicData{IntrinsicType::kAbs, ParamType::kU32, "abs"},
-        IntrinsicData{IntrinsicType::kAcos, ParamType::kF32, "acos"},
-        IntrinsicData{IntrinsicType::kAll, ParamType::kBool, "all"},
-        IntrinsicData{IntrinsicType::kAny, ParamType::kBool, "any"},
-        IntrinsicData{IntrinsicType::kAsin, ParamType::kF32, "asin"},
-        IntrinsicData{IntrinsicType::kAtan, ParamType::kF32, "atan"},
-        IntrinsicData{IntrinsicType::kAtan2, ParamType::kF32, "atan"},
-        IntrinsicData{IntrinsicType::kCeil, ParamType::kF32, "ceil"},
-        IntrinsicData{IntrinsicType::kClamp, ParamType::kF32, "clamp"},
-        IntrinsicData{IntrinsicType::kClamp, ParamType::kU32, "clamp"},
-        IntrinsicData{IntrinsicType::kCos, ParamType::kF32, "cos"},
-        IntrinsicData{IntrinsicType::kCosh, ParamType::kF32, "cosh"},
-        IntrinsicData{IntrinsicType::kCountOneBits, ParamType::kU32,
-                      "countbits"},
-        IntrinsicData{IntrinsicType::kCross, ParamType::kF32, "cross"},
-        IntrinsicData{IntrinsicType::kDeterminant, ParamType::kF32,
-                      "determinant"},
-        IntrinsicData{IntrinsicType::kDistance, ParamType::kF32, "distance"},
-        IntrinsicData{IntrinsicType::kDot, ParamType::kF32, "dot"},
-        IntrinsicData{IntrinsicType::kDpdx, ParamType::kF32, "ddx"},
-        IntrinsicData{IntrinsicType::kDpdxCoarse, ParamType::kF32,
-                      "ddx_coarse"},
-        IntrinsicData{IntrinsicType::kDpdxFine, ParamType::kF32, "ddx_fine"},
-        IntrinsicData{IntrinsicType::kDpdy, ParamType::kF32, "ddy"},
-        IntrinsicData{IntrinsicType::kDpdyCoarse, ParamType::kF32,
-                      "ddy_coarse"},
-        IntrinsicData{IntrinsicType::kDpdyFine, ParamType::kF32, "ddy_fine"},
-        IntrinsicData{IntrinsicType::kExp, ParamType::kF32, "exp"},
-        IntrinsicData{IntrinsicType::kExp2, ParamType::kF32, "exp2"},
-        IntrinsicData{IntrinsicType::kFaceForward, ParamType::kF32,
-                      "faceforward"},
-        IntrinsicData{IntrinsicType::kFloor, ParamType::kF32, "floor"},
-        IntrinsicData{IntrinsicType::kFma, ParamType::kF32, "mad"},
-        IntrinsicData{IntrinsicType::kFract, ParamType::kF32, "frac"},
-        IntrinsicData{IntrinsicType::kFwidth, ParamType::kF32, "fwidth"},
-        IntrinsicData{IntrinsicType::kFwidthCoarse, ParamType::kF32, "fwidth"},
-        IntrinsicData{IntrinsicType::kFwidthFine, ParamType::kF32, "fwidth"},
-        IntrinsicData{IntrinsicType::kInverseSqrt, ParamType::kF32, "rsqrt"},
-        IntrinsicData{IntrinsicType::kIsFinite, ParamType::kF32, "isfinite"},
-        IntrinsicData{IntrinsicType::kIsInf, ParamType::kF32, "isinf"},
-        IntrinsicData{IntrinsicType::kIsNan, ParamType::kF32, "isnan"},
-        IntrinsicData{IntrinsicType::kLdexp, ParamType::kF32, "ldexp"},
-        IntrinsicData{IntrinsicType::kLength, ParamType::kF32, "length"},
-        IntrinsicData{IntrinsicType::kLog, ParamType::kF32, "log"},
-        IntrinsicData{IntrinsicType::kLog2, ParamType::kF32, "log2"},
-        IntrinsicData{IntrinsicType::kMax, ParamType::kF32, "max"},
-        IntrinsicData{IntrinsicType::kMax, ParamType::kU32, "max"},
-        IntrinsicData{IntrinsicType::kMin, ParamType::kF32, "min"},
-        IntrinsicData{IntrinsicType::kMin, ParamType::kU32, "min"},
-        IntrinsicData{IntrinsicType::kMix, ParamType::kF32, "mix"},
-        IntrinsicData{IntrinsicType::kNormalize, ParamType::kF32, "normalize"},
-        IntrinsicData{IntrinsicType::kPow, ParamType::kF32, "pow"},
-        IntrinsicData{IntrinsicType::kReflect, ParamType::kF32, "reflect"},
-        IntrinsicData{IntrinsicType::kReverseBits, ParamType::kU32,
-                      "reversebits"},
-        IntrinsicData{IntrinsicType::kRound, ParamType::kU32, "round"},
-        IntrinsicData{IntrinsicType::kSign, ParamType::kF32, "sign"},
-        IntrinsicData{IntrinsicType::kSin, ParamType::kF32, "sin"},
-        IntrinsicData{IntrinsicType::kSinh, ParamType::kF32, "sinh"},
-        IntrinsicData{IntrinsicType::kSmoothStep, ParamType::kF32,
-                      "smoothstep"},
-        IntrinsicData{IntrinsicType::kSqrt, ParamType::kF32, "sqrt"},
-        IntrinsicData{IntrinsicType::kStep, ParamType::kF32, "step"},
-        IntrinsicData{IntrinsicType::kTan, ParamType::kF32, "tan"},
-        IntrinsicData{IntrinsicType::kTanh, ParamType::kF32, "tanh"},
-        IntrinsicData{IntrinsicType::kTranspose, ParamType::kF32, "transpose"},
-        IntrinsicData{IntrinsicType::kTrunc, ParamType::kF32, "trunc"}));
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, DISABLED_Intrinsic_IsNormal) {
-  FAIL();
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Intrinsic_Call) {
-  auto* call = Call("dot", "param1", "param2");
-
-  Global("param1", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-  Global("param2", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "dot(param1, param2)");
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Select_Scalar) {
-  auto* call = Call("select", 1.0f, 2.0f, true);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "(true ? 2.0f : 1.0f)");
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Select_Vector) {
-  auto* call =
-      Call("select", vec2<i32>(1, 2), vec2<i32>(3, 4), vec2<bool>(true, false));
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "(bvec2(true, false) ? ivec2(3, 4) : ivec2(1, 2))");
-}
-
-#if 0
-TEST_F(GlslGeneratorImplTest_Intrinsic, Modf_Scalar) {
-  auto* res = Var("res", ty.f32());
-  auto* call = Call("modf", 1.0f, AddressOf(res));
-  WrapInFunction(res, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("modf(1.0f, res)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Modf_Vector) {
-  auto* res = Var("res", ty.vec3<f32>());
-  auto* call = Call("modf", vec3<f32>(), AddressOf(res));
-  WrapInFunction(res, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("modf(vec3(0.0f, 0.0f, 0.0f), res)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Frexp_Scalar_i32) {
-  auto* exp = Var("exp", ty.i32());
-  auto* call = Call("frexp", 1.0f, AddressOf(exp));
-  WrapInFunction(exp, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr(R"(
-  float tint_tmp;
-  float tint_tmp_1 = frexp(1.0f, tint_tmp);
-  exp = int(tint_tmp);
-  tint_tmp_1;
-)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Frexp_Vector_i32) {
-  auto* res = Var("res", ty.vec3<i32>());
-  auto* call = Call("frexp", vec3<f32>(), AddressOf(res));
-  WrapInFunction(res, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr(R"(
-  vec3 tint_tmp;
-  vec3 tint_tmp_1 = frexp(vec3(0.0f, 0.0f, 0.0f), tint_tmp);
-  res = ivec3(tint_tmp);
-  tint_tmp_1;
-)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, IsNormal_Scalar) {
-  auto* val = Var("val", ty.f32());
-  auto* call = Call("isNormal", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr(R"(
-  uint tint_isnormal_exponent = asuint(val) & 0x7f80000;
-  uint tint_isnormal_clamped = clamp(tint_isnormal_exponent, 0x0080000, 0x7f00000);
-  (tint_isnormal_clamped == tint_isnormal_exponent);
-)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, IsNormal_Vector) {
-  auto* val = Var("val", ty.vec3<f32>());
-  auto* call = Call("isNormal", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr(R"(
-  uvec3 tint_isnormal_exponent = asuint(val) & 0x7f80000;
-  uvec3 tint_isnormal_clamped = clamp(tint_isnormal_exponent, 0x0080000, 0x7f00000);
-  (tint_isnormal_clamped == tint_isnormal_exponent);
-)"));
-}
-#endif
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Degrees_Scalar) {
-  auto* val = Var("val", ty.f32());
-  auto* call = Call("degrees", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#version 310 es
-precision mediump float;
-
-float tint_degrees(float param_0) {
-  return param_0 * 57.295779513082322865;
-}
-
-
-void test_function() {
-  float val = 0.0f;
-  float tint_symbol = tint_degrees(val);
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  test_function();
-  return;
-}
-)");
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Degrees_Vector) {
-  auto* val = Var("val", ty.vec3<f32>());
-  auto* call = Call("degrees", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#version 310 es
-precision mediump float;
-
-vec3 tint_degrees(vec3 param_0) {
-  return param_0 * 57.295779513082322865;
-}
-
-
-void test_function() {
-  vec3 val = vec3(0.0f, 0.0f, 0.0f);
-  vec3 tint_symbol = tint_degrees(val);
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  test_function();
-  return;
-}
-)");
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Radians_Scalar) {
-  auto* val = Var("val", ty.f32());
-  auto* call = Call("radians", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#version 310 es
-precision mediump float;
-
-float tint_radians(float param_0) {
-  return param_0 * 0.017453292519943295474;
-}
-
-
-void test_function() {
-  float val = 0.0f;
-  float tint_symbol = tint_radians(val);
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  test_function();
-  return;
-}
-)");
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Radians_Vector) {
-  auto* val = Var("val", ty.vec3<f32>());
-  auto* call = Call("radians", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#version 310 es
-precision mediump float;
-
-vec3 tint_radians(vec3 param_0) {
-  return param_0 * 0.017453292519943295474;
-}
-
-
-void test_function() {
-  vec3 val = vec3(0.0f, 0.0f, 0.0f);
-  vec3 tint_symbol = tint_radians(val);
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  test_function();
-  return;
-}
-)");
-}
-
-#if 0
-TEST_F(GlslGeneratorImplTest_Intrinsic, Pack4x8Snorm) {
-  auto* call = Call("pack4x8snorm", "p1");
-  Global("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("ivec4 tint_tmp = ivec4(round(clamp(p1, "
-                                      "-1.0, 1.0) * 127.0)) & 0xff;"));
-  EXPECT_THAT(out.str(), HasSubstr("asuint(tint_tmp.x | tint_tmp.y << 8 | "
-                                   "tint_tmp.z << 16 | tint_tmp.w << 24)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Pack4x8Unorm) {
-  auto* call = Call("pack4x8unorm", "p1");
-  Global("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("uvec4 tint_tmp = uvec4(round(clamp(p1, "
-                                      "0.0, 1.0) * 255.0));"));
-  EXPECT_THAT(out.str(), HasSubstr("(tint_tmp.x | tint_tmp.y << 8 | "
-                                   "tint_tmp.z << 16 | tint_tmp.w << 24)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Pack2x16Snorm) {
-  auto* call = Call("pack2x16snorm", "p1");
-  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("int2 tint_tmp = int2(round(clamp(p1, "
-                                      "-1.0, 1.0) * 32767.0)) & 0xffff;"));
-  EXPECT_THAT(out.str(), HasSubstr("asuint(tint_tmp.x | tint_tmp.y << 16)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Pack2x16Unorm) {
-  auto* call = Call("pack2x16unorm", "p1");
-  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("uint2 tint_tmp = uint2(round(clamp(p1, "
-                                      "0.0, 1.0) * 65535.0));"));
-  EXPECT_THAT(out.str(), HasSubstr("(tint_tmp.x | tint_tmp.y << 16)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Pack2x16Float) {
-  auto* call = Call("pack2x16float", "p1");
-  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("uint2 tint_tmp = f32tof16(p1);"));
-  EXPECT_THAT(out.str(), HasSubstr("(tint_tmp.x | tint_tmp.y << 16)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Unpack4x8Snorm) {
-  auto* call = Call("unpack4x8snorm", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("int tint_tmp_1 = int(p1);"));
-  EXPECT_THAT(gen.result(),
-              HasSubstr("ivec4 tint_tmp = ivec4(tint_tmp_1 << 24, tint_tmp_1 "
-                        "<< 16, tint_tmp_1 << 8, tint_tmp_1) >> 24;"));
-  EXPECT_THAT(out.str(),
-              HasSubstr("clamp(float4(tint_tmp) / 127.0, -1.0, 1.0)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Unpack4x8Unorm) {
-  auto* call = Call("unpack4x8unorm", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("uint tint_tmp_1 = p1;"));
-  EXPECT_THAT(
-      gen.result(),
-      HasSubstr("uvec4 tint_tmp = uvec4(tint_tmp_1 & 0xff, (tint_tmp_1 >> "
-                "8) & 0xff, (tint_tmp_1 >> 16) & 0xff, tint_tmp_1 >> 24);"));
-  EXPECT_THAT(out.str(), HasSubstr("float4(tint_tmp) / 255.0"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Unpack2x16Snorm) {
-  auto* call = Call("unpack2x16snorm", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("int tint_tmp_1 = int(p1);"));
-  EXPECT_THAT(
-      gen.result(),
-      HasSubstr("int2 tint_tmp = int2(tint_tmp_1 << 16, tint_tmp_1) >> 16;"));
-  EXPECT_THAT(out.str(),
-              HasSubstr("clamp(float2(tint_tmp) / 32767.0, -1.0, 1.0)"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Unpack2x16Unorm) {
-  auto* call = Call("unpack2x16unorm", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("uint tint_tmp_1 = p1;"));
-  EXPECT_THAT(gen.result(),
-              HasSubstr("uint2 tint_tmp = uint2(tint_tmp_1 & 0xffff, "
-                        "tint_tmp_1 >> 16);"));
-  EXPECT_THAT(out.str(), HasSubstr("float2(tint_tmp) / 65535.0"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, Unpack2x16Float) {
-  auto* call = Call("unpack2x16float", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_THAT(gen.result(), HasSubstr("uint tint_tmp = p1;"));
-  EXPECT_THAT(out.str(),
-              HasSubstr("f16tof32(uint2(tint_tmp & 0xffff, tint_tmp >> 16))"));
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, StorageBarrier) {
-  Func("main", {}, ty.void_(),
-       {CallStmt(Call("storageBarrier"))},
-       {
-           Stage(ast::PipelineStage::kCompute),
-           WorkgroupSize(1),
-       });
-
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  DeviceMemoryBarrierWithGroupSync();
-  return;
-}
-)");
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, WorkgroupBarrier) {
-  Func("main", {}, ty.void_(),
-       {CallStmt(Call("workgroupBarrier"))},
-       {
-           Stage(ast::PipelineStage::kCompute),
-           WorkgroupSize(1),
-       });
-
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  GroupMemoryBarrierWithGroupSync();
-  return;
-}
-)");
-}
-
-#endif
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, DotI32) {
-  Global("v", ty.vec3<i32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(Call("dot", "v", "v")));
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#version 310 es
-precision mediump float;
-
-int tint_int_dot(ivec3 a, ivec3 b) {
-  return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
-}
-
-ivec3 v = ivec3(0, 0, 0);
-void test_function() {
-  tint_int_dot(v, v);
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  test_function();
-  return;
-}
-)");
-}
-
-TEST_F(GlslGeneratorImplTest_Intrinsic, DotU32) {
-  Global("v", ty.vec3<u32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(Call("dot", "v", "v")));
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#version 310 es
-precision mediump float;
-
-uint tint_int_dot(uvec3 a, uvec3 b) {
-  return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
-}
-
-uvec3 v = uvec3(0u, 0u, 0u);
-void test_function() {
-  tint_int_dot(v, v);
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  test_function();
-  return;
-}
-)");
-}
-
-}  // namespace
-}  // namespace glsl
-}  // namespace writer
-}  // namespace tint
diff --git a/src/writer/glsl/generator_impl_intrinsic_texture_test.cc b/src/writer/glsl/generator_impl_intrinsic_texture_test.cc
deleted file mode 100644
index 128aec2..0000000
--- a/src/writer/glsl/generator_impl_intrinsic_texture_test.cc
+++ /dev/null
@@ -1,302 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "gmock/gmock.h"
-#include "src/ast/call_statement.h"
-#include "src/ast/intrinsic_texture_helper_test.h"
-#include "src/ast/stage_attribute.h"
-#include "src/writer/glsl/test_helper.h"
-
-namespace tint {
-namespace writer {
-namespace glsl {
-namespace {
-
-using ::testing::HasSubstr;
-
-struct ExpectedResult {
-  ExpectedResult(const char* o) : out(o) {}  // NOLINT
-
-  std::string pre;
-  std::string out;
-};
-
-ExpectedResult expected_texture_overload(
-    ast::intrinsic::test::ValidTextureOverload overload) {
-  using ValidTextureOverload = ast::intrinsic::test::ValidTextureOverload;
-  switch (overload) {
-    case ValidTextureOverload::kDimensions1d:
-    case ValidTextureOverload::kDimensions2d:
-    case ValidTextureOverload::kDimensionsDepth2d:
-    case ValidTextureOverload::kDimensionsDepthMultisampled2d:
-    case ValidTextureOverload::kDimensionsMultisampled2d:
-    case ValidTextureOverload::kDimensions2dArray:
-    case ValidTextureOverload::kDimensionsDepth2dArray:
-    case ValidTextureOverload::kDimensions3d:
-    case ValidTextureOverload::kDimensionsCube:
-    case ValidTextureOverload::kDimensionsDepthCube:
-    case ValidTextureOverload::kDimensionsCubeArray:
-    case ValidTextureOverload::kDimensionsDepthCubeArray:
-    case ValidTextureOverload::kDimensions2dLevel:
-    case ValidTextureOverload::kDimensionsDepth2dLevel:
-    case ValidTextureOverload::kDimensions2dArrayLevel:
-    case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
-    case ValidTextureOverload::kDimensions3dLevel:
-    case ValidTextureOverload::kDimensionsCubeLevel:
-    case ValidTextureOverload::kDimensionsDepthCubeLevel:
-    case ValidTextureOverload::kDimensionsCubeArrayLevel:
-    case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
-      return {"textureSize"};
-    case ValidTextureOverload::kDimensionsStorageWO1d:
-    case ValidTextureOverload::kDimensionsStorageWO2d:
-    case ValidTextureOverload::kDimensionsStorageWO2dArray:
-    case ValidTextureOverload::kDimensionsStorageWO3d:
-      return {"imageSize"};
-    case ValidTextureOverload::kGather2dF32:
-      return R"(textureGather(tint_symbol_sampler, vec2(1.0f, 2.0f), 0))";
-    case ValidTextureOverload::kGather2dOffsetF32:
-      return R"(textureGatherOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), ivec2(3, 4), 0))";
-    case ValidTextureOverload::kGather2dArrayF32:
-      return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 0))";
-    case ValidTextureOverload::kGather2dArrayOffsetF32:
-      return R"(textureGatherOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), ivec2(4, 5), 0))";
-    case ValidTextureOverload::kGatherCubeF32:
-      return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 0))";
-    case ValidTextureOverload::kGatherCubeArrayF32:
-      return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 0))";
-    case ValidTextureOverload::kGatherDepth2dF32:
-      return R"(textureGather(tint_symbol_sampler, vec2(1.0f, 2.0f), 0.0))";
-    case ValidTextureOverload::kGatherDepth2dOffsetF32:
-      return R"(textureGatherOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), 0.0, ivec2(3, 4))";
-    case ValidTextureOverload::kGatherDepth2dArrayF32:
-      return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 0.0))";
-    case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
-      return R"(textureGatherOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 0.0, ivec2(4, 5)))";
-    case ValidTextureOverload::kGatherDepthCubeF32:
-      return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 0.0))";
-    case ValidTextureOverload::kGatherDepthCubeArrayF32:
-      return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 0.0))";
-    case ValidTextureOverload::kGatherCompareDepth2dF32:
-      return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f))";
-    case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
-      return R"(textureGatherOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), ivec2(4, 5)))";
-    case ValidTextureOverload::kGatherCompareDepth2dArrayF32:
-      return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 4.0f)))";
-    case ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32:
-      return R"(textureGatherOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 4.0f), ivec2(5, 6)))";
-    case ValidTextureOverload::kGatherCompareDepthCubeF32:
-      return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, 4.0f)))";
-    case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
-      return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
-    case ValidTextureOverload::kNumLayers2dArray:
-    case ValidTextureOverload::kNumLayersDepth2dArray:
-    case ValidTextureOverload::kNumLayersCubeArray:
-    case ValidTextureOverload::kNumLayersDepthCubeArray:
-    case ValidTextureOverload::kNumLayersStorageWO2dArray:
-    case ValidTextureOverload::kNumLevels2d:
-    case ValidTextureOverload::kNumLevelsCube:
-    case ValidTextureOverload::kNumLevelsDepth2d:
-    case ValidTextureOverload::kNumLevelsDepthCube:
-    case ValidTextureOverload::kNumLevels2dArray:
-    case ValidTextureOverload::kNumLevels3d:
-    case ValidTextureOverload::kNumLevelsCubeArray:
-    case ValidTextureOverload::kNumLevelsDepth2dArray:
-    case ValidTextureOverload::kNumLevelsDepthCubeArray:
-      return {"textureQueryLevels"};
-    case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
-    case ValidTextureOverload::kNumSamplesMultisampled2d:
-      return {"textureSamples"};
-    case ValidTextureOverload::kSample1dF32:
-      return R"(texture(tint_symbol_sampler, 1.0f);)";
-    case ValidTextureOverload::kSample2dF32:
-      return R"(texture(tint_symbol_sampler, vec2(1.0f, 2.0f));)";
-    case ValidTextureOverload::kSample2dOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), ivec2(3, 4));)";
-    case ValidTextureOverload::kSample2dArrayF32:
-      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)));)";
-    case ValidTextureOverload::kSample2dArrayOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), ivec2(4, 5));)";
-    case ValidTextureOverload::kSample3dF32:
-      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f));)";
-    case ValidTextureOverload::kSample3dOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), ivec3(4, 5, 6));)";
-    case ValidTextureOverload::kSampleCubeF32:
-      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f));)";
-    case ValidTextureOverload::kSampleCubeArrayF32:
-      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)));)";
-    case ValidTextureOverload::kSampleDepth2dF32:
-      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 0.0f));)";
-    case ValidTextureOverload::kSampleDepth2dOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 0.0f), ivec2(3, 4));)";
-    case ValidTextureOverload::kSampleDepth2dArrayF32:
-      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 0.0f));)";
-    case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 0.0f), ivec2(4, 5));)";
-    case ValidTextureOverload::kSampleDepthCubeF32:
-      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, 0.0f));)";
-    case ValidTextureOverload::kSampleDepthCubeArrayF32:
-      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 0.0f);)";
-    case ValidTextureOverload::kSampleBias2dF32:
-      return R"(texture(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f);)";
-    case ValidTextureOverload::kSampleBias2dOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), ivec2(4, 5), 3.0f);)";
-    case ValidTextureOverload::kSampleBias2dArrayF32:
-      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, float(4)), 3.0f);)";
-    case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), ivec2(5, 6), 4.0f);)";
-    case ValidTextureOverload::kSampleBias3dF32:
-      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleBias3dOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), ivec3(5, 6, 7), 4.0f);)";
-    case ValidTextureOverload::kSampleBiasCubeF32:
-      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleBiasCubeArrayF32:
-      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(3)), 4.0f);)";
-    case ValidTextureOverload::kSampleLevel2dF32:
-      return R"(textureLod(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f);)";
-    case ValidTextureOverload::kSampleLevel2dOffsetF32:
-      return R"(textureLodOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
-    case ValidTextureOverload::kSampleLevel2dArrayF32:
-      return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 4.0f);)";
-    case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
-      return R"(textureLodOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 4.0f, ivec2(5, 6));)";
-    case ValidTextureOverload::kSampleLevel3dF32:
-      return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleLevel3dOffsetF32:
-      return R"(textureLodOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f, ivec3(5, 6, 7));)";
-    case ValidTextureOverload::kSampleLevelCubeF32:
-      return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleLevelCubeArrayF32:
-      return R"(textureLod(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
-    case ValidTextureOverload::kSampleLevelDepth2dF32:
-      return R"(textureLod(tint_symbol_sampler, vec2(1.0f, 2.0f), 3).x;)";
-    case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
-      return R"(textureLodOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), 3, ivec2(4, 5)).x;)";
-    case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
-      return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 4).x;)";
-    case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
-      return R"(textureLodOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 4, ivec2(5, 6)).x;)";
-    case ValidTextureOverload::kSampleLevelDepthCubeF32:
-      return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4).x;)";
-    case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
-      return R"(textureLod(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5).x;)";
-    case ValidTextureOverload::kSampleGrad2dF32:
-      return R"(textureGrad(tint_symbol_sampler, vec2(1.0f, 2.0f), vec2(3.0f, 4.0f), vec2(5.0f, 6.0f));)";
-    case ValidTextureOverload::kSampleGrad2dOffsetF32:
-      return R"(textureGradOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), vec2(3.0f, 4.0f), vec2(5.0f, 6.0f), ivec2(7, 7));)";
-    case ValidTextureOverload::kSampleGrad2dArrayF32:
-      return R"(textureGrad(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));)";
-    case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
-      return R"(textureGradOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f), ivec2(6, 7));)";
-    case ValidTextureOverload::kSampleGrad3dF32:
-      return R"(textureGrad(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));)";
-    case ValidTextureOverload::kSampleGrad3dOffsetF32:
-      return R"(textureGradOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f), ivec3(0, 1, 2));)";
-    case ValidTextureOverload::kSampleGradCubeF32:
-      return R"(textureGrad(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));)";
-    case ValidTextureOverload::kSampleGradCubeArrayF32:
-      return R"(textureGrad(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), vec3(5.0f, 6.0f, 7.0f), vec3(8.0f, 9.0f, 10.0f));)";
-    case ValidTextureOverload::kSampleCompareDepth2dF32:
-      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f));)";
-    case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), ivec2(4, 5));)";
-    case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
-      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, float(4), 3.0f));)";
-    case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(4), 3.0f), ivec2(5, 6));)";
-    case ValidTextureOverload::kSampleCompareDepthCubeF32:
-      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, 4.0f));)";
-    case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
-      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
-      return R"(yyytexture(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f);)";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
-      return R"(yyytextureOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
-      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, float(4)), 3.0f);)";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
-      return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(4)), 3.0f, ivec2(5, 6));)";
-    case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
-      return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
-      return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
-    case ValidTextureOverload::kLoad1dLevelF32:
-    case ValidTextureOverload::kLoad1dLevelU32:
-    case ValidTextureOverload::kLoad1dLevelI32:
-      return R"(texelFetch(tint_symbol_2, 1, 3);)";
-    case ValidTextureOverload::kLoad2dLevelF32:
-    case ValidTextureOverload::kLoad2dLevelU32:
-    case ValidTextureOverload::kLoad2dLevelI32:
-      return R"(texelFetch(tint_symbol_2, ivec2(1, 2), 3);)";
-    case ValidTextureOverload::kLoad2dArrayLevelF32:
-    case ValidTextureOverload::kLoad2dArrayLevelU32:
-    case ValidTextureOverload::kLoad2dArrayLevelI32:
-    case ValidTextureOverload::kLoad3dLevelF32:
-    case ValidTextureOverload::kLoad3dLevelU32:
-    case ValidTextureOverload::kLoad3dLevelI32:
-      return R"(texelFetch(tint_symbol_2, ivec3(1, 2, 3), 4);)";
-    case ValidTextureOverload::kLoadDepthMultisampled2dF32:
-    case ValidTextureOverload::kLoadMultisampled2dF32:
-    case ValidTextureOverload::kLoadMultisampled2dU32:
-    case ValidTextureOverload::kLoadMultisampled2dI32:
-      return R"(texelFetch(tint_symbol_2, ivec2(1, 2), 3);)";
-    case ValidTextureOverload::kLoadDepth2dLevelF32:
-      return R"(texelFetch(tint_symbol_2, ivec2(1, 2), 3).x;)";
-    case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
-      return R"(texelFetch(tint_symbol_2, ivec3(1, 2, 3), 4).x;)";
-    case ValidTextureOverload::kStoreWO1dRgba32float:
-      return R"(imageStore(tint_symbol_2, 1, vec4(2.0f, 3.0f, 4.0f, 5.0f));)";
-    case ValidTextureOverload::kStoreWO2dRgba32float:
-      return R"(imageStore(tint_symbol_2, ivec2(1, 2), vec4(3.0f, 4.0f, 5.0f, 6.0f));)";
-    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
-      return R"(imageStore(tint_symbol_2, ivec3(1, 2, 3), vec4(4.0f, 5.0f, 6.0f, 7.0f));)";
-    case ValidTextureOverload::kStoreWO3dRgba32float:
-      return R"(imageStore(tint_symbol_2, ivec3(1, 2, 3), vec4(4.0f, 5.0f, 6.0f, 7.0f));)";
-  }
-  return "<unmatched texture overload>";
-}  // NOLINT - Ignore the length of this function
-
-class GlslGeneratorIntrinsicTextureTest
-    : public TestParamHelper<ast::intrinsic::test::TextureOverloadCase> {};
-
-TEST_P(GlslGeneratorIntrinsicTextureTest, Call) {
-  auto param = GetParam();
-
-  param.BuildTextureVariable(this);
-  param.BuildSamplerVariable(this);
-
-  auto* call = Call(param.function, param.args(this));
-  auto* stmt = CallStmt(call);
-
-  Func("main", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-
-  auto expected = expected_texture_overload(param.overload);
-
-  EXPECT_THAT(gen.result(), HasSubstr(expected.pre));
-  EXPECT_THAT(gen.result(), HasSubstr(expected.out));
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    GlslGeneratorIntrinsicTextureTest,
-    GlslGeneratorIntrinsicTextureTest,
-    testing::ValuesIn(ast::intrinsic::test::TextureOverloadCase::ValidCases()));
-
-}  // namespace
-}  // namespace glsl
-}  // namespace writer
-}  // namespace tint
diff --git a/src/writer/hlsl/generator_impl.cc b/src/writer/hlsl/generator_impl.cc
index 1e8feee..6d20ace 100644
--- a/src/writer/hlsl/generator_impl.cc
+++ b/src/writer/hlsl/generator_impl.cc
@@ -933,8 +933,8 @@
   if (auto* func = target->As<sem::Function>()) {
     return EmitFunctionCall(out, call, func);
   }
-  if (auto* intrinsic = target->As<sem::Intrinsic>()) {
-    return EmitIntrinsicCall(out, call, intrinsic);
+  if (auto* builtin = target->As<sem::Builtin>()) {
+    return EmitBuiltinCall(out, call, builtin);
   }
   if (auto* conv = target->As<sem::TypeConversion>()) {
     return EmitTypeConversion(out, call, conv);
@@ -1001,44 +1001,44 @@
   return true;
 }
 
-bool GeneratorImpl::EmitIntrinsicCall(std::ostream& out,
-                                      const sem::Call* call,
-                                      const sem::Intrinsic* intrinsic) {
+bool GeneratorImpl::EmitBuiltinCall(std::ostream& out,
+                                    const sem::Call* call,
+                                    const sem::Builtin* builtin) {
   auto* expr = call->Declaration();
-  if (intrinsic->IsTexture()) {
-    return EmitTextureCall(out, call, intrinsic);
+  if (builtin->IsTexture()) {
+    return EmitTextureCall(out, call, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kSelect) {
+  if (builtin->Type() == sem::BuiltinType::kSelect) {
     return EmitSelectCall(out, expr);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kModf) {
-    return EmitModfCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kModf) {
+    return EmitModfCall(out, expr, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kFrexp) {
-    return EmitFrexpCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kFrexp) {
+    return EmitFrexpCall(out, expr, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kIsNormal) {
-    return EmitIsNormalCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kIsNormal) {
+    return EmitIsNormalCall(out, expr, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kDegrees) {
-    return EmitDegreesCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kDegrees) {
+    return EmitDegreesCall(out, expr, builtin);
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kRadians) {
-    return EmitRadiansCall(out, expr, intrinsic);
+  if (builtin->Type() == sem::BuiltinType::kRadians) {
+    return EmitRadiansCall(out, expr, builtin);
   }
-  if (intrinsic->IsDataPacking()) {
-    return EmitDataPackingCall(out, expr, intrinsic);
+  if (builtin->IsDataPacking()) {
+    return EmitDataPackingCall(out, expr, builtin);
   }
-  if (intrinsic->IsDataUnpacking()) {
-    return EmitDataUnpackingCall(out, expr, intrinsic);
+  if (builtin->IsDataUnpacking()) {
+    return EmitDataUnpackingCall(out, expr, builtin);
   }
-  if (intrinsic->IsBarrier()) {
-    return EmitBarrierCall(out, intrinsic);
+  if (builtin->IsBarrier()) {
+    return EmitBarrierCall(out, builtin);
   }
-  if (intrinsic->IsAtomic()) {
-    return EmitWorkgroupAtomicCall(out, expr, intrinsic);
+  if (builtin->IsAtomic()) {
+    return EmitWorkgroupAtomicCall(out, expr, builtin);
   }
-  auto name = generate_builtin_name(intrinsic);
+  auto name = generate_builtin_name(builtin);
   if (name.empty()) {
     return false;
   }
@@ -1637,17 +1637,17 @@
 
 bool GeneratorImpl::EmitWorkgroupAtomicCall(std::ostream& out,
                                             const ast::CallExpression* expr,
-                                            const sem::Intrinsic* intrinsic) {
+                                            const sem::Builtin* builtin) {
   std::string result = UniqueIdentifier("atomic_result");
 
-  if (!intrinsic->ReturnType()->Is<sem::Void>()) {
+  if (!builtin->ReturnType()->Is<sem::Void>()) {
     auto pre = line();
-    if (!EmitTypeAndName(pre, intrinsic->ReturnType(), ast::StorageClass::kNone,
+    if (!EmitTypeAndName(pre, builtin->ReturnType(), ast::StorageClass::kNone,
                          ast::Access::kUndefined, result)) {
       return false;
     }
     pre << " = ";
-    if (!EmitZeroValue(pre, intrinsic->ReturnType())) {
+    if (!EmitZeroValue(pre, builtin->ReturnType())) {
       return false;
     }
     pre << ";";
@@ -1664,7 +1664,7 @@
         if (i > 0) {
           pre << ", ";
         }
-        if (i == 1 && intrinsic->Type() == sem::IntrinsicType::kAtomicSub) {
+        if (i == 1 && builtin->Type() == sem::BuiltinType::kAtomicSub) {
           // Sub uses InterlockedAdd with the operand negated.
           pre << "-";
         }
@@ -1682,8 +1682,8 @@
     return true;
   };
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kAtomicLoad: {
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kAtomicLoad: {
       // HLSL does not have an InterlockedLoad, so we emulate it with
       // InterlockedOr using 0 as the OR value
       auto pre = line();
@@ -1700,12 +1700,12 @@
       out << result;
       return true;
     }
-    case sem::IntrinsicType::kAtomicStore: {
+    case sem::BuiltinType::kAtomicStore: {
       // HLSL does not have an InterlockedStore, so we emulate it with
       // InterlockedExchange and discard the returned value
       {  // T result = 0;
         auto pre = line();
-        auto* value_ty = intrinsic->Parameters()[1]->Type()->UnwrapRef();
+        auto* value_ty = builtin->Parameters()[1]->Type()->UnwrapRef();
         if (!EmitTypeAndName(pre, value_ty, ast::StorageClass::kNone,
                              ast::Access::kUndefined, result)) {
           return false;
@@ -1731,7 +1731,7 @@
       }
       return true;
     }
-    case sem::IntrinsicType::kAtomicCompareExchangeWeak: {
+    case sem::BuiltinType::kAtomicCompareExchangeWeak: {
       auto* dest = expr->args[0];
       auto* compare_value = expr->args[1];
       auto* value = expr->args[2];
@@ -1777,26 +1777,26 @@
       return true;
     }
 
-    case sem::IntrinsicType::kAtomicAdd:
-    case sem::IntrinsicType::kAtomicSub:
+    case sem::BuiltinType::kAtomicAdd:
+    case sem::BuiltinType::kAtomicSub:
       return call("InterlockedAdd");
 
-    case sem::IntrinsicType::kAtomicMax:
+    case sem::BuiltinType::kAtomicMax:
       return call("InterlockedMax");
 
-    case sem::IntrinsicType::kAtomicMin:
+    case sem::BuiltinType::kAtomicMin:
       return call("InterlockedMin");
 
-    case sem::IntrinsicType::kAtomicAnd:
+    case sem::BuiltinType::kAtomicAnd:
       return call("InterlockedAnd");
 
-    case sem::IntrinsicType::kAtomicOr:
+    case sem::BuiltinType::kAtomicOr:
       return call("InterlockedOr");
 
-    case sem::IntrinsicType::kAtomicXor:
+    case sem::BuiltinType::kAtomicXor:
       return call("InterlockedXor");
 
-    case sem::IntrinsicType::kAtomicExchange:
+    case sem::BuiltinType::kAtomicExchange:
       return call("InterlockedExchange");
 
     default:
@@ -1804,7 +1804,7 @@
   }
 
   TINT_UNREACHABLE(Writer, diagnostics_)
-      << "unsupported atomic intrinsic: " << intrinsic->Type();
+      << "unsupported atomic builtin: " << builtin->Type();
   return false;
 }
 
@@ -1835,11 +1835,11 @@
 
 bool GeneratorImpl::EmitModfCall(std::ostream& out,
                                  const ast::CallExpression* expr,
-                                 const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                 const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
-        auto* ty = intrinsic->Parameters()[0]->Type();
+        auto* ty = builtin->Parameters()[0]->Type();
         auto in = params[0];
 
         std::string width;
@@ -1850,7 +1850,7 @@
         // Emit the builtin return type unique to this overload. This does not
         // exist in the AST, so it will not be generated in Generate().
         if (!EmitStructType(&helpers_,
-                            intrinsic->ReturnType()->As<sem::Struct>())) {
+                            builtin->ReturnType()->As<sem::Struct>())) {
           return false;
         }
 
@@ -1858,7 +1858,7 @@
         line(b) << "float" << width << " fract = modf(" << in << ", whole);";
         {
           auto l = line(b);
-          if (!EmitType(l, intrinsic->ReturnType(), ast::StorageClass::kNone,
+          if (!EmitType(l, builtin->ReturnType(), ast::StorageClass::kNone,
                         ast::Access::kUndefined, "")) {
             return false;
           }
@@ -1871,11 +1871,11 @@
 
 bool GeneratorImpl::EmitFrexpCall(std::ostream& out,
                                   const ast::CallExpression* expr,
-                                  const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                  const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
-        auto* ty = intrinsic->Parameters()[0]->Type();
+        auto* ty = builtin->Parameters()[0]->Type();
         auto in = params[0];
 
         std::string width;
@@ -1886,7 +1886,7 @@
         // Emit the builtin return type unique to this overload. This does not
         // exist in the AST, so it will not be generated in Generate().
         if (!EmitStructType(&helpers_,
-                            intrinsic->ReturnType()->As<sem::Struct>())) {
+                            builtin->ReturnType()->As<sem::Struct>())) {
           return false;
         }
 
@@ -1894,7 +1894,7 @@
         line(b) << "float" << width << " sig = frexp(" << in << ", exp);";
         {
           auto l = line(b);
-          if (!EmitType(l, intrinsic->ReturnType(), ast::StorageClass::kNone,
+          if (!EmitType(l, builtin->ReturnType(), ast::StorageClass::kNone,
                         ast::Access::kUndefined, "")) {
             return false;
           }
@@ -1907,12 +1907,12 @@
 
 bool GeneratorImpl::EmitIsNormalCall(std::ostream& out,
                                      const ast::CallExpression* expr,
-                                     const sem::Intrinsic* intrinsic) {
-  // HLSL doesn't have a isNormal intrinsic, we need to emulate
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                     const sem::Builtin* builtin) {
+  // HLSL doesn't have a isNormal builtin, we need to emulate
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
-        auto* input_ty = intrinsic->Parameters()[0]->Type();
+        auto* input_ty = builtin->Parameters()[0]->Type();
 
         std::string width;
         if (auto* vec = input_ty->As<sem::Vector>()) {
@@ -1935,9 +1935,9 @@
 
 bool GeneratorImpl::EmitDegreesCall(std::ostream& out,
                                     const ast::CallExpression* expr,
-                                    const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                    const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
         line(b) << "return " << params[0] << " * " << std::setprecision(20)
                 << sem::kRadToDeg << ";";
@@ -1947,9 +1947,9 @@
 
 bool GeneratorImpl::EmitRadiansCall(std::ostream& out,
                                     const ast::CallExpression* expr,
-                                    const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                    const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
         line(b) << "return " << params[0] << " * " << std::setprecision(20)
                 << sem::kDegToRad << ";";
@@ -1959,28 +1959,28 @@
 
 bool GeneratorImpl::EmitDataPackingCall(std::ostream& out,
                                         const ast::CallExpression* expr,
-                                        const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                        const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
         uint32_t dims = 2;
         bool is_signed = false;
         uint32_t scale = 65535;
-        if (intrinsic->Type() == sem::IntrinsicType::kPack4x8snorm ||
-            intrinsic->Type() == sem::IntrinsicType::kPack4x8unorm) {
+        if (builtin->Type() == sem::BuiltinType::kPack4x8snorm ||
+            builtin->Type() == sem::BuiltinType::kPack4x8unorm) {
           dims = 4;
           scale = 255;
         }
-        if (intrinsic->Type() == sem::IntrinsicType::kPack4x8snorm ||
-            intrinsic->Type() == sem::IntrinsicType::kPack2x16snorm) {
+        if (builtin->Type() == sem::BuiltinType::kPack4x8snorm ||
+            builtin->Type() == sem::BuiltinType::kPack2x16snorm) {
           is_signed = true;
           scale = (scale - 1) / 2;
         }
-        switch (intrinsic->Type()) {
-          case sem::IntrinsicType::kPack4x8snorm:
-          case sem::IntrinsicType::kPack4x8unorm:
-          case sem::IntrinsicType::kPack2x16snorm:
-          case sem::IntrinsicType::kPack2x16unorm: {
+        switch (builtin->Type()) {
+          case sem::BuiltinType::kPack4x8snorm:
+          case sem::BuiltinType::kPack4x8unorm:
+          case sem::BuiltinType::kPack2x16snorm:
+          case sem::BuiltinType::kPack2x16unorm: {
             {
               auto l = line(b);
               l << (is_signed ? "" : "u") << "int" << dims
@@ -2007,7 +2007,7 @@
             }
             break;
           }
-          case sem::IntrinsicType::kPack2x16float: {
+          case sem::BuiltinType::kPack2x16float: {
             line(b) << "uint2 i = f32tof16(" << params[0] << ");";
             line(b) << "return i.x | (i.y << 16);";
             break;
@@ -2015,7 +2015,7 @@
           default:
             diagnostics_.add_error(
                 diag::System::Writer,
-                "Internal error: unhandled data packing intrinsic");
+                "Internal error: unhandled data packing builtin");
             return false;
         }
 
@@ -2025,26 +2025,26 @@
 
 bool GeneratorImpl::EmitDataUnpackingCall(std::ostream& out,
                                           const ast::CallExpression* expr,
-                                          const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                          const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
         uint32_t dims = 2;
         bool is_signed = false;
         uint32_t scale = 65535;
-        if (intrinsic->Type() == sem::IntrinsicType::kUnpack4x8snorm ||
-            intrinsic->Type() == sem::IntrinsicType::kUnpack4x8unorm) {
+        if (builtin->Type() == sem::BuiltinType::kUnpack4x8snorm ||
+            builtin->Type() == sem::BuiltinType::kUnpack4x8unorm) {
           dims = 4;
           scale = 255;
         }
-        if (intrinsic->Type() == sem::IntrinsicType::kUnpack4x8snorm ||
-            intrinsic->Type() == sem::IntrinsicType::kUnpack2x16snorm) {
+        if (builtin->Type() == sem::BuiltinType::kUnpack4x8snorm ||
+            builtin->Type() == sem::BuiltinType::kUnpack2x16snorm) {
           is_signed = true;
           scale = (scale - 1) / 2;
         }
-        switch (intrinsic->Type()) {
-          case sem::IntrinsicType::kUnpack4x8snorm:
-          case sem::IntrinsicType::kUnpack2x16snorm: {
+        switch (builtin->Type()) {
+          case sem::BuiltinType::kUnpack4x8snorm:
+          case sem::BuiltinType::kUnpack2x16snorm: {
             line(b) << "int j = int(" << params[0] << ");";
             {  // Perform sign extension on the converted values.
               auto l = line(b);
@@ -2060,8 +2060,8 @@
                     << ".0, " << (is_signed ? "-1.0" : "0.0") << ", 1.0);";
             break;
           }
-          case sem::IntrinsicType::kUnpack4x8unorm:
-          case sem::IntrinsicType::kUnpack2x16unorm: {
+          case sem::BuiltinType::kUnpack4x8unorm:
+          case sem::BuiltinType::kUnpack2x16unorm: {
             line(b) << "uint j = " << params[0] << ";";
             {
               auto l = line(b);
@@ -2078,14 +2078,14 @@
             line(b) << "return float" << dims << "(i) / " << scale << ".0;";
             break;
           }
-          case sem::IntrinsicType::kUnpack2x16float:
+          case sem::BuiltinType::kUnpack2x16float:
             line(b) << "uint i = " << params[0] << ";";
             line(b) << "return f16tof32(uint2(i & 0xffff, i >> 16));";
             break;
           default:
             diagnostics_.add_error(
                 diag::System::Writer,
-                "Internal error: unhandled data packing intrinsic");
+                "Internal error: unhandled data packing builtin");
             return false;
         }
 
@@ -2094,16 +2094,16 @@
 }
 
 bool GeneratorImpl::EmitBarrierCall(std::ostream& out,
-                                    const sem::Intrinsic* intrinsic) {
+                                    const sem::Builtin* builtin) {
   // TODO(crbug.com/tint/661): Combine sequential barriers to a single
   // instruction.
-  if (intrinsic->Type() == sem::IntrinsicType::kWorkgroupBarrier) {
+  if (builtin->Type() == sem::BuiltinType::kWorkgroupBarrier) {
     out << "GroupMemoryBarrierWithGroupSync()";
-  } else if (intrinsic->Type() == sem::IntrinsicType::kStorageBarrier) {
+  } else if (builtin->Type() == sem::BuiltinType::kStorageBarrier) {
     out << "DeviceMemoryBarrierWithGroupSync()";
   } else {
     TINT_UNREACHABLE(Writer, diagnostics_)
-        << "unexpected barrier intrinsic type " << sem::str(intrinsic->Type());
+        << "unexpected barrier builtin type " << sem::str(builtin->Type());
     return false;
   }
   return true;
@@ -2111,10 +2111,10 @@
 
 bool GeneratorImpl::EmitTextureCall(std::ostream& out,
                                     const sem::Call* call,
-                                    const sem::Intrinsic* intrinsic) {
+                                    const sem::Builtin* builtin) {
   using Usage = sem::ParameterUsage;
 
-  auto& signature = intrinsic->Signature();
+  auto& signature = builtin->Signature();
   auto* expr = call->Declaration();
   auto arguments = expr->args;
 
@@ -2132,19 +2132,19 @@
 
   auto* texture_type = TypeOf(texture)->UnwrapRef()->As<sem::Texture>();
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kTextureDimensions:
-    case sem::IntrinsicType::kTextureNumLayers:
-    case sem::IntrinsicType::kTextureNumLevels:
-    case sem::IntrinsicType::kTextureNumSamples: {
-      // All of these intrinsics use the GetDimensions() method on the texture
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kTextureDimensions:
+    case sem::BuiltinType::kTextureNumLayers:
+    case sem::BuiltinType::kTextureNumLevels:
+    case sem::BuiltinType::kTextureNumSamples: {
+      // All of these builtins use the GetDimensions() method on the texture
       bool is_ms = texture_type->IsAnyOf<sem::MultisampledTexture,
                                          sem::DepthMultisampledTexture>();
       int num_dimensions = 0;
       std::string swizzle;
 
-      switch (intrinsic->Type()) {
-        case sem::IntrinsicType::kTextureDimensions:
+      switch (builtin->Type()) {
+        case sem::BuiltinType::kTextureDimensions:
           switch (texture_type->dim()) {
             case ast::TextureDimension::kNone:
               TINT_ICE(Writer, diagnostics_) << "texture dimension is kNone";
@@ -2172,7 +2172,7 @@
               break;
           }
           break;
-        case sem::IntrinsicType::kTextureNumLayers:
+        case sem::BuiltinType::kTextureNumLayers:
           switch (texture_type->dim()) {
             default:
               TINT_ICE(Writer, diagnostics_)
@@ -2188,7 +2188,7 @@
               break;
           }
           break;
-        case sem::IntrinsicType::kTextureNumLevels:
+        case sem::BuiltinType::kTextureNumLevels:
           switch (texture_type->dim()) {
             default:
               TINT_ICE(Writer, diagnostics_)
@@ -2211,7 +2211,7 @@
               break;
           }
           break;
-        case sem::IntrinsicType::kTextureNumSamples:
+        case sem::BuiltinType::kTextureNumSamples:
           switch (texture_type->dim()) {
             default:
               TINT_ICE(Writer, diagnostics_)
@@ -2228,7 +2228,7 @@
           }
           break;
         default:
-          TINT_ICE(Writer, diagnostics_) << "unexpected intrinsic";
+          TINT_ICE(Writer, diagnostics_) << "unexpected builtin";
           return false;
       }
 
@@ -2251,7 +2251,7 @@
 
       if (num_dimensions > 4) {
         TINT_ICE(Writer, diagnostics_)
-            << "Texture query intrinsic temporary vector has " << num_dimensions
+            << "Texture query builtin temporary vector has " << num_dimensions
             << " dimensions";
         return false;
       }
@@ -2276,7 +2276,7 @@
             return false;
           }
           pre << ", ";
-        } else if (intrinsic->Type() == sem::IntrinsicType::kTextureNumLevels) {
+        } else if (builtin->Type() == sem::BuiltinType::kTextureNumLevels) {
           pre << "0, ";
         }
 
@@ -2314,44 +2314,44 @@
     return false;
 
   // If pack_level_in_coords is true, then the mip level will be appended as the
-  // last value of the coordinates argument. If the WGSL intrinsic overload does
+  // last value of the coordinates argument. If the WGSL builtin overload does
   // not have a level parameter and pack_level_in_coords is true, then a zero
   // mip level will be inserted.
   bool pack_level_in_coords = false;
 
   uint32_t hlsl_ret_width = 4u;
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kTextureSample:
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kTextureSample:
       out << ".Sample(";
       break;
-    case sem::IntrinsicType::kTextureSampleBias:
+    case sem::BuiltinType::kTextureSampleBias:
       out << ".SampleBias(";
       break;
-    case sem::IntrinsicType::kTextureSampleLevel:
+    case sem::BuiltinType::kTextureSampleLevel:
       out << ".SampleLevel(";
       break;
-    case sem::IntrinsicType::kTextureSampleGrad:
+    case sem::BuiltinType::kTextureSampleGrad:
       out << ".SampleGrad(";
       break;
-    case sem::IntrinsicType::kTextureSampleCompare:
+    case sem::BuiltinType::kTextureSampleCompare:
       out << ".SampleCmp(";
       hlsl_ret_width = 1;
       break;
-    case sem::IntrinsicType::kTextureSampleCompareLevel:
+    case sem::BuiltinType::kTextureSampleCompareLevel:
       out << ".SampleCmpLevelZero(";
       hlsl_ret_width = 1;
       break;
-    case sem::IntrinsicType::kTextureLoad:
+    case sem::BuiltinType::kTextureLoad:
       out << ".Load(";
       // Multisampled textures do not support mip-levels.
       if (!texture_type->Is<sem::MultisampledTexture>()) {
         pack_level_in_coords = true;
       }
       break;
-    case sem::IntrinsicType::kTextureGather:
+    case sem::BuiltinType::kTextureGather:
       out << ".Gather";
-      if (intrinsic->Parameters()[0]->Usage() ==
+      if (builtin->Parameters()[0]->Usage() ==
           sem::ParameterUsage::kComponent) {
         switch (call->Arguments()[0]->ConstantValue().Elements()[0].i32) {
           case 0:
@@ -2370,17 +2370,17 @@
       }
       out << "(";
       break;
-    case sem::IntrinsicType::kTextureGatherCompare:
+    case sem::BuiltinType::kTextureGatherCompare:
       out << ".GatherCmp(";
       break;
-    case sem::IntrinsicType::kTextureStore:
+    case sem::BuiltinType::kTextureStore:
       out << "[";
       break;
     default:
       diagnostics_.add_error(
           diag::System::Writer,
-          "Internal compiler error: Unhandled texture intrinsic '" +
-              std::string(intrinsic->str()) + "'");
+          "Internal compiler error: Unhandled texture builtin '" +
+              std::string(builtin->str()) + "'");
       return false;
   }
 
@@ -2451,7 +2451,7 @@
     }
   }
 
-  if (intrinsic->Type() == sem::IntrinsicType::kTextureStore) {
+  if (builtin->Type() == sem::BuiltinType::kTextureStore) {
     out << "] = ";
     if (!EmitExpression(out, arg(Usage::kValue))) {
       return false;
@@ -2459,11 +2459,11 @@
   } else {
     out << ")";
 
-    // If the intrinsic return type does not match the number of elements of the
-    // HLSL intrinsic, we need to swizzle the expression to generate the correct
+    // If the builtin return type does not match the number of elements of the
+    // HLSL builtin, we need to swizzle the expression to generate the correct
     // number of components.
     uint32_t wgsl_ret_width = 1;
-    if (auto* vec = intrinsic->ReturnType()->As<sem::Vector>()) {
+    if (auto* vec = builtin->ReturnType()->As<sem::Vector>()) {
       wgsl_ret_width = vec->Width();
     }
     if (wgsl_ret_width < hlsl_ret_width) {
@@ -2476,7 +2476,7 @@
       TINT_ICE(Writer, diagnostics_)
           << "WGSL return width (" << wgsl_ret_width
           << ") is wider than HLSL return width (" << hlsl_ret_width << ") for "
-          << intrinsic->Type();
+          << builtin->Type();
       return false;
     }
   }
@@ -2484,92 +2484,91 @@
   return true;
 }
 
-std::string GeneratorImpl::generate_builtin_name(
-    const sem::Intrinsic* intrinsic) {
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kAbs:
-    case sem::IntrinsicType::kAcos:
-    case sem::IntrinsicType::kAll:
-    case sem::IntrinsicType::kAny:
-    case sem::IntrinsicType::kAsin:
-    case sem::IntrinsicType::kAtan:
-    case sem::IntrinsicType::kAtan2:
-    case sem::IntrinsicType::kCeil:
-    case sem::IntrinsicType::kClamp:
-    case sem::IntrinsicType::kCos:
-    case sem::IntrinsicType::kCosh:
-    case sem::IntrinsicType::kCross:
-    case sem::IntrinsicType::kDeterminant:
-    case sem::IntrinsicType::kDistance:
-    case sem::IntrinsicType::kDot:
-    case sem::IntrinsicType::kExp:
-    case sem::IntrinsicType::kExp2:
-    case sem::IntrinsicType::kFloor:
-    case sem::IntrinsicType::kFrexp:
-    case sem::IntrinsicType::kLdexp:
-    case sem::IntrinsicType::kLength:
-    case sem::IntrinsicType::kLog:
-    case sem::IntrinsicType::kLog2:
-    case sem::IntrinsicType::kMax:
-    case sem::IntrinsicType::kMin:
-    case sem::IntrinsicType::kModf:
-    case sem::IntrinsicType::kNormalize:
-    case sem::IntrinsicType::kPow:
-    case sem::IntrinsicType::kReflect:
-    case sem::IntrinsicType::kRefract:
-    case sem::IntrinsicType::kRound:
-    case sem::IntrinsicType::kSign:
-    case sem::IntrinsicType::kSin:
-    case sem::IntrinsicType::kSinh:
-    case sem::IntrinsicType::kSqrt:
-    case sem::IntrinsicType::kStep:
-    case sem::IntrinsicType::kTan:
-    case sem::IntrinsicType::kTanh:
-    case sem::IntrinsicType::kTranspose:
-    case sem::IntrinsicType::kTrunc:
-      return intrinsic->str();
-    case sem::IntrinsicType::kCountOneBits:
+std::string GeneratorImpl::generate_builtin_name(const sem::Builtin* builtin) {
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kAbs:
+    case sem::BuiltinType::kAcos:
+    case sem::BuiltinType::kAll:
+    case sem::BuiltinType::kAny:
+    case sem::BuiltinType::kAsin:
+    case sem::BuiltinType::kAtan:
+    case sem::BuiltinType::kAtan2:
+    case sem::BuiltinType::kCeil:
+    case sem::BuiltinType::kClamp:
+    case sem::BuiltinType::kCos:
+    case sem::BuiltinType::kCosh:
+    case sem::BuiltinType::kCross:
+    case sem::BuiltinType::kDeterminant:
+    case sem::BuiltinType::kDistance:
+    case sem::BuiltinType::kDot:
+    case sem::BuiltinType::kExp:
+    case sem::BuiltinType::kExp2:
+    case sem::BuiltinType::kFloor:
+    case sem::BuiltinType::kFrexp:
+    case sem::BuiltinType::kLdexp:
+    case sem::BuiltinType::kLength:
+    case sem::BuiltinType::kLog:
+    case sem::BuiltinType::kLog2:
+    case sem::BuiltinType::kMax:
+    case sem::BuiltinType::kMin:
+    case sem::BuiltinType::kModf:
+    case sem::BuiltinType::kNormalize:
+    case sem::BuiltinType::kPow:
+    case sem::BuiltinType::kReflect:
+    case sem::BuiltinType::kRefract:
+    case sem::BuiltinType::kRound:
+    case sem::BuiltinType::kSign:
+    case sem::BuiltinType::kSin:
+    case sem::BuiltinType::kSinh:
+    case sem::BuiltinType::kSqrt:
+    case sem::BuiltinType::kStep:
+    case sem::BuiltinType::kTan:
+    case sem::BuiltinType::kTanh:
+    case sem::BuiltinType::kTranspose:
+    case sem::BuiltinType::kTrunc:
+      return builtin->str();
+    case sem::BuiltinType::kCountOneBits:
       return "countbits";
-    case sem::IntrinsicType::kDpdx:
+    case sem::BuiltinType::kDpdx:
       return "ddx";
-    case sem::IntrinsicType::kDpdxCoarse:
+    case sem::BuiltinType::kDpdxCoarse:
       return "ddx_coarse";
-    case sem::IntrinsicType::kDpdxFine:
+    case sem::BuiltinType::kDpdxFine:
       return "ddx_fine";
-    case sem::IntrinsicType::kDpdy:
+    case sem::BuiltinType::kDpdy:
       return "ddy";
-    case sem::IntrinsicType::kDpdyCoarse:
+    case sem::BuiltinType::kDpdyCoarse:
       return "ddy_coarse";
-    case sem::IntrinsicType::kDpdyFine:
+    case sem::BuiltinType::kDpdyFine:
       return "ddy_fine";
-    case sem::IntrinsicType::kFaceForward:
+    case sem::BuiltinType::kFaceForward:
       return "faceforward";
-    case sem::IntrinsicType::kFract:
+    case sem::BuiltinType::kFract:
       return "frac";
-    case sem::IntrinsicType::kFma:
+    case sem::BuiltinType::kFma:
       return "mad";
-    case sem::IntrinsicType::kFwidth:
-    case sem::IntrinsicType::kFwidthCoarse:
-    case sem::IntrinsicType::kFwidthFine:
+    case sem::BuiltinType::kFwidth:
+    case sem::BuiltinType::kFwidthCoarse:
+    case sem::BuiltinType::kFwidthFine:
       return "fwidth";
-    case sem::IntrinsicType::kInverseSqrt:
+    case sem::BuiltinType::kInverseSqrt:
       return "rsqrt";
-    case sem::IntrinsicType::kIsFinite:
+    case sem::BuiltinType::kIsFinite:
       return "isfinite";
-    case sem::IntrinsicType::kIsInf:
+    case sem::BuiltinType::kIsInf:
       return "isinf";
-    case sem::IntrinsicType::kIsNan:
+    case sem::BuiltinType::kIsNan:
       return "isnan";
-    case sem::IntrinsicType::kMix:
+    case sem::BuiltinType::kMix:
       return "lerp";
-    case sem::IntrinsicType::kReverseBits:
+    case sem::BuiltinType::kReverseBits:
       return "reversebits";
-    case sem::IntrinsicType::kSmoothStep:
+    case sem::BuiltinType::kSmoothStep:
       return "smoothstep";
     default:
       diagnostics_.add_error(
           diag::System::Writer,
-          "Unknown builtin method: " + std::string(intrinsic->str()));
+          "Unknown builtin method: " + std::string(builtin->str()));
   }
 
   return "";
@@ -3892,28 +3891,28 @@
 }
 
 template <typename F>
-bool GeneratorImpl::CallIntrinsicHelper(std::ostream& out,
-                                        const ast::CallExpression* call,
-                                        const sem::Intrinsic* intrinsic,
-                                        F&& build) {
+bool GeneratorImpl::CallBuiltinHelper(std::ostream& out,
+                                      const ast::CallExpression* call,
+                                      const sem::Builtin* builtin,
+                                      F&& build) {
   // Generate the helper function if it hasn't been created already
-  auto fn = utils::GetOrCreate(intrinsics_, intrinsic, [&]() -> std::string {
+  auto fn = utils::GetOrCreate(builtins_, builtin, [&]() -> std::string {
     TextBuffer b;
     TINT_DEFER(helpers_.Append(b));
 
     auto fn_name =
-        UniqueIdentifier(std::string("tint_") + sem::str(intrinsic->Type()));
+        UniqueIdentifier(std::string("tint_") + sem::str(builtin->Type()));
     std::vector<std::string> parameter_names;
     {
       auto decl = line(&b);
-      if (!EmitTypeAndName(decl, intrinsic->ReturnType(),
+      if (!EmitTypeAndName(decl, builtin->ReturnType(),
                            ast::StorageClass::kNone, ast::Access::kUndefined,
                            fn_name)) {
         return "";
       }
       {
         ScopedParen sp(decl);
-        for (auto* param : intrinsic->Parameters()) {
+        for (auto* param : builtin->Parameters()) {
           if (!parameter_names.empty()) {
             decl << ", ";
           }
diff --git a/src/writer/hlsl/generator_impl.h b/src/writer/hlsl/generator_impl.h
index 716b581..8685d3f 100644
--- a/src/writer/hlsl/generator_impl.h
+++ b/src/writer/hlsl/generator_impl.h
@@ -44,7 +44,7 @@
 // Forward declarations
 namespace sem {
 class Call;
-class Intrinsic;
+class Builtin;
 class TypeConstructor;
 class TypeConversion;
 }  // namespace sem
@@ -145,14 +145,14 @@
   bool EmitFunctionCall(std::ostream& out,
                         const sem::Call* call,
                         const sem::Function* function);
-  /// Handles generating an intrinsic call expression
+  /// Handles generating a builtin call expression
   /// @param out the output of the expression stream
   /// @param call the call expression
-  /// @param intrinsic the intrinsic being called
+  /// @param builtin the builtin being called
   /// @returns true if the expression is emitted
-  bool EmitIntrinsicCall(std::ostream& out,
-                         const sem::Call* call,
-                         const sem::Intrinsic* intrinsic);
+  bool EmitBuiltinCall(std::ostream& out,
+                       const sem::Call* call,
+                       const sem::Builtin* builtin);
   /// Handles generating a type conversion expression
   /// @param out the output of the expression stream
   /// @param call the call expression
@@ -191,9 +191,9 @@
       const transform::DecomposeMemoryAccess::Intrinsic* intrinsic);
   /// Handles generating a barrier intrinsic call
   /// @param out the output of the expression stream
-  /// @param intrinsic the semantic information for the barrier intrinsic
+  /// @param builtin the semantic information for the barrier builtin
   /// @returns true if the call expression is emitted
-  bool EmitBarrierCall(std::ostream& out, const sem::Intrinsic* intrinsic);
+  bool EmitBarrierCall(std::ostream& out, const sem::Builtin* builtin);
   /// Handles generating an atomic intrinsic call for a storage buffer variable
   /// @param out the output of the expression stream
   /// @param expr the call expression
@@ -206,81 +206,81 @@
   /// Handles generating an atomic intrinsic call for a workgroup variable
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the atomic intrinsic
+  /// @param builtin the semantic information for the atomic builtin
   /// @returns true if the call expression is emitted
   bool EmitWorkgroupAtomicCall(std::ostream& out,
                                const ast::CallExpression* expr,
-                               const sem::Intrinsic* intrinsic);
+                               const sem::Builtin* builtin);
   /// Handles generating a call to a texture function (`textureSample`,
   /// `textureSampleGrad`, etc)
   /// @param out the output of the expression stream
   /// @param call the call expression
-  /// @param intrinsic the semantic information for the texture intrinsic
+  /// @param builtin the semantic information for the texture builtin
   /// @returns true if the call expression is emitted
   bool EmitTextureCall(std::ostream& out,
                        const sem::Call* call,
-                       const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `select()` intrinsic
+                       const sem::Builtin* builtin);
+  /// Handles generating a call to the `select()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
   /// @returns true if the call expression is emitted
   bool EmitSelectCall(std::ostream& out, const ast::CallExpression* expr);
-  /// Handles generating a call to the `modf()` intrinsic
+  /// Handles generating a call to the `modf()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitModfCall(std::ostream& out,
                     const ast::CallExpression* expr,
-                    const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `frexp()` intrinsic
+                    const sem::Builtin* builtin);
+  /// Handles generating a call to the `frexp()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitFrexpCall(std::ostream& out,
                      const ast::CallExpression* expr,
-                     const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `isNormal()` intrinsic
+                     const sem::Builtin* builtin);
+  /// Handles generating a call to the `isNormal()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitIsNormalCall(std::ostream& out,
                         const ast::CallExpression* expr,
-                        const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `degrees()` intrinsic
+                        const sem::Builtin* builtin);
+  /// Handles generating a call to the `degrees()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitDegreesCall(std::ostream& out,
                        const ast::CallExpression* expr,
-                       const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `radians()` intrinsic
+                       const sem::Builtin* builtin);
+  /// Handles generating a call to the `radians()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitRadiansCall(std::ostream& out,
                        const ast::CallExpression* expr,
-                       const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to data packing intrinsic
+                       const sem::Builtin* builtin);
+  /// Handles generating a call to data packing builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the texture intrinsic
+  /// @param builtin the semantic information for the texture builtin
   /// @returns true if the call expression is emitted
   bool EmitDataPackingCall(std::ostream& out,
                            const ast::CallExpression* expr,
-                           const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to data unpacking intrinsic
+                           const sem::Builtin* builtin);
+  /// Handles generating a call to data unpacking builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the texture intrinsic
+  /// @param builtin the semantic information for the texture builtin
   /// @returns true if the call expression is emitted
   bool EmitDataUnpackingCall(std::ostream& out,
                              const ast::CallExpression* expr,
-                             const sem::Intrinsic* intrinsic);
+                             const sem::Builtin* builtin);
   /// Handles a case statement
   /// @param s the switch statement
   /// @param case_idx the index of the switch case in the switch statement
@@ -473,9 +473,9 @@
                                          const sem::Matrix* mat);
 
   /// Handles generating a builtin method name
-  /// @param intrinsic the semantic info for the intrinsic
+  /// @param builtin the semantic info for the builtin
   /// @returns the name or "" if not valid
-  std::string generate_builtin_name(const sem::Intrinsic* intrinsic);
+  std::string generate_builtin_name(const sem::Builtin* builtin);
   /// Converts a builtin to an attribute name
   /// @param builtin the builtin to convert
   /// @returns the string name of the builtin or blank on error
@@ -513,13 +513,13 @@
     };
   };
 
-  /// CallIntrinsicHelper will call the intrinsic helper function, creating it
-  /// if it hasn't been built already. If the intrinsic needs to be built then
-  /// CallIntrinsicHelper will generate the function signature and will call
+  /// CallBuiltinHelper will call the builtin helper function, creating it
+  /// if it hasn't been built already. If the builtin needs to be built then
+  /// CallBuiltinHelper will generate the function signature and will call
   /// `build` to emit the body of the function.
   /// @param out the output of the expression stream
   /// @param call the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @param build a function with the signature:
   ///        `bool(TextBuffer* buffer, const std::vector<std::string>& params)`
   ///        Where:
@@ -527,16 +527,16 @@
   ///          `params` is the name of all the generated function parameters
   /// @returns true if the call expression is emitted
   template <typename F>
-  bool CallIntrinsicHelper(std::ostream& out,
-                           const ast::CallExpression* call,
-                           const sem::Intrinsic* intrinsic,
-                           F&& build);
+  bool CallBuiltinHelper(std::ostream& out,
+                         const ast::CallExpression* call,
+                         const sem::Builtin* builtin,
+                         F&& build);
 
   TextBuffer helpers_;  // Helper functions emitted at the top of the output
   std::function<bool()> emit_continuing_;
   std::unordered_map<DMAIntrinsic, std::string, DMAIntrinsic::Hasher>
       dma_intrinsics_;
-  std::unordered_map<const sem::Intrinsic*, std::string> intrinsics_;
+  std::unordered_map<const sem::Builtin*, std::string> builtins_;
   std::unordered_map<const sem::Struct*, std::string> structure_builders_;
   std::unordered_map<const sem::Vector*, std::string> dynamic_vector_write_;
   std::unordered_map<const sem::Matrix*, std::string>
diff --git a/src/writer/hlsl/generator_impl_builtin_test.cc b/src/writer/hlsl/generator_impl_builtin_test.cc
new file mode 100644
index 0000000..5b38b36
--- /dev/null
+++ b/src/writer/hlsl/generator_impl_builtin_test.cc
@@ -0,0 +1,790 @@
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "gmock/gmock.h"
+#include "src/ast/call_statement.h"
+#include "src/ast/stage_attribute.h"
+#include "src/sem/call.h"
+#include "src/writer/hlsl/test_helper.h"
+
+namespace tint {
+namespace writer {
+namespace hlsl {
+namespace {
+
+using BuiltinType = sem::BuiltinType;
+
+using ::testing::HasSubstr;
+
+using HlslGeneratorImplTest_Builtin = TestHelper;
+
+enum class ParamType {
+  kF32,
+  kU32,
+  kBool,
+};
+
+struct BuiltinData {
+  BuiltinType builtin;
+  ParamType type;
+  const char* hlsl_name;
+};
+inline std::ostream& operator<<(std::ostream& out, BuiltinData data) {
+  out << data.hlsl_name;
+  switch (data.type) {
+    case ParamType::kF32:
+      out << "f32";
+      break;
+    case ParamType::kU32:
+      out << "u32";
+      break;
+    case ParamType::kBool:
+      out << "bool";
+      break;
+  }
+  out << ">";
+  return out;
+}
+
+const ast::CallExpression* GenerateCall(BuiltinType builtin,
+                                        ParamType type,
+                                        ProgramBuilder* builder) {
+  std::string name;
+  std::ostringstream str(name);
+  str << builtin;
+  switch (builtin) {
+    case BuiltinType::kAcos:
+    case BuiltinType::kAsin:
+    case BuiltinType::kAtan:
+    case BuiltinType::kCeil:
+    case BuiltinType::kCos:
+    case BuiltinType::kCosh:
+    case BuiltinType::kDpdx:
+    case BuiltinType::kDpdxCoarse:
+    case BuiltinType::kDpdxFine:
+    case BuiltinType::kDpdy:
+    case BuiltinType::kDpdyCoarse:
+    case BuiltinType::kDpdyFine:
+    case BuiltinType::kExp:
+    case BuiltinType::kExp2:
+    case BuiltinType::kFloor:
+    case BuiltinType::kFract:
+    case BuiltinType::kFwidth:
+    case BuiltinType::kFwidthCoarse:
+    case BuiltinType::kFwidthFine:
+    case BuiltinType::kInverseSqrt:
+    case BuiltinType::kIsFinite:
+    case BuiltinType::kIsInf:
+    case BuiltinType::kIsNan:
+    case BuiltinType::kIsNormal:
+    case BuiltinType::kLength:
+    case BuiltinType::kLog:
+    case BuiltinType::kLog2:
+    case BuiltinType::kNormalize:
+    case BuiltinType::kRound:
+    case BuiltinType::kSin:
+    case BuiltinType::kSinh:
+    case BuiltinType::kSqrt:
+    case BuiltinType::kTan:
+    case BuiltinType::kTanh:
+    case BuiltinType::kTrunc:
+    case BuiltinType::kSign:
+      return builder->Call(str.str(), "f2");
+    case BuiltinType::kLdexp:
+      return builder->Call(str.str(), "f2", "i2");
+    case BuiltinType::kAtan2:
+    case BuiltinType::kDot:
+    case BuiltinType::kDistance:
+    case BuiltinType::kPow:
+    case BuiltinType::kReflect:
+    case BuiltinType::kStep:
+      return builder->Call(str.str(), "f2", "f2");
+    case BuiltinType::kCross:
+      return builder->Call(str.str(), "f3", "f3");
+    case BuiltinType::kFma:
+    case BuiltinType::kMix:
+    case BuiltinType::kFaceForward:
+    case BuiltinType::kSmoothStep:
+      return builder->Call(str.str(), "f2", "f2", "f2");
+    case BuiltinType::kAll:
+    case BuiltinType::kAny:
+      return builder->Call(str.str(), "b2");
+    case BuiltinType::kAbs:
+      if (type == ParamType::kF32) {
+        return builder->Call(str.str(), "f2");
+      } else {
+        return builder->Call(str.str(), "u2");
+      }
+    case BuiltinType::kCountOneBits:
+    case BuiltinType::kReverseBits:
+      return builder->Call(str.str(), "u2");
+    case BuiltinType::kMax:
+    case BuiltinType::kMin:
+      if (type == ParamType::kF32) {
+        return builder->Call(str.str(), "f2", "f2");
+      } else {
+        return builder->Call(str.str(), "u2", "u2");
+      }
+    case BuiltinType::kClamp:
+      if (type == ParamType::kF32) {
+        return builder->Call(str.str(), "f2", "f2", "f2");
+      } else {
+        return builder->Call(str.str(), "u2", "u2", "u2");
+      }
+    case BuiltinType::kSelect:
+      return builder->Call(str.str(), "f2", "f2", "b2");
+    case BuiltinType::kDeterminant:
+      return builder->Call(str.str(), "m2x2");
+    case BuiltinType::kTranspose:
+      return builder->Call(str.str(), "m3x2");
+    default:
+      break;
+  }
+  return nullptr;
+}
+using HlslBuiltinTest = TestParamHelper<BuiltinData>;
+TEST_P(HlslBuiltinTest, Emit) {
+  auto param = GetParam();
+
+  Global("f2", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  Global("f3", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+  Global("u2", ty.vec2<u32>(), ast::StorageClass::kPrivate);
+  Global("i2", ty.vec2<i32>(), ast::StorageClass::kPrivate);
+  Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
+  Global("m2x2", ty.mat2x2<f32>(), ast::StorageClass::kPrivate);
+  Global("m3x2", ty.mat3x2<f32>(), ast::StorageClass::kPrivate);
+
+  auto* call = GenerateCall(param.builtin, param.type, this);
+  ASSERT_NE(nullptr, call) << "Unhandled builtin";
+  Func("func", {}, ty.void_(), {CallStmt(call)},
+       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
+
+  GeneratorImpl& gen = Build();
+
+  auto* sem = program->Sem().Get(call);
+  ASSERT_NE(sem, nullptr);
+  auto* target = sem->Target();
+  ASSERT_NE(target, nullptr);
+  auto* builtin = target->As<sem::Builtin>();
+  ASSERT_NE(builtin, nullptr);
+
+  EXPECT_EQ(gen.generate_builtin_name(builtin), param.hlsl_name);
+}
+INSTANTIATE_TEST_SUITE_P(
+    HlslGeneratorImplTest_Builtin,
+    HlslBuiltinTest,
+    testing::Values(
+        BuiltinData{BuiltinType::kAbs, ParamType::kF32, "abs"},
+        BuiltinData{BuiltinType::kAbs, ParamType::kU32, "abs"},
+        BuiltinData{BuiltinType::kAcos, ParamType::kF32, "acos"},
+        BuiltinData{BuiltinType::kAll, ParamType::kBool, "all"},
+        BuiltinData{BuiltinType::kAny, ParamType::kBool, "any"},
+        BuiltinData{BuiltinType::kAsin, ParamType::kF32, "asin"},
+        BuiltinData{BuiltinType::kAtan, ParamType::kF32, "atan"},
+        BuiltinData{BuiltinType::kAtan2, ParamType::kF32, "atan2"},
+        BuiltinData{BuiltinType::kCeil, ParamType::kF32, "ceil"},
+        BuiltinData{BuiltinType::kClamp, ParamType::kF32, "clamp"},
+        BuiltinData{BuiltinType::kClamp, ParamType::kU32, "clamp"},
+        BuiltinData{BuiltinType::kCos, ParamType::kF32, "cos"},
+        BuiltinData{BuiltinType::kCosh, ParamType::kF32, "cosh"},
+        BuiltinData{BuiltinType::kCountOneBits, ParamType::kU32, "countbits"},
+        BuiltinData{BuiltinType::kCross, ParamType::kF32, "cross"},
+        BuiltinData{BuiltinType::kDeterminant, ParamType::kF32, "determinant"},
+        BuiltinData{BuiltinType::kDistance, ParamType::kF32, "distance"},
+        BuiltinData{BuiltinType::kDot, ParamType::kF32, "dot"},
+        BuiltinData{BuiltinType::kDpdx, ParamType::kF32, "ddx"},
+        BuiltinData{BuiltinType::kDpdxCoarse, ParamType::kF32, "ddx_coarse"},
+        BuiltinData{BuiltinType::kDpdxFine, ParamType::kF32, "ddx_fine"},
+        BuiltinData{BuiltinType::kDpdy, ParamType::kF32, "ddy"},
+        BuiltinData{BuiltinType::kDpdyCoarse, ParamType::kF32, "ddy_coarse"},
+        BuiltinData{BuiltinType::kDpdyFine, ParamType::kF32, "ddy_fine"},
+        BuiltinData{BuiltinType::kExp, ParamType::kF32, "exp"},
+        BuiltinData{BuiltinType::kExp2, ParamType::kF32, "exp2"},
+        BuiltinData{BuiltinType::kFaceForward, ParamType::kF32, "faceforward"},
+        BuiltinData{BuiltinType::kFloor, ParamType::kF32, "floor"},
+        BuiltinData{BuiltinType::kFma, ParamType::kF32, "mad"},
+        BuiltinData{BuiltinType::kFract, ParamType::kF32, "frac"},
+        BuiltinData{BuiltinType::kFwidth, ParamType::kF32, "fwidth"},
+        BuiltinData{BuiltinType::kFwidthCoarse, ParamType::kF32, "fwidth"},
+        BuiltinData{BuiltinType::kFwidthFine, ParamType::kF32, "fwidth"},
+        BuiltinData{BuiltinType::kInverseSqrt, ParamType::kF32, "rsqrt"},
+        BuiltinData{BuiltinType::kIsFinite, ParamType::kF32, "isfinite"},
+        BuiltinData{BuiltinType::kIsInf, ParamType::kF32, "isinf"},
+        BuiltinData{BuiltinType::kIsNan, ParamType::kF32, "isnan"},
+        BuiltinData{BuiltinType::kLdexp, ParamType::kF32, "ldexp"},
+        BuiltinData{BuiltinType::kLength, ParamType::kF32, "length"},
+        BuiltinData{BuiltinType::kLog, ParamType::kF32, "log"},
+        BuiltinData{BuiltinType::kLog2, ParamType::kF32, "log2"},
+        BuiltinData{BuiltinType::kMax, ParamType::kF32, "max"},
+        BuiltinData{BuiltinType::kMax, ParamType::kU32, "max"},
+        BuiltinData{BuiltinType::kMin, ParamType::kF32, "min"},
+        BuiltinData{BuiltinType::kMin, ParamType::kU32, "min"},
+        BuiltinData{BuiltinType::kMix, ParamType::kF32, "lerp"},
+        BuiltinData{BuiltinType::kNormalize, ParamType::kF32, "normalize"},
+        BuiltinData{BuiltinType::kPow, ParamType::kF32, "pow"},
+        BuiltinData{BuiltinType::kReflect, ParamType::kF32, "reflect"},
+        BuiltinData{BuiltinType::kReverseBits, ParamType::kU32, "reversebits"},
+        BuiltinData{BuiltinType::kRound, ParamType::kU32, "round"},
+        BuiltinData{BuiltinType::kSign, ParamType::kF32, "sign"},
+        BuiltinData{BuiltinType::kSin, ParamType::kF32, "sin"},
+        BuiltinData{BuiltinType::kSinh, ParamType::kF32, "sinh"},
+        BuiltinData{BuiltinType::kSmoothStep, ParamType::kF32, "smoothstep"},
+        BuiltinData{BuiltinType::kSqrt, ParamType::kF32, "sqrt"},
+        BuiltinData{BuiltinType::kStep, ParamType::kF32, "step"},
+        BuiltinData{BuiltinType::kTan, ParamType::kF32, "tan"},
+        BuiltinData{BuiltinType::kTanh, ParamType::kF32, "tanh"},
+        BuiltinData{BuiltinType::kTranspose, ParamType::kF32, "transpose"},
+        BuiltinData{BuiltinType::kTrunc, ParamType::kF32, "trunc"}));
+
+TEST_F(HlslGeneratorImplTest_Builtin, DISABLED_Builtin_IsNormal) {
+  FAIL();
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Builtin_Call) {
+  auto* call = Call("dot", "param1", "param2");
+
+  Global("param1", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+  Global("param2", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "dot(param1, param2)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Select_Scalar) {
+  auto* call = Call("select", 1.0f, 2.0f, true);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "(true ? 2.0f : 1.0f)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Select_Vector) {
+  auto* call =
+      Call("select", vec2<i32>(1, 2), vec2<i32>(3, 4), vec2<bool>(true, false));
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  gen.increment_indent();
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "(bool2(true, false) ? int2(3, 4) : int2(1, 2))");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Modf_Scalar) {
+  auto* call = Call("modf", 1.0f);
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(struct modf_result {
+  float fract;
+  float whole;
+};
+modf_result tint_modf(float param_0) {
+  float whole;
+  float fract = modf(param_0, whole);
+  modf_result result = {fract, whole};
+  return result;
+}
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_modf(1.0f);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Modf_Vector) {
+  auto* call = Call("modf", vec3<f32>());
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(struct modf_result_vec3 {
+  float3 fract;
+  float3 whole;
+};
+modf_result_vec3 tint_modf(float3 param_0) {
+  float3 whole;
+  float3 fract = modf(param_0, whole);
+  modf_result_vec3 result = {fract, whole};
+  return result;
+}
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_modf(float3(0.0f, 0.0f, 0.0f));
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Frexp_Scalar_i32) {
+  auto* call = Call("frexp", 1.0f);
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(struct frexp_result {
+  float sig;
+  int exp;
+};
+frexp_result tint_frexp(float param_0) {
+  float exp;
+  float sig = frexp(param_0, exp);
+  frexp_result result = {sig, int(exp)};
+  return result;
+}
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_frexp(1.0f);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Frexp_Vector_i32) {
+  auto* call = Call("frexp", vec3<f32>());
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(struct frexp_result_vec3 {
+  float3 sig;
+  int3 exp;
+};
+frexp_result_vec3 tint_frexp(float3 param_0) {
+  float3 exp;
+  float3 sig = frexp(param_0, exp);
+  frexp_result_vec3 result = {sig, int3(exp)};
+  return result;
+}
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_frexp(float3(0.0f, 0.0f, 0.0f));
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, IsNormal_Scalar) {
+  auto* val = Var("val", ty.f32());
+  auto* call = Call("isNormal", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(bool tint_isNormal(float param_0) {
+  uint exponent = asuint(param_0) & 0x7f80000;
+  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  float val = 0.0f;
+  const bool tint_symbol = tint_isNormal(val);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, IsNormal_Vector) {
+  auto* val = Var("val", ty.vec3<f32>());
+  auto* call = Call("isNormal", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(bool3 tint_isNormal(float3 param_0) {
+  uint3 exponent = asuint(param_0) & 0x7f80000;
+  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  float3 val = float3(0.0f, 0.0f, 0.0f);
+  const bool3 tint_symbol = tint_isNormal(val);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Degrees_Scalar) {
+  auto* val = Var("val", ty.f32());
+  auto* call = Call("degrees", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(float tint_degrees(float param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  float val = 0.0f;
+  const float tint_symbol = tint_degrees(val);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Degrees_Vector) {
+  auto* val = Var("val", ty.vec3<f32>());
+  auto* call = Call("degrees", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(float3 tint_degrees(float3 param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  float3 val = float3(0.0f, 0.0f, 0.0f);
+  const float3 tint_symbol = tint_degrees(val);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Radians_Scalar) {
+  auto* val = Var("val", ty.f32());
+  auto* call = Call("radians", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(float tint_radians(float param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  float val = 0.0f;
+  const float tint_symbol = tint_radians(val);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Radians_Vector) {
+  auto* val = Var("val", ty.vec3<f32>());
+  auto* call = Call("radians", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(float3 tint_radians(float3 param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  float3 val = float3(0.0f, 0.0f, 0.0f);
+  const float3 tint_symbol = tint_radians(val);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Pack4x8Snorm) {
+  auto* call = Call("pack4x8snorm", "p1");
+  Global("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(uint tint_pack4x8snorm(float4 param_0) {
+  int4 i = int4(round(clamp(param_0, -1.0, 1.0) * 127.0)) & 0xff;
+  return asuint(i.x | i.y << 8 | i.z << 16 | i.w << 24);
+}
+
+static float4 p1 = float4(0.0f, 0.0f, 0.0f, 0.0f);
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_pack4x8snorm(p1);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Pack4x8Unorm) {
+  auto* call = Call("pack4x8unorm", "p1");
+  Global("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(uint tint_pack4x8unorm(float4 param_0) {
+  uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0));
+  return (i.x | i.y << 8 | i.z << 16 | i.w << 24);
+}
+
+static float4 p1 = float4(0.0f, 0.0f, 0.0f, 0.0f);
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_pack4x8unorm(p1);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Pack2x16Snorm) {
+  auto* call = Call("pack2x16snorm", "p1");
+  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(uint tint_pack2x16snorm(float2 param_0) {
+  int2 i = int2(round(clamp(param_0, -1.0, 1.0) * 32767.0)) & 0xffff;
+  return asuint(i.x | i.y << 16);
+}
+
+static float2 p1 = float2(0.0f, 0.0f);
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_pack2x16snorm(p1);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Pack2x16Unorm) {
+  auto* call = Call("pack2x16unorm", "p1");
+  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(uint tint_pack2x16unorm(float2 param_0) {
+  uint2 i = uint2(round(clamp(param_0, 0.0, 1.0) * 65535.0));
+  return (i.x | i.y << 16);
+}
+
+static float2 p1 = float2(0.0f, 0.0f);
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_pack2x16unorm(p1);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Pack2x16Float) {
+  auto* call = Call("pack2x16float", "p1");
+  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(uint tint_pack2x16float(float2 param_0) {
+  uint2 i = f32tof16(param_0);
+  return i.x | (i.y << 16);
+}
+
+static float2 p1 = float2(0.0f, 0.0f);
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_pack2x16float(p1);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Unpack4x8Snorm) {
+  auto* call = Call("unpack4x8snorm", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(float4 tint_unpack4x8snorm(uint param_0) {
+  int j = int(param_0);
+  int4 i = int4(j << 24, j << 16, j << 8, j) >> 24;
+  return clamp(float4(i) / 127.0, -1.0, 1.0);
+}
+
+static uint p1 = 0u;
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_unpack4x8snorm(p1);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Unpack4x8Unorm) {
+  auto* call = Call("unpack4x8unorm", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(float4 tint_unpack4x8unorm(uint param_0) {
+  uint j = param_0;
+  uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24);
+  return float4(i) / 255.0;
+}
+
+static uint p1 = 0u;
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_unpack4x8unorm(p1);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Unpack2x16Snorm) {
+  auto* call = Call("unpack2x16snorm", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(float2 tint_unpack2x16snorm(uint param_0) {
+  int j = int(param_0);
+  int2 i = int2(j << 16, j) >> 16;
+  return clamp(float2(i) / 32767.0, -1.0, 1.0);
+}
+
+static uint p1 = 0u;
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_unpack2x16snorm(p1);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Unpack2x16Unorm) {
+  auto* call = Call("unpack2x16unorm", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(float2 tint_unpack2x16unorm(uint param_0) {
+  uint j = param_0;
+  uint2 i = uint2(j & 0xffff, j >> 16);
+  return float2(i) / 65535.0;
+}
+
+static uint p1 = 0u;
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_unpack2x16unorm(p1);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, Unpack2x16Float) {
+  auto* call = Call("unpack2x16float", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(float2 tint_unpack2x16float(uint param_0) {
+  uint i = param_0;
+  return f16tof32(uint2(i & 0xffff, i >> 16));
+}
+
+static uint p1 = 0u;
+
+[numthreads(1, 1, 1)]
+void test_function() {
+  tint_unpack2x16float(p1);
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, StorageBarrier) {
+  Func("main", {}, ty.void_(), {CallStmt(Call("storageBarrier"))},
+       {
+           Stage(ast::PipelineStage::kCompute),
+           WorkgroupSize(1),
+       });
+
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"([numthreads(1, 1, 1)]
+void main() {
+  DeviceMemoryBarrierWithGroupSync();
+  return;
+}
+)");
+}
+
+TEST_F(HlslGeneratorImplTest_Builtin, WorkgroupBarrier) {
+  Func("main", {}, ty.void_(), {CallStmt(Call("workgroupBarrier"))},
+       {
+           Stage(ast::PipelineStage::kCompute),
+           WorkgroupSize(1),
+       });
+
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"([numthreads(1, 1, 1)]
+void main() {
+  GroupMemoryBarrierWithGroupSync();
+  return;
+}
+)");
+}
+
+}  // namespace
+}  // namespace hlsl
+}  // namespace writer
+}  // namespace tint
diff --git a/src/writer/hlsl/generator_impl_builtin_texture_test.cc b/src/writer/hlsl/generator_impl_builtin_texture_test.cc
new file mode 100644
index 0000000..332b4ad
--- /dev/null
+++ b/src/writer/hlsl/generator_impl_builtin_texture_test.cc
@@ -0,0 +1,396 @@
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "gmock/gmock.h"
+#include "src/ast/builtin_texture_helper_test.h"
+#include "src/ast/call_statement.h"
+#include "src/ast/stage_attribute.h"
+#include "src/writer/hlsl/test_helper.h"
+
+namespace tint {
+namespace writer {
+namespace hlsl {
+namespace {
+
+using ::testing::HasSubstr;
+
+struct ExpectedResult {
+  ExpectedResult(const char* o) : out(o) {}  // NOLINT
+  ExpectedResult(const char* p, const char* o) : pre(p), out(o) {}
+
+  std::string pre;
+  std::string out;
+};
+
+ExpectedResult expected_texture_overload(
+    ast::builtin::test::ValidTextureOverload overload) {
+  using ValidTextureOverload = ast::builtin::test::ValidTextureOverload;
+  switch (overload) {
+    case ValidTextureOverload::kDimensions1d:
+    case ValidTextureOverload::kDimensionsStorageWO1d:
+      return {
+          R"(int tint_tmp;
+  tint_symbol.GetDimensions(tint_tmp);
+)",
+          "tint_tmp;",
+      };
+    case ValidTextureOverload::kDimensions2d:
+    case ValidTextureOverload::kDimensionsDepth2d:
+    case ValidTextureOverload::kDimensionsStorageWO2d:
+      return {
+          R"(int2 tint_tmp;
+  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y);
+)",
+          "tint_tmp;",
+      };
+    case ValidTextureOverload::kDimensionsDepthMultisampled2d:
+    case ValidTextureOverload::kDimensionsMultisampled2d:
+      return {
+          R"(int3 tint_tmp;
+  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+)",
+          "tint_tmp.xy;",
+      };
+
+    case ValidTextureOverload::kDimensions2dArray:
+    case ValidTextureOverload::kDimensionsDepth2dArray:
+    case ValidTextureOverload::kDimensionsStorageWO2dArray:
+      return {
+          R"(int3 tint_tmp;
+  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+)",
+          "tint_tmp.xy;",
+      };
+    case ValidTextureOverload::kDimensions3d:
+    case ValidTextureOverload::kDimensionsStorageWO3d:
+      return {
+          R"(int3 tint_tmp;
+  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+)",
+          "tint_tmp;",
+      };
+    case ValidTextureOverload::kDimensionsCube:
+    case ValidTextureOverload::kDimensionsDepthCube:
+      return {
+          R"(int2 tint_tmp;
+  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y);
+)",
+          "tint_tmp;",
+      };
+    case ValidTextureOverload::kDimensionsCubeArray:
+    case ValidTextureOverload::kDimensionsDepthCubeArray:
+      return {
+          R"(int3 tint_tmp;
+  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+)",
+          "tint_tmp.xy;",
+      };
+    case ValidTextureOverload::kDimensions2dLevel:
+    case ValidTextureOverload::kDimensionsDepth2dLevel:
+      return {
+          R"(int3 tint_tmp;
+  tint_symbol.GetDimensions(1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+)",
+          "tint_tmp.xy;",
+      };
+    case ValidTextureOverload::kDimensions2dArrayLevel:
+    case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
+      return {
+          R"(int4 tint_tmp;
+  tint_symbol.GetDimensions(1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+)",
+          "tint_tmp.xy;",
+      };
+    case ValidTextureOverload::kDimensions3dLevel:
+      return {
+          R"(int4 tint_tmp;
+  tint_symbol.GetDimensions(1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+)",
+          "tint_tmp.xyz;",
+      };
+    case ValidTextureOverload::kDimensionsCubeLevel:
+    case ValidTextureOverload::kDimensionsDepthCubeLevel:
+      return {
+          R"(int3 tint_tmp;
+  tint_symbol.GetDimensions(1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+)",
+          "tint_tmp.xy;",
+      };
+    case ValidTextureOverload::kDimensionsCubeArrayLevel:
+    case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
+      return {
+          R"(int4 tint_tmp;
+  tint_symbol.GetDimensions(1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+)",
+          "tint_tmp.xy;",
+      };
+    case ValidTextureOverload::kGather2dF32:
+      return R"(tint_symbol.GatherRed(tint_symbol_1, float2(1.0f, 2.0f)))";
+    case ValidTextureOverload::kGather2dOffsetF32:
+      return R"(tint_symbol.GatherRed(tint_symbol_1, float2(1.0f, 2.0f), int2(3, 4)))";
+    case ValidTextureOverload::kGather2dArrayF32:
+      return R"(tint_symbol.GatherRed(tint_symbol_1, float3(1.0f, 2.0f, float(3))))";
+    case ValidTextureOverload::kGather2dArrayOffsetF32:
+      return R"(tint_symbol.GatherRed(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5)))";
+    case ValidTextureOverload::kGatherCubeF32:
+      return R"(tint_symbol.GatherRed(tint_symbol_1, float3(1.0f, 2.0f, 3.0f)))";
+    case ValidTextureOverload::kGatherCubeArrayF32:
+      return R"(tint_symbol.GatherRed(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4))))";
+    case ValidTextureOverload::kGatherDepth2dF32:
+      return R"(tint_symbol.Gather(tint_symbol_1, float2(1.0f, 2.0f)))";
+    case ValidTextureOverload::kGatherDepth2dOffsetF32:
+      return R"(tint_symbol.Gather(tint_symbol_1, float2(1.0f, 2.0f), int2(3, 4)))";
+    case ValidTextureOverload::kGatherDepth2dArrayF32:
+      return R"(tint_symbol.Gather(tint_symbol_1, float3(1.0f, 2.0f, float(3))))";
+    case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
+      return R"(tint_symbol.Gather(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5)))";
+    case ValidTextureOverload::kGatherDepthCubeF32:
+      return R"(tint_symbol.Gather(tint_symbol_1, float3(1.0f, 2.0f, 3.0f)))";
+    case ValidTextureOverload::kGatherDepthCubeArrayF32:
+      return R"(tint_symbol.Gather(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4))))";
+    case ValidTextureOverload::kGatherCompareDepth2dF32:
+      return R"(tint_symbol.GatherCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f))";
+    case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
+      return R"(tint_symbol.GatherCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
+    case ValidTextureOverload::kGatherCompareDepth2dArrayF32:
+      return R"(tint_symbol.GatherCmp(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f))";
+    case ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32:
+      return R"(tint_symbol.GatherCmp(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6)))";
+    case ValidTextureOverload::kGatherCompareDepthCubeF32:
+      return R"(tint_symbol.GatherCmp(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f))";
+    case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
+      return R"(tint_symbol.GatherCmp(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
+    case ValidTextureOverload::kNumLayers2dArray:
+    case ValidTextureOverload::kNumLayersDepth2dArray:
+    case ValidTextureOverload::kNumLayersCubeArray:
+    case ValidTextureOverload::kNumLayersDepthCubeArray:
+    case ValidTextureOverload::kNumLayersStorageWO2dArray:
+      return {
+          R"(int3 tint_tmp;
+  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+)",
+          "tint_tmp.z;",
+      };
+    case ValidTextureOverload::kNumLevels2d:
+    case ValidTextureOverload::kNumLevelsCube:
+    case ValidTextureOverload::kNumLevelsDepth2d:
+    case ValidTextureOverload::kNumLevelsDepthCube:
+      return {
+          R"(int3 tint_tmp;
+  tint_symbol.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+)",
+          "tint_tmp.z;",
+      };
+    case ValidTextureOverload::kNumLevels2dArray:
+    case ValidTextureOverload::kNumLevels3d:
+    case ValidTextureOverload::kNumLevelsCubeArray:
+    case ValidTextureOverload::kNumLevelsDepth2dArray:
+    case ValidTextureOverload::kNumLevelsDepthCubeArray:
+      return {
+          R"(int4 tint_tmp;
+  tint_symbol.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+)",
+          "tint_tmp.w;",
+      };
+    case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
+    case ValidTextureOverload::kNumSamplesMultisampled2d:
+      return {
+          R"(int3 tint_tmp;
+  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+)",
+          "tint_tmp.z;",
+      };
+    case ValidTextureOverload::kSample1dF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, 1.0f);)";
+    case ValidTextureOverload::kSample2dF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float2(1.0f, 2.0f));)";
+    case ValidTextureOverload::kSample2dOffsetF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float2(1.0f, 2.0f), int2(3, 4));)";
+    case ValidTextureOverload::kSample2dArrayF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3)));)";
+    case ValidTextureOverload::kSample2dArrayOffsetF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5));)";
+    case ValidTextureOverload::kSample3dF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, 3.0f));)";
+    case ValidTextureOverload::kSample3dOffsetF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), int3(4, 5, 6));)";
+    case ValidTextureOverload::kSampleCubeF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, 3.0f));)";
+    case ValidTextureOverload::kSampleCubeArrayF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)));)";
+    case ValidTextureOverload::kSampleDepth2dF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float2(1.0f, 2.0f)).x;)";
+    case ValidTextureOverload::kSampleDepth2dOffsetF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float2(1.0f, 2.0f), int2(3, 4)).x;)";
+    case ValidTextureOverload::kSampleDepth2dArrayF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3))).x;)";
+    case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5)).x;)";
+    case ValidTextureOverload::kSampleDepthCubeF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, 3.0f)).x;)";
+    case ValidTextureOverload::kSampleDepthCubeArrayF32:
+      return R"(tint_symbol.Sample(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4))).x;)";
+    case ValidTextureOverload::kSampleBias2dF32:
+      return R"(tint_symbol.SampleBias(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
+    case ValidTextureOverload::kSampleBias2dOffsetF32:
+      return R"(tint_symbol.SampleBias(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
+    case ValidTextureOverload::kSampleBias2dArrayF32:
+      return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f);)";
+    case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
+      return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6));)";
+    case ValidTextureOverload::kSampleBias3dF32:
+      return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleBias3dOffsetF32:
+      return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f, int3(5, 6, 7));)";
+    case ValidTextureOverload::kSampleBiasCubeF32:
+      return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleBiasCubeArrayF32:
+      return R"(tint_symbol.SampleBias(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(3)), 4.0f);)";
+    case ValidTextureOverload::kSampleLevel2dF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
+    case ValidTextureOverload::kSampleLevel2dOffsetF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
+    case ValidTextureOverload::kSampleLevel2dArrayF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f);)";
+    case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6));)";
+    case ValidTextureOverload::kSampleLevel3dF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleLevel3dOffsetF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f, int3(5, 6, 7));)";
+    case ValidTextureOverload::kSampleLevelCubeF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleLevelCubeArrayF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
+    case ValidTextureOverload::kSampleLevelDepth2dF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3).x;)";
+    case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3, int2(4, 5)).x;)";
+    case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4).x;)";
+    case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4, int2(5, 6)).x;)";
+    case ValidTextureOverload::kSampleLevelDepthCubeF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4).x;)";
+    case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
+      return R"(tint_symbol.SampleLevel(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5).x;)";
+    case ValidTextureOverload::kSampleGrad2dF32:
+      return R"(tint_symbol.SampleGrad(tint_symbol_1, float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f));)";
+    case ValidTextureOverload::kSampleGrad2dOffsetF32:
+      return R"(tint_symbol.SampleGrad(tint_symbol_1, float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f), int2(7, 7));)";
+    case ValidTextureOverload::kSampleGrad2dArrayF32:
+      return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, float(3)), float2(4.0f, 5.0f), float2(6.0f, 7.0f));)";
+    case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
+      return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, float(3)), float2(4.0f, 5.0f), float2(6.0f, 7.0f), int2(6, 7));)";
+    case ValidTextureOverload::kSampleGrad3dF32:
+      return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));)";
+    case ValidTextureOverload::kSampleGrad3dOffsetF32:
+      return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f), int3(0, 1, 2));)";
+    case ValidTextureOverload::kSampleGradCubeF32:
+      return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));)";
+    case ValidTextureOverload::kSampleGradCubeArrayF32:
+      return R"(tint_symbol.SampleGrad(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f));)";
+    case ValidTextureOverload::kSampleCompareDepth2dF32:
+      return R"(tint_symbol.SampleCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
+    case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
+      return R"(tint_symbol.SampleCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
+    case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
+      return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f);)";
+    case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
+      return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6));)";
+    case ValidTextureOverload::kSampleCompareDepthCubeF32:
+      return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
+      return R"(tint_symbol.SampleCmp(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
+      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
+      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
+      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f);)";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
+      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6));)";
+    case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
+      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
+    case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
+      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
+    case ValidTextureOverload::kLoad1dLevelF32:
+    case ValidTextureOverload::kLoad1dLevelU32:
+    case ValidTextureOverload::kLoad1dLevelI32:
+      return R"(tint_symbol.Load(int2(1, 3));)";
+    case ValidTextureOverload::kLoad2dLevelF32:
+    case ValidTextureOverload::kLoad2dLevelU32:
+    case ValidTextureOverload::kLoad2dLevelI32:
+      return R"(tint_symbol.Load(int3(1, 2, 3));)";
+    case ValidTextureOverload::kLoad2dArrayLevelF32:
+    case ValidTextureOverload::kLoad2dArrayLevelU32:
+    case ValidTextureOverload::kLoad2dArrayLevelI32:
+    case ValidTextureOverload::kLoad3dLevelF32:
+    case ValidTextureOverload::kLoad3dLevelU32:
+    case ValidTextureOverload::kLoad3dLevelI32:
+      return R"(tint_symbol.Load(int4(1, 2, 3, 4));)";
+    case ValidTextureOverload::kLoadDepthMultisampled2dF32:
+    case ValidTextureOverload::kLoadMultisampled2dF32:
+    case ValidTextureOverload::kLoadMultisampled2dU32:
+    case ValidTextureOverload::kLoadMultisampled2dI32:
+      return R"(tint_symbol.Load(int2(1, 2), 3);)";
+    case ValidTextureOverload::kLoadDepth2dLevelF32:
+      return R"(tint_symbol.Load(int3(1, 2, 3)).x;)";
+    case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
+      return R"(tint_symbol.Load(int4(1, 2, 3, 4)).x;)";
+    case ValidTextureOverload::kStoreWO1dRgba32float:
+      return R"(tint_symbol[1] = float4(2.0f, 3.0f, 4.0f, 5.0f);)";
+    case ValidTextureOverload::kStoreWO2dRgba32float:
+      return R"(tint_symbol[int2(1, 2)] = float4(3.0f, 4.0f, 5.0f, 6.0f);)";
+    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
+      return R"(tint_symbol[int3(1, 2, 3)] = float4(4.0f, 5.0f, 6.0f, 7.0f);)";
+    case ValidTextureOverload::kStoreWO3dRgba32float:
+      return R"(tint_symbol[int3(1, 2, 3)] = float4(4.0f, 5.0f, 6.0f, 7.0f);)";
+  }
+  return "<unmatched texture overload>";
+}  // NOLINT - Ignore the length of this function
+
+class HlslGeneratorBuiltinTextureTest
+    : public TestParamHelper<ast::builtin::test::TextureOverloadCase> {};
+
+TEST_P(HlslGeneratorBuiltinTextureTest, Call) {
+  auto param = GetParam();
+
+  param.BuildTextureVariable(this);
+  param.BuildSamplerVariable(this);
+
+  auto* call = Call(param.function, param.args(this));
+  auto* stmt = CallStmt(call);
+
+  Func("main", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+
+  auto expected = expected_texture_overload(param.overload);
+
+  EXPECT_THAT(gen.result(), HasSubstr(expected.pre));
+  EXPECT_THAT(gen.result(), HasSubstr(expected.out));
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    HlslGeneratorBuiltinTextureTest,
+    HlslGeneratorBuiltinTextureTest,
+    testing::ValuesIn(ast::builtin::test::TextureOverloadCase::ValidCases()));
+
+}  // namespace
+}  // namespace hlsl
+}  // namespace writer
+}  // namespace tint
diff --git a/src/writer/hlsl/generator_impl_intrinsic_test.cc b/src/writer/hlsl/generator_impl_intrinsic_test.cc
deleted file mode 100644
index 47377ca..0000000
--- a/src/writer/hlsl/generator_impl_intrinsic_test.cc
+++ /dev/null
@@ -1,797 +0,0 @@
-// Copyright 2020 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "gmock/gmock.h"
-#include "src/ast/call_statement.h"
-#include "src/ast/stage_attribute.h"
-#include "src/sem/call.h"
-#include "src/writer/hlsl/test_helper.h"
-
-namespace tint {
-namespace writer {
-namespace hlsl {
-namespace {
-
-using IntrinsicType = sem::IntrinsicType;
-
-using ::testing::HasSubstr;
-
-using HlslGeneratorImplTest_Intrinsic = TestHelper;
-
-enum class ParamType {
-  kF32,
-  kU32,
-  kBool,
-};
-
-struct IntrinsicData {
-  IntrinsicType intrinsic;
-  ParamType type;
-  const char* hlsl_name;
-};
-inline std::ostream& operator<<(std::ostream& out, IntrinsicData data) {
-  out << data.hlsl_name;
-  switch (data.type) {
-    case ParamType::kF32:
-      out << "f32";
-      break;
-    case ParamType::kU32:
-      out << "u32";
-      break;
-    case ParamType::kBool:
-      out << "bool";
-      break;
-  }
-  out << ">";
-  return out;
-}
-
-const ast::CallExpression* GenerateCall(IntrinsicType intrinsic,
-                                        ParamType type,
-                                        ProgramBuilder* builder) {
-  std::string name;
-  std::ostringstream str(name);
-  str << intrinsic;
-  switch (intrinsic) {
-    case IntrinsicType::kAcos:
-    case IntrinsicType::kAsin:
-    case IntrinsicType::kAtan:
-    case IntrinsicType::kCeil:
-    case IntrinsicType::kCos:
-    case IntrinsicType::kCosh:
-    case IntrinsicType::kDpdx:
-    case IntrinsicType::kDpdxCoarse:
-    case IntrinsicType::kDpdxFine:
-    case IntrinsicType::kDpdy:
-    case IntrinsicType::kDpdyCoarse:
-    case IntrinsicType::kDpdyFine:
-    case IntrinsicType::kExp:
-    case IntrinsicType::kExp2:
-    case IntrinsicType::kFloor:
-    case IntrinsicType::kFract:
-    case IntrinsicType::kFwidth:
-    case IntrinsicType::kFwidthCoarse:
-    case IntrinsicType::kFwidthFine:
-    case IntrinsicType::kInverseSqrt:
-    case IntrinsicType::kIsFinite:
-    case IntrinsicType::kIsInf:
-    case IntrinsicType::kIsNan:
-    case IntrinsicType::kIsNormal:
-    case IntrinsicType::kLength:
-    case IntrinsicType::kLog:
-    case IntrinsicType::kLog2:
-    case IntrinsicType::kNormalize:
-    case IntrinsicType::kRound:
-    case IntrinsicType::kSin:
-    case IntrinsicType::kSinh:
-    case IntrinsicType::kSqrt:
-    case IntrinsicType::kTan:
-    case IntrinsicType::kTanh:
-    case IntrinsicType::kTrunc:
-    case IntrinsicType::kSign:
-      return builder->Call(str.str(), "f2");
-    case IntrinsicType::kLdexp:
-      return builder->Call(str.str(), "f2", "i2");
-    case IntrinsicType::kAtan2:
-    case IntrinsicType::kDot:
-    case IntrinsicType::kDistance:
-    case IntrinsicType::kPow:
-    case IntrinsicType::kReflect:
-    case IntrinsicType::kStep:
-      return builder->Call(str.str(), "f2", "f2");
-    case IntrinsicType::kCross:
-      return builder->Call(str.str(), "f3", "f3");
-    case IntrinsicType::kFma:
-    case IntrinsicType::kMix:
-    case IntrinsicType::kFaceForward:
-    case IntrinsicType::kSmoothStep:
-      return builder->Call(str.str(), "f2", "f2", "f2");
-    case IntrinsicType::kAll:
-    case IntrinsicType::kAny:
-      return builder->Call(str.str(), "b2");
-    case IntrinsicType::kAbs:
-      if (type == ParamType::kF32) {
-        return builder->Call(str.str(), "f2");
-      } else {
-        return builder->Call(str.str(), "u2");
-      }
-    case IntrinsicType::kCountOneBits:
-    case IntrinsicType::kReverseBits:
-      return builder->Call(str.str(), "u2");
-    case IntrinsicType::kMax:
-    case IntrinsicType::kMin:
-      if (type == ParamType::kF32) {
-        return builder->Call(str.str(), "f2", "f2");
-      } else {
-        return builder->Call(str.str(), "u2", "u2");
-      }
-    case IntrinsicType::kClamp:
-      if (type == ParamType::kF32) {
-        return builder->Call(str.str(), "f2", "f2", "f2");
-      } else {
-        return builder->Call(str.str(), "u2", "u2", "u2");
-      }
-    case IntrinsicType::kSelect:
-      return builder->Call(str.str(), "f2", "f2", "b2");
-    case IntrinsicType::kDeterminant:
-      return builder->Call(str.str(), "m2x2");
-    case IntrinsicType::kTranspose:
-      return builder->Call(str.str(), "m3x2");
-    default:
-      break;
-  }
-  return nullptr;
-}
-using HlslIntrinsicTest = TestParamHelper<IntrinsicData>;
-TEST_P(HlslIntrinsicTest, Emit) {
-  auto param = GetParam();
-
-  Global("f2", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  Global("f3", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-  Global("u2", ty.vec2<u32>(), ast::StorageClass::kPrivate);
-  Global("i2", ty.vec2<i32>(), ast::StorageClass::kPrivate);
-  Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
-  Global("m2x2", ty.mat2x2<f32>(), ast::StorageClass::kPrivate);
-  Global("m3x2", ty.mat3x2<f32>(), ast::StorageClass::kPrivate);
-
-  auto* call = GenerateCall(param.intrinsic, param.type, this);
-  ASSERT_NE(nullptr, call) << "Unhandled intrinsic";
-  Func("func", {}, ty.void_(), {CallStmt(call)},
-       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
-
-  GeneratorImpl& gen = Build();
-
-  auto* sem = program->Sem().Get(call);
-  ASSERT_NE(sem, nullptr);
-  auto* target = sem->Target();
-  ASSERT_NE(target, nullptr);
-  auto* intrinsic = target->As<sem::Intrinsic>();
-  ASSERT_NE(intrinsic, nullptr);
-
-  EXPECT_EQ(gen.generate_builtin_name(intrinsic), param.hlsl_name);
-}
-INSTANTIATE_TEST_SUITE_P(
-    HlslGeneratorImplTest_Intrinsic,
-    HlslIntrinsicTest,
-    testing::Values(
-        IntrinsicData{IntrinsicType::kAbs, ParamType::kF32, "abs"},
-        IntrinsicData{IntrinsicType::kAbs, ParamType::kU32, "abs"},
-        IntrinsicData{IntrinsicType::kAcos, ParamType::kF32, "acos"},
-        IntrinsicData{IntrinsicType::kAll, ParamType::kBool, "all"},
-        IntrinsicData{IntrinsicType::kAny, ParamType::kBool, "any"},
-        IntrinsicData{IntrinsicType::kAsin, ParamType::kF32, "asin"},
-        IntrinsicData{IntrinsicType::kAtan, ParamType::kF32, "atan"},
-        IntrinsicData{IntrinsicType::kAtan2, ParamType::kF32, "atan2"},
-        IntrinsicData{IntrinsicType::kCeil, ParamType::kF32, "ceil"},
-        IntrinsicData{IntrinsicType::kClamp, ParamType::kF32, "clamp"},
-        IntrinsicData{IntrinsicType::kClamp, ParamType::kU32, "clamp"},
-        IntrinsicData{IntrinsicType::kCos, ParamType::kF32, "cos"},
-        IntrinsicData{IntrinsicType::kCosh, ParamType::kF32, "cosh"},
-        IntrinsicData{IntrinsicType::kCountOneBits, ParamType::kU32,
-                      "countbits"},
-        IntrinsicData{IntrinsicType::kCross, ParamType::kF32, "cross"},
-        IntrinsicData{IntrinsicType::kDeterminant, ParamType::kF32,
-                      "determinant"},
-        IntrinsicData{IntrinsicType::kDistance, ParamType::kF32, "distance"},
-        IntrinsicData{IntrinsicType::kDot, ParamType::kF32, "dot"},
-        IntrinsicData{IntrinsicType::kDpdx, ParamType::kF32, "ddx"},
-        IntrinsicData{IntrinsicType::kDpdxCoarse, ParamType::kF32,
-                      "ddx_coarse"},
-        IntrinsicData{IntrinsicType::kDpdxFine, ParamType::kF32, "ddx_fine"},
-        IntrinsicData{IntrinsicType::kDpdy, ParamType::kF32, "ddy"},
-        IntrinsicData{IntrinsicType::kDpdyCoarse, ParamType::kF32,
-                      "ddy_coarse"},
-        IntrinsicData{IntrinsicType::kDpdyFine, ParamType::kF32, "ddy_fine"},
-        IntrinsicData{IntrinsicType::kExp, ParamType::kF32, "exp"},
-        IntrinsicData{IntrinsicType::kExp2, ParamType::kF32, "exp2"},
-        IntrinsicData{IntrinsicType::kFaceForward, ParamType::kF32,
-                      "faceforward"},
-        IntrinsicData{IntrinsicType::kFloor, ParamType::kF32, "floor"},
-        IntrinsicData{IntrinsicType::kFma, ParamType::kF32, "mad"},
-        IntrinsicData{IntrinsicType::kFract, ParamType::kF32, "frac"},
-        IntrinsicData{IntrinsicType::kFwidth, ParamType::kF32, "fwidth"},
-        IntrinsicData{IntrinsicType::kFwidthCoarse, ParamType::kF32, "fwidth"},
-        IntrinsicData{IntrinsicType::kFwidthFine, ParamType::kF32, "fwidth"},
-        IntrinsicData{IntrinsicType::kInverseSqrt, ParamType::kF32, "rsqrt"},
-        IntrinsicData{IntrinsicType::kIsFinite, ParamType::kF32, "isfinite"},
-        IntrinsicData{IntrinsicType::kIsInf, ParamType::kF32, "isinf"},
-        IntrinsicData{IntrinsicType::kIsNan, ParamType::kF32, "isnan"},
-        IntrinsicData{IntrinsicType::kLdexp, ParamType::kF32, "ldexp"},
-        IntrinsicData{IntrinsicType::kLength, ParamType::kF32, "length"},
-        IntrinsicData{IntrinsicType::kLog, ParamType::kF32, "log"},
-        IntrinsicData{IntrinsicType::kLog2, ParamType::kF32, "log2"},
-        IntrinsicData{IntrinsicType::kMax, ParamType::kF32, "max"},
-        IntrinsicData{IntrinsicType::kMax, ParamType::kU32, "max"},
-        IntrinsicData{IntrinsicType::kMin, ParamType::kF32, "min"},
-        IntrinsicData{IntrinsicType::kMin, ParamType::kU32, "min"},
-        IntrinsicData{IntrinsicType::kMix, ParamType::kF32, "lerp"},
-        IntrinsicData{IntrinsicType::kNormalize, ParamType::kF32, "normalize"},
-        IntrinsicData{IntrinsicType::kPow, ParamType::kF32, "pow"},
-        IntrinsicData{IntrinsicType::kReflect, ParamType::kF32, "reflect"},
-        IntrinsicData{IntrinsicType::kReverseBits, ParamType::kU32,
-                      "reversebits"},
-        IntrinsicData{IntrinsicType::kRound, ParamType::kU32, "round"},
-        IntrinsicData{IntrinsicType::kSign, ParamType::kF32, "sign"},
-        IntrinsicData{IntrinsicType::kSin, ParamType::kF32, "sin"},
-        IntrinsicData{IntrinsicType::kSinh, ParamType::kF32, "sinh"},
-        IntrinsicData{IntrinsicType::kSmoothStep, ParamType::kF32,
-                      "smoothstep"},
-        IntrinsicData{IntrinsicType::kSqrt, ParamType::kF32, "sqrt"},
-        IntrinsicData{IntrinsicType::kStep, ParamType::kF32, "step"},
-        IntrinsicData{IntrinsicType::kTan, ParamType::kF32, "tan"},
-        IntrinsicData{IntrinsicType::kTanh, ParamType::kF32, "tanh"},
-        IntrinsicData{IntrinsicType::kTranspose, ParamType::kF32, "transpose"},
-        IntrinsicData{IntrinsicType::kTrunc, ParamType::kF32, "trunc"}));
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, DISABLED_Intrinsic_IsNormal) {
-  FAIL();
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Intrinsic_Call) {
-  auto* call = Call("dot", "param1", "param2");
-
-  Global("param1", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-  Global("param2", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "dot(param1, param2)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Select_Scalar) {
-  auto* call = Call("select", 1.0f, 2.0f, true);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "(true ? 2.0f : 1.0f)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Select_Vector) {
-  auto* call =
-      Call("select", vec2<i32>(1, 2), vec2<i32>(3, 4), vec2<bool>(true, false));
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  gen.increment_indent();
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "(bool2(true, false) ? int2(3, 4) : int2(1, 2))");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Modf_Scalar) {
-  auto* call = Call("modf", 1.0f);
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(struct modf_result {
-  float fract;
-  float whole;
-};
-modf_result tint_modf(float param_0) {
-  float whole;
-  float fract = modf(param_0, whole);
-  modf_result result = {fract, whole};
-  return result;
-}
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_modf(1.0f);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Modf_Vector) {
-  auto* call = Call("modf", vec3<f32>());
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(struct modf_result_vec3 {
-  float3 fract;
-  float3 whole;
-};
-modf_result_vec3 tint_modf(float3 param_0) {
-  float3 whole;
-  float3 fract = modf(param_0, whole);
-  modf_result_vec3 result = {fract, whole};
-  return result;
-}
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_modf(float3(0.0f, 0.0f, 0.0f));
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Frexp_Scalar_i32) {
-  auto* call = Call("frexp", 1.0f);
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(struct frexp_result {
-  float sig;
-  int exp;
-};
-frexp_result tint_frexp(float param_0) {
-  float exp;
-  float sig = frexp(param_0, exp);
-  frexp_result result = {sig, int(exp)};
-  return result;
-}
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_frexp(1.0f);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Frexp_Vector_i32) {
-  auto* call = Call("frexp", vec3<f32>());
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(struct frexp_result_vec3 {
-  float3 sig;
-  int3 exp;
-};
-frexp_result_vec3 tint_frexp(float3 param_0) {
-  float3 exp;
-  float3 sig = frexp(param_0, exp);
-  frexp_result_vec3 result = {sig, int3(exp)};
-  return result;
-}
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_frexp(float3(0.0f, 0.0f, 0.0f));
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, IsNormal_Scalar) {
-  auto* val = Var("val", ty.f32());
-  auto* call = Call("isNormal", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(bool tint_isNormal(float param_0) {
-  uint exponent = asuint(param_0) & 0x7f80000;
-  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  float val = 0.0f;
-  const bool tint_symbol = tint_isNormal(val);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, IsNormal_Vector) {
-  auto* val = Var("val", ty.vec3<f32>());
-  auto* call = Call("isNormal", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(bool3 tint_isNormal(float3 param_0) {
-  uint3 exponent = asuint(param_0) & 0x7f80000;
-  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  float3 val = float3(0.0f, 0.0f, 0.0f);
-  const bool3 tint_symbol = tint_isNormal(val);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Degrees_Scalar) {
-  auto* val = Var("val", ty.f32());
-  auto* call = Call("degrees", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(float tint_degrees(float param_0) {
-  return param_0 * 57.295779513082322865;
-}
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  float val = 0.0f;
-  const float tint_symbol = tint_degrees(val);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Degrees_Vector) {
-  auto* val = Var("val", ty.vec3<f32>());
-  auto* call = Call("degrees", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(float3 tint_degrees(float3 param_0) {
-  return param_0 * 57.295779513082322865;
-}
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  float3 val = float3(0.0f, 0.0f, 0.0f);
-  const float3 tint_symbol = tint_degrees(val);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Radians_Scalar) {
-  auto* val = Var("val", ty.f32());
-  auto* call = Call("radians", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(float tint_radians(float param_0) {
-  return param_0 * 0.017453292519943295474;
-}
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  float val = 0.0f;
-  const float tint_symbol = tint_radians(val);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Radians_Vector) {
-  auto* val = Var("val", ty.vec3<f32>());
-  auto* call = Call("radians", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(float3 tint_radians(float3 param_0) {
-  return param_0 * 0.017453292519943295474;
-}
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  float3 val = float3(0.0f, 0.0f, 0.0f);
-  const float3 tint_symbol = tint_radians(val);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Pack4x8Snorm) {
-  auto* call = Call("pack4x8snorm", "p1");
-  Global("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(uint tint_pack4x8snorm(float4 param_0) {
-  int4 i = int4(round(clamp(param_0, -1.0, 1.0) * 127.0)) & 0xff;
-  return asuint(i.x | i.y << 8 | i.z << 16 | i.w << 24);
-}
-
-static float4 p1 = float4(0.0f, 0.0f, 0.0f, 0.0f);
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_pack4x8snorm(p1);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Pack4x8Unorm) {
-  auto* call = Call("pack4x8unorm", "p1");
-  Global("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(uint tint_pack4x8unorm(float4 param_0) {
-  uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0));
-  return (i.x | i.y << 8 | i.z << 16 | i.w << 24);
-}
-
-static float4 p1 = float4(0.0f, 0.0f, 0.0f, 0.0f);
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_pack4x8unorm(p1);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Pack2x16Snorm) {
-  auto* call = Call("pack2x16snorm", "p1");
-  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(uint tint_pack2x16snorm(float2 param_0) {
-  int2 i = int2(round(clamp(param_0, -1.0, 1.0) * 32767.0)) & 0xffff;
-  return asuint(i.x | i.y << 16);
-}
-
-static float2 p1 = float2(0.0f, 0.0f);
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_pack2x16snorm(p1);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Pack2x16Unorm) {
-  auto* call = Call("pack2x16unorm", "p1");
-  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(uint tint_pack2x16unorm(float2 param_0) {
-  uint2 i = uint2(round(clamp(param_0, 0.0, 1.0) * 65535.0));
-  return (i.x | i.y << 16);
-}
-
-static float2 p1 = float2(0.0f, 0.0f);
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_pack2x16unorm(p1);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Pack2x16Float) {
-  auto* call = Call("pack2x16float", "p1");
-  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(uint tint_pack2x16float(float2 param_0) {
-  uint2 i = f32tof16(param_0);
-  return i.x | (i.y << 16);
-}
-
-static float2 p1 = float2(0.0f, 0.0f);
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_pack2x16float(p1);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Unpack4x8Snorm) {
-  auto* call = Call("unpack4x8snorm", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(float4 tint_unpack4x8snorm(uint param_0) {
-  int j = int(param_0);
-  int4 i = int4(j << 24, j << 16, j << 8, j) >> 24;
-  return clamp(float4(i) / 127.0, -1.0, 1.0);
-}
-
-static uint p1 = 0u;
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_unpack4x8snorm(p1);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Unpack4x8Unorm) {
-  auto* call = Call("unpack4x8unorm", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(float4 tint_unpack4x8unorm(uint param_0) {
-  uint j = param_0;
-  uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24);
-  return float4(i) / 255.0;
-}
-
-static uint p1 = 0u;
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_unpack4x8unorm(p1);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Unpack2x16Snorm) {
-  auto* call = Call("unpack2x16snorm", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(float2 tint_unpack2x16snorm(uint param_0) {
-  int j = int(param_0);
-  int2 i = int2(j << 16, j) >> 16;
-  return clamp(float2(i) / 32767.0, -1.0, 1.0);
-}
-
-static uint p1 = 0u;
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_unpack2x16snorm(p1);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Unpack2x16Unorm) {
-  auto* call = Call("unpack2x16unorm", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(float2 tint_unpack2x16unorm(uint param_0) {
-  uint j = param_0;
-  uint2 i = uint2(j & 0xffff, j >> 16);
-  return float2(i) / 65535.0;
-}
-
-static uint p1 = 0u;
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_unpack2x16unorm(p1);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, Unpack2x16Float) {
-  auto* call = Call("unpack2x16float", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(float2 tint_unpack2x16float(uint param_0) {
-  uint i = param_0;
-  return f16tof32(uint2(i & 0xffff, i >> 16));
-}
-
-static uint p1 = 0u;
-
-[numthreads(1, 1, 1)]
-void test_function() {
-  tint_unpack2x16float(p1);
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, StorageBarrier) {
-  Func("main", {}, ty.void_(), {CallStmt(Call("storageBarrier"))},
-       {
-           Stage(ast::PipelineStage::kCompute),
-           WorkgroupSize(1),
-       });
-
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"([numthreads(1, 1, 1)]
-void main() {
-  DeviceMemoryBarrierWithGroupSync();
-  return;
-}
-)");
-}
-
-TEST_F(HlslGeneratorImplTest_Intrinsic, WorkgroupBarrier) {
-  Func("main", {}, ty.void_(), {CallStmt(Call("workgroupBarrier"))},
-       {
-           Stage(ast::PipelineStage::kCompute),
-           WorkgroupSize(1),
-       });
-
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"([numthreads(1, 1, 1)]
-void main() {
-  GroupMemoryBarrierWithGroupSync();
-  return;
-}
-)");
-}
-
-}  // namespace
-}  // namespace hlsl
-}  // namespace writer
-}  // namespace tint
diff --git a/src/writer/hlsl/generator_impl_intrinsic_texture_test.cc b/src/writer/hlsl/generator_impl_intrinsic_texture_test.cc
deleted file mode 100644
index 8569ed5..0000000
--- a/src/writer/hlsl/generator_impl_intrinsic_texture_test.cc
+++ /dev/null
@@ -1,396 +0,0 @@
-// Copyright 2020 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "gmock/gmock.h"
-#include "src/ast/call_statement.h"
-#include "src/ast/intrinsic_texture_helper_test.h"
-#include "src/ast/stage_attribute.h"
-#include "src/writer/hlsl/test_helper.h"
-
-namespace tint {
-namespace writer {
-namespace hlsl {
-namespace {
-
-using ::testing::HasSubstr;
-
-struct ExpectedResult {
-  ExpectedResult(const char* o) : out(o) {}  // NOLINT
-  ExpectedResult(const char* p, const char* o) : pre(p), out(o) {}
-
-  std::string pre;
-  std::string out;
-};
-
-ExpectedResult expected_texture_overload(
-    ast::intrinsic::test::ValidTextureOverload overload) {
-  using ValidTextureOverload = ast::intrinsic::test::ValidTextureOverload;
-  switch (overload) {
-    case ValidTextureOverload::kDimensions1d:
-    case ValidTextureOverload::kDimensionsStorageWO1d:
-      return {
-          R"(int tint_tmp;
-  tint_symbol.GetDimensions(tint_tmp);
-)",
-          "tint_tmp;",
-      };
-    case ValidTextureOverload::kDimensions2d:
-    case ValidTextureOverload::kDimensionsDepth2d:
-    case ValidTextureOverload::kDimensionsStorageWO2d:
-      return {
-          R"(int2 tint_tmp;
-  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y);
-)",
-          "tint_tmp;",
-      };
-    case ValidTextureOverload::kDimensionsDepthMultisampled2d:
-    case ValidTextureOverload::kDimensionsMultisampled2d:
-      return {
-          R"(int3 tint_tmp;
-  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-)",
-          "tint_tmp.xy;",
-      };
-
-    case ValidTextureOverload::kDimensions2dArray:
-    case ValidTextureOverload::kDimensionsDepth2dArray:
-    case ValidTextureOverload::kDimensionsStorageWO2dArray:
-      return {
-          R"(int3 tint_tmp;
-  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-)",
-          "tint_tmp.xy;",
-      };
-    case ValidTextureOverload::kDimensions3d:
-    case ValidTextureOverload::kDimensionsStorageWO3d:
-      return {
-          R"(int3 tint_tmp;
-  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-)",
-          "tint_tmp;",
-      };
-    case ValidTextureOverload::kDimensionsCube:
-    case ValidTextureOverload::kDimensionsDepthCube:
-      return {
-          R"(int2 tint_tmp;
-  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y);
-)",
-          "tint_tmp;",
-      };
-    case ValidTextureOverload::kDimensionsCubeArray:
-    case ValidTextureOverload::kDimensionsDepthCubeArray:
-      return {
-          R"(int3 tint_tmp;
-  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-)",
-          "tint_tmp.xy;",
-      };
-    case ValidTextureOverload::kDimensions2dLevel:
-    case ValidTextureOverload::kDimensionsDepth2dLevel:
-      return {
-          R"(int3 tint_tmp;
-  tint_symbol.GetDimensions(1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-)",
-          "tint_tmp.xy;",
-      };
-    case ValidTextureOverload::kDimensions2dArrayLevel:
-    case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
-      return {
-          R"(int4 tint_tmp;
-  tint_symbol.GetDimensions(1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-)",
-          "tint_tmp.xy;",
-      };
-    case ValidTextureOverload::kDimensions3dLevel:
-      return {
-          R"(int4 tint_tmp;
-  tint_symbol.GetDimensions(1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-)",
-          "tint_tmp.xyz;",
-      };
-    case ValidTextureOverload::kDimensionsCubeLevel:
-    case ValidTextureOverload::kDimensionsDepthCubeLevel:
-      return {
-          R"(int3 tint_tmp;
-  tint_symbol.GetDimensions(1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-)",
-          "tint_tmp.xy;",
-      };
-    case ValidTextureOverload::kDimensionsCubeArrayLevel:
-    case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
-      return {
-          R"(int4 tint_tmp;
-  tint_symbol.GetDimensions(1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-)",
-          "tint_tmp.xy;",
-      };
-    case ValidTextureOverload::kGather2dF32:
-      return R"(tint_symbol.GatherRed(tint_symbol_1, float2(1.0f, 2.0f)))";
-    case ValidTextureOverload::kGather2dOffsetF32:
-      return R"(tint_symbol.GatherRed(tint_symbol_1, float2(1.0f, 2.0f), int2(3, 4)))";
-    case ValidTextureOverload::kGather2dArrayF32:
-      return R"(tint_symbol.GatherRed(tint_symbol_1, float3(1.0f, 2.0f, float(3))))";
-    case ValidTextureOverload::kGather2dArrayOffsetF32:
-      return R"(tint_symbol.GatherRed(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5)))";
-    case ValidTextureOverload::kGatherCubeF32:
-      return R"(tint_symbol.GatherRed(tint_symbol_1, float3(1.0f, 2.0f, 3.0f)))";
-    case ValidTextureOverload::kGatherCubeArrayF32:
-      return R"(tint_symbol.GatherRed(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4))))";
-    case ValidTextureOverload::kGatherDepth2dF32:
-      return R"(tint_symbol.Gather(tint_symbol_1, float2(1.0f, 2.0f)))";
-    case ValidTextureOverload::kGatherDepth2dOffsetF32:
-      return R"(tint_symbol.Gather(tint_symbol_1, float2(1.0f, 2.0f), int2(3, 4)))";
-    case ValidTextureOverload::kGatherDepth2dArrayF32:
-      return R"(tint_symbol.Gather(tint_symbol_1, float3(1.0f, 2.0f, float(3))))";
-    case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
-      return R"(tint_symbol.Gather(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5)))";
-    case ValidTextureOverload::kGatherDepthCubeF32:
-      return R"(tint_symbol.Gather(tint_symbol_1, float3(1.0f, 2.0f, 3.0f)))";
-    case ValidTextureOverload::kGatherDepthCubeArrayF32:
-      return R"(tint_symbol.Gather(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4))))";
-    case ValidTextureOverload::kGatherCompareDepth2dF32:
-      return R"(tint_symbol.GatherCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f))";
-    case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
-      return R"(tint_symbol.GatherCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
-    case ValidTextureOverload::kGatherCompareDepth2dArrayF32:
-      return R"(tint_symbol.GatherCmp(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f))";
-    case ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32:
-      return R"(tint_symbol.GatherCmp(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6)))";
-    case ValidTextureOverload::kGatherCompareDepthCubeF32:
-      return R"(tint_symbol.GatherCmp(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f))";
-    case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
-      return R"(tint_symbol.GatherCmp(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
-    case ValidTextureOverload::kNumLayers2dArray:
-    case ValidTextureOverload::kNumLayersDepth2dArray:
-    case ValidTextureOverload::kNumLayersCubeArray:
-    case ValidTextureOverload::kNumLayersDepthCubeArray:
-    case ValidTextureOverload::kNumLayersStorageWO2dArray:
-      return {
-          R"(int3 tint_tmp;
-  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-)",
-          "tint_tmp.z;",
-      };
-    case ValidTextureOverload::kNumLevels2d:
-    case ValidTextureOverload::kNumLevelsCube:
-    case ValidTextureOverload::kNumLevelsDepth2d:
-    case ValidTextureOverload::kNumLevelsDepthCube:
-      return {
-          R"(int3 tint_tmp;
-  tint_symbol.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-)",
-          "tint_tmp.z;",
-      };
-    case ValidTextureOverload::kNumLevels2dArray:
-    case ValidTextureOverload::kNumLevels3d:
-    case ValidTextureOverload::kNumLevelsCubeArray:
-    case ValidTextureOverload::kNumLevelsDepth2dArray:
-    case ValidTextureOverload::kNumLevelsDepthCubeArray:
-      return {
-          R"(int4 tint_tmp;
-  tint_symbol.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-)",
-          "tint_tmp.w;",
-      };
-    case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
-    case ValidTextureOverload::kNumSamplesMultisampled2d:
-      return {
-          R"(int3 tint_tmp;
-  tint_symbol.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-)",
-          "tint_tmp.z;",
-      };
-    case ValidTextureOverload::kSample1dF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, 1.0f);)";
-    case ValidTextureOverload::kSample2dF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float2(1.0f, 2.0f));)";
-    case ValidTextureOverload::kSample2dOffsetF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float2(1.0f, 2.0f), int2(3, 4));)";
-    case ValidTextureOverload::kSample2dArrayF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3)));)";
-    case ValidTextureOverload::kSample2dArrayOffsetF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5));)";
-    case ValidTextureOverload::kSample3dF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, 3.0f));)";
-    case ValidTextureOverload::kSample3dOffsetF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), int3(4, 5, 6));)";
-    case ValidTextureOverload::kSampleCubeF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, 3.0f));)";
-    case ValidTextureOverload::kSampleCubeArrayF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)));)";
-    case ValidTextureOverload::kSampleDepth2dF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float2(1.0f, 2.0f)).x;)";
-    case ValidTextureOverload::kSampleDepth2dOffsetF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float2(1.0f, 2.0f), int2(3, 4)).x;)";
-    case ValidTextureOverload::kSampleDepth2dArrayF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3))).x;)";
-    case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5)).x;)";
-    case ValidTextureOverload::kSampleDepthCubeF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, 3.0f)).x;)";
-    case ValidTextureOverload::kSampleDepthCubeArrayF32:
-      return R"(tint_symbol.Sample(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4))).x;)";
-    case ValidTextureOverload::kSampleBias2dF32:
-      return R"(tint_symbol.SampleBias(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
-    case ValidTextureOverload::kSampleBias2dOffsetF32:
-      return R"(tint_symbol.SampleBias(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
-    case ValidTextureOverload::kSampleBias2dArrayF32:
-      return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f);)";
-    case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
-      return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6));)";
-    case ValidTextureOverload::kSampleBias3dF32:
-      return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleBias3dOffsetF32:
-      return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f, int3(5, 6, 7));)";
-    case ValidTextureOverload::kSampleBiasCubeF32:
-      return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleBiasCubeArrayF32:
-      return R"(tint_symbol.SampleBias(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(3)), 4.0f);)";
-    case ValidTextureOverload::kSampleLevel2dF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
-    case ValidTextureOverload::kSampleLevel2dOffsetF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
-    case ValidTextureOverload::kSampleLevel2dArrayF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f);)";
-    case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6));)";
-    case ValidTextureOverload::kSampleLevel3dF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleLevel3dOffsetF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f, int3(5, 6, 7));)";
-    case ValidTextureOverload::kSampleLevelCubeF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleLevelCubeArrayF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
-    case ValidTextureOverload::kSampleLevelDepth2dF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3).x;)";
-    case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3, int2(4, 5)).x;)";
-    case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4).x;)";
-    case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4, int2(5, 6)).x;)";
-    case ValidTextureOverload::kSampleLevelDepthCubeF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4).x;)";
-    case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
-      return R"(tint_symbol.SampleLevel(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5).x;)";
-    case ValidTextureOverload::kSampleGrad2dF32:
-      return R"(tint_symbol.SampleGrad(tint_symbol_1, float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f));)";
-    case ValidTextureOverload::kSampleGrad2dOffsetF32:
-      return R"(tint_symbol.SampleGrad(tint_symbol_1, float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f), int2(7, 7));)";
-    case ValidTextureOverload::kSampleGrad2dArrayF32:
-      return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, float(3)), float2(4.0f, 5.0f), float2(6.0f, 7.0f));)";
-    case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
-      return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, float(3)), float2(4.0f, 5.0f), float2(6.0f, 7.0f), int2(6, 7));)";
-    case ValidTextureOverload::kSampleGrad3dF32:
-      return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));)";
-    case ValidTextureOverload::kSampleGrad3dOffsetF32:
-      return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f), int3(0, 1, 2));)";
-    case ValidTextureOverload::kSampleGradCubeF32:
-      return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));)";
-    case ValidTextureOverload::kSampleGradCubeArrayF32:
-      return R"(tint_symbol.SampleGrad(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f));)";
-    case ValidTextureOverload::kSampleCompareDepth2dF32:
-      return R"(tint_symbol.SampleCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
-    case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
-      return R"(tint_symbol.SampleCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
-    case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
-      return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f);)";
-    case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
-      return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6));)";
-    case ValidTextureOverload::kSampleCompareDepthCubeF32:
-      return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
-      return R"(tint_symbol.SampleCmp(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
-      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
-      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
-      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f);)";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
-      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6));)";
-    case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
-      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
-    case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
-      return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
-    case ValidTextureOverload::kLoad1dLevelF32:
-    case ValidTextureOverload::kLoad1dLevelU32:
-    case ValidTextureOverload::kLoad1dLevelI32:
-      return R"(tint_symbol.Load(int2(1, 3));)";
-    case ValidTextureOverload::kLoad2dLevelF32:
-    case ValidTextureOverload::kLoad2dLevelU32:
-    case ValidTextureOverload::kLoad2dLevelI32:
-      return R"(tint_symbol.Load(int3(1, 2, 3));)";
-    case ValidTextureOverload::kLoad2dArrayLevelF32:
-    case ValidTextureOverload::kLoad2dArrayLevelU32:
-    case ValidTextureOverload::kLoad2dArrayLevelI32:
-    case ValidTextureOverload::kLoad3dLevelF32:
-    case ValidTextureOverload::kLoad3dLevelU32:
-    case ValidTextureOverload::kLoad3dLevelI32:
-      return R"(tint_symbol.Load(int4(1, 2, 3, 4));)";
-    case ValidTextureOverload::kLoadDepthMultisampled2dF32:
-    case ValidTextureOverload::kLoadMultisampled2dF32:
-    case ValidTextureOverload::kLoadMultisampled2dU32:
-    case ValidTextureOverload::kLoadMultisampled2dI32:
-      return R"(tint_symbol.Load(int2(1, 2), 3);)";
-    case ValidTextureOverload::kLoadDepth2dLevelF32:
-      return R"(tint_symbol.Load(int3(1, 2, 3)).x;)";
-    case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
-      return R"(tint_symbol.Load(int4(1, 2, 3, 4)).x;)";
-    case ValidTextureOverload::kStoreWO1dRgba32float:
-      return R"(tint_symbol[1] = float4(2.0f, 3.0f, 4.0f, 5.0f);)";
-    case ValidTextureOverload::kStoreWO2dRgba32float:
-      return R"(tint_symbol[int2(1, 2)] = float4(3.0f, 4.0f, 5.0f, 6.0f);)";
-    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
-      return R"(tint_symbol[int3(1, 2, 3)] = float4(4.0f, 5.0f, 6.0f, 7.0f);)";
-    case ValidTextureOverload::kStoreWO3dRgba32float:
-      return R"(tint_symbol[int3(1, 2, 3)] = float4(4.0f, 5.0f, 6.0f, 7.0f);)";
-  }
-  return "<unmatched texture overload>";
-}  // NOLINT - Ignore the length of this function
-
-class HlslGeneratorIntrinsicTextureTest
-    : public TestParamHelper<ast::intrinsic::test::TextureOverloadCase> {};
-
-TEST_P(HlslGeneratorIntrinsicTextureTest, Call) {
-  auto param = GetParam();
-
-  param.BuildTextureVariable(this);
-  param.BuildSamplerVariable(this);
-
-  auto* call = Call(param.function, param.args(this));
-  auto* stmt = CallStmt(call);
-
-  Func("main", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-
-  auto expected = expected_texture_overload(param.overload);
-
-  EXPECT_THAT(gen.result(), HasSubstr(expected.pre));
-  EXPECT_THAT(gen.result(), HasSubstr(expected.out));
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    HlslGeneratorIntrinsicTextureTest,
-    HlslGeneratorIntrinsicTextureTest,
-    testing::ValuesIn(ast::intrinsic::test::TextureOverloadCase::ValidCases()));
-
-}  // namespace
-}  // namespace hlsl
-}  // namespace writer
-}  // namespace tint
diff --git a/src/writer/msl/generator_impl.cc b/src/writer/msl/generator_impl.cc
index 92faffb..ec2d748 100644
--- a/src/writer/msl/generator_impl.cc
+++ b/src/writer/msl/generator_impl.cc
@@ -542,8 +542,8 @@
   if (auto* func = target->As<sem::Function>()) {
     return EmitFunctionCall(out, call, func);
   }
-  if (auto* intrinsic = target->As<sem::Intrinsic>()) {
-    return EmitIntrinsicCall(out, call, intrinsic);
+  if (auto* builtin = target->As<sem::Builtin>()) {
+    return EmitBuiltinCall(out, call, builtin);
   }
   if (auto* conv = target->As<sem::TypeConversion>()) {
     return EmitTypeConversion(out, call, conv);
@@ -579,34 +579,34 @@
   return true;
 }
 
-bool GeneratorImpl::EmitIntrinsicCall(std::ostream& out,
-                                      const sem::Call* call,
-                                      const sem::Intrinsic* intrinsic) {
+bool GeneratorImpl::EmitBuiltinCall(std::ostream& out,
+                                    const sem::Call* call,
+                                    const sem::Builtin* builtin) {
   auto* expr = call->Declaration();
-  if (intrinsic->IsAtomic()) {
-    return EmitAtomicCall(out, expr, intrinsic);
+  if (builtin->IsAtomic()) {
+    return EmitAtomicCall(out, expr, builtin);
   }
-  if (intrinsic->IsTexture()) {
-    return EmitTextureCall(out, call, intrinsic);
+  if (builtin->IsTexture()) {
+    return EmitTextureCall(out, call, builtin);
   }
 
-  auto name = generate_builtin_name(intrinsic);
+  auto name = generate_builtin_name(builtin);
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kDot:
-      return EmitDotCall(out, expr, intrinsic);
-    case sem::IntrinsicType::kModf:
-      return EmitModfCall(out, expr, intrinsic);
-    case sem::IntrinsicType::kFrexp:
-      return EmitFrexpCall(out, expr, intrinsic);
-    case sem::IntrinsicType::kDegrees:
-      return EmitDegreesCall(out, expr, intrinsic);
-    case sem::IntrinsicType::kRadians:
-      return EmitRadiansCall(out, expr, intrinsic);
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kDot:
+      return EmitDotCall(out, expr, builtin);
+    case sem::BuiltinType::kModf:
+      return EmitModfCall(out, expr, builtin);
+    case sem::BuiltinType::kFrexp:
+      return EmitFrexpCall(out, expr, builtin);
+    case sem::BuiltinType::kDegrees:
+      return EmitDegreesCall(out, expr, builtin);
+    case sem::BuiltinType::kRadians:
+      return EmitRadiansCall(out, expr, builtin);
 
-    case sem::IntrinsicType::kPack2x16float:
-    case sem::IntrinsicType::kUnpack2x16float: {
-      if (intrinsic->Type() == sem::IntrinsicType::kPack2x16float) {
+    case sem::BuiltinType::kPack2x16float:
+    case sem::BuiltinType::kUnpack2x16float: {
+      if (builtin->Type() == sem::BuiltinType::kPack2x16float) {
         out << "as_type<uint>(half2(";
       } else {
         out << "float2(as_type<half2>(";
@@ -619,16 +619,16 @@
     }
     // TODO(crbug.com/tint/661): Combine sequential barriers to a single
     // instruction.
-    case sem::IntrinsicType::kStorageBarrier: {
+    case sem::BuiltinType::kStorageBarrier: {
       out << "threadgroup_barrier(mem_flags::mem_device)";
       return true;
     }
-    case sem::IntrinsicType::kWorkgroupBarrier: {
+    case sem::BuiltinType::kWorkgroupBarrier: {
       out << "threadgroup_barrier(mem_flags::mem_threadgroup)";
       return true;
     }
 
-    case sem::IntrinsicType::kLength: {
+    case sem::BuiltinType::kLength: {
       auto* sem = builder_.Sem().Get(expr->args[0]);
       if (sem->Type()->UnwrapRef()->is_scalar()) {
         // Emulate scalar overload using fabs(x).
@@ -637,7 +637,7 @@
       break;
     }
 
-    case sem::IntrinsicType::kDistance: {
+    case sem::BuiltinType::kDistance: {
       auto* sem = builder_.Sem().Get(expr->args[0]);
       if (sem->Type()->UnwrapRef()->is_scalar()) {
         // Emulate scalar overload using fabs(x - y);
@@ -741,7 +741,7 @@
 
 bool GeneratorImpl::EmitAtomicCall(std::ostream& out,
                                    const ast::CallExpression* expr,
-                                   const sem::Intrinsic* intrinsic) {
+                                   const sem::Builtin* builtin) {
   auto call = [&](const std::string& name, bool append_memory_order_relaxed) {
     out << name;
     {
@@ -762,38 +762,38 @@
     return true;
   };
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kAtomicLoad:
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kAtomicLoad:
       return call("atomic_load_explicit", true);
 
-    case sem::IntrinsicType::kAtomicStore:
+    case sem::BuiltinType::kAtomicStore:
       return call("atomic_store_explicit", true);
 
-    case sem::IntrinsicType::kAtomicAdd:
+    case sem::BuiltinType::kAtomicAdd:
       return call("atomic_fetch_add_explicit", true);
 
-    case sem::IntrinsicType::kAtomicSub:
+    case sem::BuiltinType::kAtomicSub:
       return call("atomic_fetch_sub_explicit", true);
 
-    case sem::IntrinsicType::kAtomicMax:
+    case sem::BuiltinType::kAtomicMax:
       return call("atomic_fetch_max_explicit", true);
 
-    case sem::IntrinsicType::kAtomicMin:
+    case sem::BuiltinType::kAtomicMin:
       return call("atomic_fetch_min_explicit", true);
 
-    case sem::IntrinsicType::kAtomicAnd:
+    case sem::BuiltinType::kAtomicAnd:
       return call("atomic_fetch_and_explicit", true);
 
-    case sem::IntrinsicType::kAtomicOr:
+    case sem::BuiltinType::kAtomicOr:
       return call("atomic_fetch_or_explicit", true);
 
-    case sem::IntrinsicType::kAtomicXor:
+    case sem::BuiltinType::kAtomicXor:
       return call("atomic_fetch_xor_explicit", true);
 
-    case sem::IntrinsicType::kAtomicExchange:
+    case sem::BuiltinType::kAtomicExchange:
       return call("atomic_exchange_explicit", true);
 
-    case sem::IntrinsicType::kAtomicCompareExchangeWeak: {
+    case sem::BuiltinType::kAtomicCompareExchangeWeak: {
       auto* ptr_ty = TypeOf(expr->args[0])->UnwrapRef()->As<sem::Pointer>();
       auto sc = ptr_ty->StorageClass();
 
@@ -836,16 +836,16 @@
   }
 
   TINT_UNREACHABLE(Writer, diagnostics_)
-      << "unsupported atomic intrinsic: " << intrinsic->Type();
+      << "unsupported atomic builtin: " << builtin->Type();
   return false;
 }
 
 bool GeneratorImpl::EmitTextureCall(std::ostream& out,
                                     const sem::Call* call,
-                                    const sem::Intrinsic* intrinsic) {
+                                    const sem::Builtin* builtin) {
   using Usage = sem::ParameterUsage;
 
-  auto& signature = intrinsic->Signature();
+  auto& signature = builtin->Signature();
   auto* expr = call->Declaration();
   auto& arguments = call->Arguments();
 
@@ -883,8 +883,8 @@
     return true;
   };
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kTextureDimensions: {
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kTextureDimensions: {
       std::vector<const char*> dims;
       switch (texture_type->dim()) {
         case ast::TextureDimension::kNone:
@@ -936,7 +936,7 @@
       }
       return true;
     }
-    case sem::IntrinsicType::kTextureNumLayers: {
+    case sem::BuiltinType::kTextureNumLayers: {
       out << "int(";
       if (!texture_expr()) {
         return false;
@@ -944,7 +944,7 @@
       out << ".get_array_size())";
       return true;
     }
-    case sem::IntrinsicType::kTextureNumLevels: {
+    case sem::BuiltinType::kTextureNumLevels: {
       out << "int(";
       if (!texture_expr()) {
         return false;
@@ -952,7 +952,7 @@
       out << ".get_num_mip_levels())";
       return true;
     }
-    case sem::IntrinsicType::kTextureNumSamples: {
+    case sem::BuiltinType::kTextureNumSamples: {
       out << "int(";
       if (!texture_expr()) {
         return false;
@@ -970,33 +970,33 @@
 
   bool lod_param_is_named = true;
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kTextureSample:
-    case sem::IntrinsicType::kTextureSampleBias:
-    case sem::IntrinsicType::kTextureSampleLevel:
-    case sem::IntrinsicType::kTextureSampleGrad:
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kTextureSample:
+    case sem::BuiltinType::kTextureSampleBias:
+    case sem::BuiltinType::kTextureSampleLevel:
+    case sem::BuiltinType::kTextureSampleGrad:
       out << ".sample(";
       break;
-    case sem::IntrinsicType::kTextureSampleCompare:
-    case sem::IntrinsicType::kTextureSampleCompareLevel:
+    case sem::BuiltinType::kTextureSampleCompare:
+    case sem::BuiltinType::kTextureSampleCompareLevel:
       out << ".sample_compare(";
       break;
-    case sem::IntrinsicType::kTextureGather:
+    case sem::BuiltinType::kTextureGather:
       out << ".gather(";
       break;
-    case sem::IntrinsicType::kTextureGatherCompare:
+    case sem::BuiltinType::kTextureGatherCompare:
       out << ".gather_compare(";
       break;
-    case sem::IntrinsicType::kTextureLoad:
+    case sem::BuiltinType::kTextureLoad:
       out << ".read(";
       lod_param_is_named = false;
       break;
-    case sem::IntrinsicType::kTextureStore:
+    case sem::BuiltinType::kTextureStore:
       out << ".write(";
       break;
     default:
       TINT_UNREACHABLE(Writer, diagnostics_)
-          << "Unhandled texture intrinsic '" << intrinsic->str() << "'";
+          << "Unhandled texture builtin '" << builtin->str() << "'";
       return false;
   }
 
@@ -1066,7 +1066,7 @@
       out << ")";
     }
   }
-  if (intrinsic->Type() == sem::IntrinsicType::kTextureSampleCompareLevel) {
+  if (builtin->Type() == sem::BuiltinType::kTextureSampleCompareLevel) {
     maybe_write_comma();
     out << "level(0)";
   }
@@ -1154,8 +1154,8 @@
 
 bool GeneratorImpl::EmitDotCall(std::ostream& out,
                                 const ast::CallExpression* expr,
-                                const sem::Intrinsic* intrinsic) {
-  auto* vec_ty = intrinsic->Parameters()[0]->Type()->As<sem::Vector>();
+                                const sem::Builtin* builtin) {
+  auto* vec_ty = builtin->Parameters()[0]->Type()->As<sem::Vector>();
   std::string fn = "dot";
   if (vec_ty->type()->is_integer_scalar()) {
     // MSL does not have a builtin for dot() with integer vector types.
@@ -1201,11 +1201,11 @@
 
 bool GeneratorImpl::EmitModfCall(std::ostream& out,
                                  const ast::CallExpression* expr,
-                                 const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                 const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
-        auto* ty = intrinsic->Parameters()[0]->Type();
+        auto* ty = builtin->Parameters()[0]->Type();
         auto in = params[0];
 
         std::string width;
@@ -1216,7 +1216,7 @@
         // Emit the builtin return type unique to this overload. This does not
         // exist in the AST, so it will not be generated in Generate().
         if (!EmitStructType(&helpers_,
-                            intrinsic->ReturnType()->As<sem::Struct>())) {
+                            builtin->ReturnType()->As<sem::Struct>())) {
           return false;
         }
 
@@ -1229,11 +1229,11 @@
 
 bool GeneratorImpl::EmitFrexpCall(std::ostream& out,
                                   const ast::CallExpression* expr,
-                                  const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                  const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
-        auto* ty = intrinsic->Parameters()[0]->Type();
+        auto* ty = builtin->Parameters()[0]->Type();
         auto in = params[0];
 
         std::string width;
@@ -1244,7 +1244,7 @@
         // Emit the builtin return type unique to this overload. This does not
         // exist in the AST, so it will not be generated in Generate().
         if (!EmitStructType(&helpers_,
-                            intrinsic->ReturnType()->As<sem::Struct>())) {
+                            builtin->ReturnType()->As<sem::Struct>())) {
           return false;
         }
 
@@ -1257,9 +1257,9 @@
 
 bool GeneratorImpl::EmitDegreesCall(std::ostream& out,
                                     const ast::CallExpression* expr,
-                                    const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                    const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
         line(b) << "return " << params[0] << " * " << std::setprecision(20)
                 << sem::kRadToDeg << ";";
@@ -1269,9 +1269,9 @@
 
 bool GeneratorImpl::EmitRadiansCall(std::ostream& out,
                                     const ast::CallExpression* expr,
-                                    const sem::Intrinsic* intrinsic) {
-  return CallIntrinsicHelper(
-      out, expr, intrinsic,
+                                    const sem::Builtin* builtin) {
+  return CallBuiltinHelper(
+      out, expr, builtin,
       [&](TextBuffer* b, const std::vector<std::string>& params) {
         line(b) << "return " << params[0] << " * " << std::setprecision(20)
                 << sem::kDegToRad << ";";
@@ -1279,153 +1279,152 @@
       });
 }
 
-std::string GeneratorImpl::generate_builtin_name(
-    const sem::Intrinsic* intrinsic) {
+std::string GeneratorImpl::generate_builtin_name(const sem::Builtin* builtin) {
   std::string out = "";
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kAcos:
-    case sem::IntrinsicType::kAll:
-    case sem::IntrinsicType::kAny:
-    case sem::IntrinsicType::kAsin:
-    case sem::IntrinsicType::kAtan:
-    case sem::IntrinsicType::kAtan2:
-    case sem::IntrinsicType::kCeil:
-    case sem::IntrinsicType::kCos:
-    case sem::IntrinsicType::kCosh:
-    case sem::IntrinsicType::kCross:
-    case sem::IntrinsicType::kDeterminant:
-    case sem::IntrinsicType::kDistance:
-    case sem::IntrinsicType::kDot:
-    case sem::IntrinsicType::kExp:
-    case sem::IntrinsicType::kExp2:
-    case sem::IntrinsicType::kFloor:
-    case sem::IntrinsicType::kFma:
-    case sem::IntrinsicType::kFract:
-    case sem::IntrinsicType::kFrexp:
-    case sem::IntrinsicType::kLength:
-    case sem::IntrinsicType::kLdexp:
-    case sem::IntrinsicType::kLog:
-    case sem::IntrinsicType::kLog2:
-    case sem::IntrinsicType::kMix:
-    case sem::IntrinsicType::kModf:
-    case sem::IntrinsicType::kNormalize:
-    case sem::IntrinsicType::kPow:
-    case sem::IntrinsicType::kReflect:
-    case sem::IntrinsicType::kRefract:
-    case sem::IntrinsicType::kSelect:
-    case sem::IntrinsicType::kSin:
-    case sem::IntrinsicType::kSinh:
-    case sem::IntrinsicType::kSqrt:
-    case sem::IntrinsicType::kStep:
-    case sem::IntrinsicType::kTan:
-    case sem::IntrinsicType::kTanh:
-    case sem::IntrinsicType::kTranspose:
-    case sem::IntrinsicType::kTrunc:
-    case sem::IntrinsicType::kSign:
-    case sem::IntrinsicType::kClamp:
-      out += intrinsic->str();
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kAcos:
+    case sem::BuiltinType::kAll:
+    case sem::BuiltinType::kAny:
+    case sem::BuiltinType::kAsin:
+    case sem::BuiltinType::kAtan:
+    case sem::BuiltinType::kAtan2:
+    case sem::BuiltinType::kCeil:
+    case sem::BuiltinType::kCos:
+    case sem::BuiltinType::kCosh:
+    case sem::BuiltinType::kCross:
+    case sem::BuiltinType::kDeterminant:
+    case sem::BuiltinType::kDistance:
+    case sem::BuiltinType::kDot:
+    case sem::BuiltinType::kExp:
+    case sem::BuiltinType::kExp2:
+    case sem::BuiltinType::kFloor:
+    case sem::BuiltinType::kFma:
+    case sem::BuiltinType::kFract:
+    case sem::BuiltinType::kFrexp:
+    case sem::BuiltinType::kLength:
+    case sem::BuiltinType::kLdexp:
+    case sem::BuiltinType::kLog:
+    case sem::BuiltinType::kLog2:
+    case sem::BuiltinType::kMix:
+    case sem::BuiltinType::kModf:
+    case sem::BuiltinType::kNormalize:
+    case sem::BuiltinType::kPow:
+    case sem::BuiltinType::kReflect:
+    case sem::BuiltinType::kRefract:
+    case sem::BuiltinType::kSelect:
+    case sem::BuiltinType::kSin:
+    case sem::BuiltinType::kSinh:
+    case sem::BuiltinType::kSqrt:
+    case sem::BuiltinType::kStep:
+    case sem::BuiltinType::kTan:
+    case sem::BuiltinType::kTanh:
+    case sem::BuiltinType::kTranspose:
+    case sem::BuiltinType::kTrunc:
+    case sem::BuiltinType::kSign:
+    case sem::BuiltinType::kClamp:
+      out += builtin->str();
       break;
-    case sem::IntrinsicType::kAbs:
-      if (intrinsic->ReturnType()->is_float_scalar_or_vector()) {
+    case sem::BuiltinType::kAbs:
+      if (builtin->ReturnType()->is_float_scalar_or_vector()) {
         out += "fabs";
       } else {
         out += "abs";
       }
       break;
-    case sem::IntrinsicType::kCountOneBits:
+    case sem::BuiltinType::kCountOneBits:
       out += "popcount";
       break;
-    case sem::IntrinsicType::kDpdx:
-    case sem::IntrinsicType::kDpdxCoarse:
-    case sem::IntrinsicType::kDpdxFine:
+    case sem::BuiltinType::kDpdx:
+    case sem::BuiltinType::kDpdxCoarse:
+    case sem::BuiltinType::kDpdxFine:
       out += "dfdx";
       break;
-    case sem::IntrinsicType::kDpdy:
-    case sem::IntrinsicType::kDpdyCoarse:
-    case sem::IntrinsicType::kDpdyFine:
+    case sem::BuiltinType::kDpdy:
+    case sem::BuiltinType::kDpdyCoarse:
+    case sem::BuiltinType::kDpdyFine:
       out += "dfdy";
       break;
-    case sem::IntrinsicType::kFwidth:
-    case sem::IntrinsicType::kFwidthCoarse:
-    case sem::IntrinsicType::kFwidthFine:
+    case sem::BuiltinType::kFwidth:
+    case sem::BuiltinType::kFwidthCoarse:
+    case sem::BuiltinType::kFwidthFine:
       out += "fwidth";
       break;
-    case sem::IntrinsicType::kIsFinite:
+    case sem::BuiltinType::kIsFinite:
       out += "isfinite";
       break;
-    case sem::IntrinsicType::kIsInf:
+    case sem::BuiltinType::kIsInf:
       out += "isinf";
       break;
-    case sem::IntrinsicType::kIsNan:
+    case sem::BuiltinType::kIsNan:
       out += "isnan";
       break;
-    case sem::IntrinsicType::kIsNormal:
+    case sem::BuiltinType::kIsNormal:
       out += "isnormal";
       break;
-    case sem::IntrinsicType::kMax:
-      if (intrinsic->ReturnType()->is_float_scalar_or_vector()) {
+    case sem::BuiltinType::kMax:
+      if (builtin->ReturnType()->is_float_scalar_or_vector()) {
         out += "fmax";
       } else {
         out += "max";
       }
       break;
-    case sem::IntrinsicType::kMin:
-      if (intrinsic->ReturnType()->is_float_scalar_or_vector()) {
+    case sem::BuiltinType::kMin:
+      if (builtin->ReturnType()->is_float_scalar_or_vector()) {
         out += "fmin";
       } else {
         out += "min";
       }
       break;
-    case sem::IntrinsicType::kFaceForward:
+    case sem::BuiltinType::kFaceForward:
       out += "faceforward";
       break;
-    case sem::IntrinsicType::kPack4x8snorm:
+    case sem::BuiltinType::kPack4x8snorm:
       out += "pack_float_to_snorm4x8";
       break;
-    case sem::IntrinsicType::kPack4x8unorm:
+    case sem::BuiltinType::kPack4x8unorm:
       out += "pack_float_to_unorm4x8";
       break;
-    case sem::IntrinsicType::kPack2x16snorm:
+    case sem::BuiltinType::kPack2x16snorm:
       out += "pack_float_to_snorm2x16";
       break;
-    case sem::IntrinsicType::kPack2x16unorm:
+    case sem::BuiltinType::kPack2x16unorm:
       out += "pack_float_to_unorm2x16";
       break;
-    case sem::IntrinsicType::kReverseBits:
+    case sem::BuiltinType::kReverseBits:
       out += "reverse_bits";
       break;
-    case sem::IntrinsicType::kRound:
+    case sem::BuiltinType::kRound:
       out += "rint";
       break;
-    case sem::IntrinsicType::kSmoothStep:
+    case sem::BuiltinType::kSmoothStep:
       out += "smoothstep";
       break;
-    case sem::IntrinsicType::kInverseSqrt:
+    case sem::BuiltinType::kInverseSqrt:
       out += "rsqrt";
       break;
-    case sem::IntrinsicType::kUnpack4x8snorm:
+    case sem::BuiltinType::kUnpack4x8snorm:
       out += "unpack_snorm4x8_to_float";
       break;
-    case sem::IntrinsicType::kUnpack4x8unorm:
+    case sem::BuiltinType::kUnpack4x8unorm:
       out += "unpack_unorm4x8_to_float";
       break;
-    case sem::IntrinsicType::kUnpack2x16snorm:
+    case sem::BuiltinType::kUnpack2x16snorm:
       out += "unpack_snorm2x16_to_float";
       break;
-    case sem::IntrinsicType::kUnpack2x16unorm:
+    case sem::BuiltinType::kUnpack2x16unorm:
       out += "unpack_unorm2x16_to_float";
       break;
-    case sem::IntrinsicType::kArrayLength:
+    case sem::BuiltinType::kArrayLength:
       diagnostics_.add_error(
           diag::System::Writer,
-          "Unable to translate builtin: " + std::string(intrinsic->str()) +
+          "Unable to translate builtin: " + std::string(builtin->str()) +
               "\nDid you forget to pass array_length_from_uniform generator "
               "options?");
       return "";
     default:
       diagnostics_.add_error(
           diag::System::Writer,
-          "Unknown import method: " + std::string(intrinsic->str()));
+          "Unknown import method: " + std::string(builtin->str()));
       return "";
   }
   return out;
@@ -2871,26 +2870,26 @@
 }
 
 template <typename F>
-bool GeneratorImpl::CallIntrinsicHelper(std::ostream& out,
-                                        const ast::CallExpression* call,
-                                        const sem::Intrinsic* intrinsic,
-                                        F&& build) {
+bool GeneratorImpl::CallBuiltinHelper(std::ostream& out,
+                                      const ast::CallExpression* call,
+                                      const sem::Builtin* builtin,
+                                      F&& build) {
   // Generate the helper function if it hasn't been created already
-  auto fn = utils::GetOrCreate(intrinsics_, intrinsic, [&]() -> std::string {
+  auto fn = utils::GetOrCreate(builtins_, builtin, [&]() -> std::string {
     TextBuffer b;
     TINT_DEFER(helpers_.Append(b));
 
     auto fn_name =
-        UniqueIdentifier(std::string("tint_") + sem::str(intrinsic->Type()));
+        UniqueIdentifier(std::string("tint_") + sem::str(builtin->Type()));
     std::vector<std::string> parameter_names;
     {
       auto decl = line(&b);
-      if (!EmitTypeAndName(decl, intrinsic->ReturnType(), fn_name)) {
+      if (!EmitTypeAndName(decl, builtin->ReturnType(), fn_name)) {
         return "";
       }
       {
         ScopedParen sp(decl);
-        for (auto* param : intrinsic->Parameters()) {
+        for (auto* param : builtin->Parameters()) {
           if (!parameter_names.empty()) {
             decl << ", ";
           }
diff --git a/src/writer/msl/generator_impl.h b/src/writer/msl/generator_impl.h
index 52e5bea..2d0a2bb 100644
--- a/src/writer/msl/generator_impl.h
+++ b/src/writer/msl/generator_impl.h
@@ -46,7 +46,7 @@
 // Forward declarations
 namespace sem {
 class Call;
-class Intrinsic;
+class Builtin;
 class TypeConstructor;
 class TypeConversion;
 }  // namespace sem
@@ -143,14 +143,14 @@
   /// @param expr the call expression
   /// @returns true if the call expression is emitted
   bool EmitCall(std::ostream& out, const ast::CallExpression* expr);
-  /// Handles generating an intrinsic call expression
+  /// Handles generating a builtin call expression
   /// @param out the output of the expression stream
   /// @param call the call expression
-  /// @param intrinsic the intrinsic being called
+  /// @param builtin the builtin being called
   /// @returns true if the call expression is emitted
-  bool EmitIntrinsicCall(std::ostream& out,
-                         const sem::Call* call,
-                         const sem::Intrinsic* intrinsic);
+  bool EmitBuiltinCall(std::ostream& out,
+                       const sem::Call* call,
+                       const sem::Builtin* builtin);
   /// Handles generating a type conversion expression
   /// @param out the output of the expression stream
   /// @param call the call expression
@@ -179,60 +179,60 @@
   /// `atomicMax`, etc)
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the atomic intrinsic
+  /// @param builtin the semantic information for the atomic builtin
   /// @returns true if the call expression is emitted
   bool EmitAtomicCall(std::ostream& out,
                       const ast::CallExpression* expr,
-                      const sem::Intrinsic* intrinsic);
+                      const sem::Builtin* builtin);
   /// Handles generating a call to a texture function (`textureSample`,
   /// `textureSampleGrad`, etc)
   /// @param out the output of the expression stream
   /// @param call the call expression
-  /// @param intrinsic the semantic information for the texture intrinsic
+  /// @param builtin the semantic information for the texture builtin
   /// @returns true if the call expression is emitted
   bool EmitTextureCall(std::ostream& out,
                        const sem::Call* call,
-                       const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `dot()` intrinsic
+                       const sem::Builtin* builtin);
+  /// Handles generating a call to the `dot()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitDotCall(std::ostream& out,
                    const ast::CallExpression* expr,
-                   const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `modf()` intrinsic
+                   const sem::Builtin* builtin);
+  /// Handles generating a call to the `modf()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitModfCall(std::ostream& out,
                     const ast::CallExpression* expr,
-                    const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `frexp()` intrinsic
+                    const sem::Builtin* builtin);
+  /// Handles generating a call to the `frexp()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitFrexpCall(std::ostream& out,
                      const ast::CallExpression* expr,
-                     const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `degrees()` intrinsic
+                     const sem::Builtin* builtin);
+  /// Handles generating a call to the `degrees()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitDegreesCall(std::ostream& out,
                        const ast::CallExpression* expr,
-                       const sem::Intrinsic* intrinsic);
-  /// Handles generating a call to the `radians()` intrinsic
+                       const sem::Builtin* builtin);
+  /// Handles generating a call to the `radians()` builtin
   /// @param out the output of the expression stream
   /// @param expr the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @returns true if the call expression is emitted
   bool EmitRadiansCall(std::ostream& out,
                        const ast::CallExpression* expr,
-                       const sem::Intrinsic* intrinsic);
+                       const sem::Builtin* builtin);
   /// Handles a case statement
   /// @param stmt the statement
   /// @returns true if the statement was emitted successfully
@@ -368,9 +368,9 @@
   bool EmitZeroValue(std::ostream& out, const sem::Type* type);
 
   /// Handles generating a builtin name
-  /// @param intrinsic the semantic info for the intrinsic
+  /// @param builtin the semantic info for the builtin
   /// @returns the name or "" if not valid
-  std::string generate_builtin_name(const sem::Intrinsic* intrinsic);
+  std::string generate_builtin_name(const sem::Builtin* builtin);
 
   /// Converts a builtin to an attribute name
   /// @param builtin the builtin to convert
@@ -392,13 +392,13 @@
     uint32_t align;
   };
 
-  /// CallIntrinsicHelper will call the intrinsic helper function, creating it
-  /// if it hasn't been built already. If the intrinsic needs to be built then
-  /// CallIntrinsicHelper will generate the function signature and will call
+  /// CallBuiltinHelper will call the builtin helper function, creating it
+  /// if it hasn't been built already. If the builtin needs to be built then
+  /// CallBuiltinHelper will generate the function signature and will call
   /// `build` to emit the body of the function.
   /// @param out the output of the expression stream
   /// @param call the call expression
-  /// @param intrinsic the semantic information for the intrinsic
+  /// @param builtin the semantic information for the builtin
   /// @param build a function with the signature:
   ///        `bool(TextBuffer* buffer, const std::vector<std::string>& params)`
   ///        Where:
@@ -406,10 +406,10 @@
   ///          `params` is the name of all the generated function parameters
   /// @returns true if the call expression is emitted
   template <typename F>
-  bool CallIntrinsicHelper(std::ostream& out,
-                           const ast::CallExpression* call,
-                           const sem::Intrinsic* intrinsic,
-                           F&& build);
+  bool CallBuiltinHelper(std::ostream& out,
+                         const ast::CallExpression* call,
+                         const sem::Builtin* builtin,
+                         F&& build);
 
   TextBuffer helpers_;  // Helper functions emitted at the top of the output
 
@@ -438,7 +438,7 @@
   /// should be created for that index.
   std::unordered_map<std::string, std::vector<uint32_t>> workgroup_allocations_;
 
-  std::unordered_map<const sem::Intrinsic*, std::string> intrinsics_;
+  std::unordered_map<const sem::Builtin*, std::string> builtins_;
   std::unordered_map<const sem::Type*, std::string> unary_minus_funcs_;
   std::unordered_map<uint32_t, std::string> int_dot_funcs_;
 };
diff --git a/src/writer/msl/generator_impl_builtin_test.cc b/src/writer/msl/generator_impl_builtin_test.cc
new file mode 100644
index 0000000..fba4296
--- /dev/null
+++ b/src/writer/msl/generator_impl_builtin_test.cc
@@ -0,0 +1,496 @@
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/ast/call_statement.h"
+#include "src/sem/call.h"
+#include "src/writer/msl/test_helper.h"
+
+namespace tint {
+namespace writer {
+namespace msl {
+namespace {
+
+using BuiltinType = sem::BuiltinType;
+
+using MslGeneratorImplTest = TestHelper;
+
+enum class ParamType {
+  kF32,
+  kU32,
+  kBool,
+};
+
+struct BuiltinData {
+  BuiltinType builtin;
+  ParamType type;
+  const char* msl_name;
+};
+inline std::ostream& operator<<(std::ostream& out, BuiltinData data) {
+  out << data.msl_name << "<";
+  switch (data.type) {
+    case ParamType::kF32:
+      out << "f32";
+      break;
+    case ParamType::kU32:
+      out << "u32";
+      break;
+    case ParamType::kBool:
+      out << "bool";
+      break;
+  }
+  out << ">";
+  return out;
+}
+
+const ast::CallExpression* GenerateCall(BuiltinType builtin,
+                                        ParamType type,
+                                        ProgramBuilder* builder) {
+  std::string name;
+  std::ostringstream str(name);
+  str << builtin;
+  switch (builtin) {
+    case BuiltinType::kAcos:
+    case BuiltinType::kAsin:
+    case BuiltinType::kAtan:
+    case BuiltinType::kCeil:
+    case BuiltinType::kCos:
+    case BuiltinType::kCosh:
+    case BuiltinType::kDpdx:
+    case BuiltinType::kDpdxCoarse:
+    case BuiltinType::kDpdxFine:
+    case BuiltinType::kDpdy:
+    case BuiltinType::kDpdyCoarse:
+    case BuiltinType::kDpdyFine:
+    case BuiltinType::kExp:
+    case BuiltinType::kExp2:
+    case BuiltinType::kFloor:
+    case BuiltinType::kFract:
+    case BuiltinType::kFwidth:
+    case BuiltinType::kFwidthCoarse:
+    case BuiltinType::kFwidthFine:
+    case BuiltinType::kInverseSqrt:
+    case BuiltinType::kIsFinite:
+    case BuiltinType::kIsInf:
+    case BuiltinType::kIsNan:
+    case BuiltinType::kIsNormal:
+    case BuiltinType::kLength:
+    case BuiltinType::kLog:
+    case BuiltinType::kLog2:
+    case BuiltinType::kNormalize:
+    case BuiltinType::kRound:
+    case BuiltinType::kSin:
+    case BuiltinType::kSinh:
+    case BuiltinType::kSqrt:
+    case BuiltinType::kTan:
+    case BuiltinType::kTanh:
+    case BuiltinType::kTrunc:
+    case BuiltinType::kSign:
+      return builder->Call(str.str(), "f2");
+    case BuiltinType::kLdexp:
+      return builder->Call(str.str(), "f2", "i2");
+    case BuiltinType::kAtan2:
+    case BuiltinType::kDot:
+    case BuiltinType::kDistance:
+    case BuiltinType::kPow:
+    case BuiltinType::kReflect:
+    case BuiltinType::kStep:
+      return builder->Call(str.str(), "f2", "f2");
+    case BuiltinType::kStorageBarrier:
+      return builder->Call(str.str());
+    case BuiltinType::kCross:
+      return builder->Call(str.str(), "f3", "f3");
+    case BuiltinType::kFma:
+    case BuiltinType::kMix:
+    case BuiltinType::kFaceForward:
+    case BuiltinType::kSmoothStep:
+      return builder->Call(str.str(), "f2", "f2", "f2");
+    case BuiltinType::kAll:
+    case BuiltinType::kAny:
+      return builder->Call(str.str(), "b2");
+    case BuiltinType::kAbs:
+      if (type == ParamType::kF32) {
+        return builder->Call(str.str(), "f2");
+      } else {
+        return builder->Call(str.str(), "u2");
+      }
+    case BuiltinType::kCountOneBits:
+    case BuiltinType::kReverseBits:
+      return builder->Call(str.str(), "u2");
+    case BuiltinType::kMax:
+    case BuiltinType::kMin:
+      if (type == ParamType::kF32) {
+        return builder->Call(str.str(), "f2", "f2");
+      } else {
+        return builder->Call(str.str(), "u2", "u2");
+      }
+    case BuiltinType::kClamp:
+      if (type == ParamType::kF32) {
+        return builder->Call(str.str(), "f2", "f2", "f2");
+      } else {
+        return builder->Call(str.str(), "u2", "u2", "u2");
+      }
+    case BuiltinType::kSelect:
+      return builder->Call(str.str(), "f2", "f2", "b2");
+    case BuiltinType::kDeterminant:
+      return builder->Call(str.str(), "m2x2");
+    case BuiltinType::kPack2x16snorm:
+    case BuiltinType::kPack2x16unorm:
+      return builder->Call(str.str(), "f2");
+    case BuiltinType::kPack4x8snorm:
+    case BuiltinType::kPack4x8unorm:
+      return builder->Call(str.str(), "f4");
+    case BuiltinType::kUnpack4x8snorm:
+    case BuiltinType::kUnpack4x8unorm:
+    case BuiltinType::kUnpack2x16snorm:
+    case BuiltinType::kUnpack2x16unorm:
+      return builder->Call(str.str(), "u1");
+    case BuiltinType::kWorkgroupBarrier:
+      return builder->Call(str.str());
+    case BuiltinType::kTranspose:
+      return builder->Call(str.str(), "m3x2");
+    default:
+      break;
+  }
+  return nullptr;
+}
+
+using MslBuiltinTest = TestParamHelper<BuiltinData>;
+TEST_P(MslBuiltinTest, Emit) {
+  auto param = GetParam();
+
+  Global("f2", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  Global("f3", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+  Global("f4", ty.vec4<f32>(), ast::StorageClass::kPrivate);
+  Global("u1", ty.u32(), ast::StorageClass::kPrivate);
+  Global("u2", ty.vec2<u32>(), ast::StorageClass::kPrivate);
+  Global("i2", ty.vec2<i32>(), ast::StorageClass::kPrivate);
+  Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
+  Global("m2x2", ty.mat2x2<f32>(), ast::StorageClass::kPrivate);
+  Global("m3x2", ty.mat3x2<f32>(), ast::StorageClass::kPrivate);
+
+  auto* call = GenerateCall(param.builtin, param.type, this);
+  ASSERT_NE(nullptr, call) << "Unhandled builtin";
+  Func("func", {}, ty.void_(), {Ignore(call)},
+       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
+
+  GeneratorImpl& gen = Build();
+
+  auto* sem = program->Sem().Get(call);
+  ASSERT_NE(sem, nullptr);
+  auto* target = sem->Target();
+  ASSERT_NE(target, nullptr);
+  auto* builtin = target->As<sem::Builtin>();
+  ASSERT_NE(builtin, nullptr);
+
+  EXPECT_EQ(gen.generate_builtin_name(builtin), param.msl_name);
+}
+INSTANTIATE_TEST_SUITE_P(
+    MslGeneratorImplTest,
+    MslBuiltinTest,
+    testing::Values(
+        BuiltinData{BuiltinType::kAbs, ParamType::kF32, "fabs"},
+        BuiltinData{BuiltinType::kAbs, ParamType::kU32, "abs"},
+        BuiltinData{BuiltinType::kAcos, ParamType::kF32, "acos"},
+        BuiltinData{BuiltinType::kAll, ParamType::kBool, "all"},
+        BuiltinData{BuiltinType::kAny, ParamType::kBool, "any"},
+        BuiltinData{BuiltinType::kAsin, ParamType::kF32, "asin"},
+        BuiltinData{BuiltinType::kAtan, ParamType::kF32, "atan"},
+        BuiltinData{BuiltinType::kAtan2, ParamType::kF32, "atan2"},
+        BuiltinData{BuiltinType::kCeil, ParamType::kF32, "ceil"},
+        BuiltinData{BuiltinType::kClamp, ParamType::kF32, "clamp"},
+        BuiltinData{BuiltinType::kClamp, ParamType::kU32, "clamp"},
+        BuiltinData{BuiltinType::kCos, ParamType::kF32, "cos"},
+        BuiltinData{BuiltinType::kCosh, ParamType::kF32, "cosh"},
+        BuiltinData{BuiltinType::kCountOneBits, ParamType::kU32, "popcount"},
+        BuiltinData{BuiltinType::kCross, ParamType::kF32, "cross"},
+        BuiltinData{BuiltinType::kDeterminant, ParamType::kF32, "determinant"},
+        BuiltinData{BuiltinType::kDistance, ParamType::kF32, "distance"},
+        BuiltinData{BuiltinType::kDot, ParamType::kF32, "dot"},
+        BuiltinData{BuiltinType::kDpdx, ParamType::kF32, "dfdx"},
+        BuiltinData{BuiltinType::kDpdxCoarse, ParamType::kF32, "dfdx"},
+        BuiltinData{BuiltinType::kDpdxFine, ParamType::kF32, "dfdx"},
+        BuiltinData{BuiltinType::kDpdy, ParamType::kF32, "dfdy"},
+        BuiltinData{BuiltinType::kDpdyCoarse, ParamType::kF32, "dfdy"},
+        BuiltinData{BuiltinType::kDpdyFine, ParamType::kF32, "dfdy"},
+        BuiltinData{BuiltinType::kExp, ParamType::kF32, "exp"},
+        BuiltinData{BuiltinType::kExp2, ParamType::kF32, "exp2"},
+        BuiltinData{BuiltinType::kFaceForward, ParamType::kF32, "faceforward"},
+        BuiltinData{BuiltinType::kFloor, ParamType::kF32, "floor"},
+        BuiltinData{BuiltinType::kFma, ParamType::kF32, "fma"},
+        BuiltinData{BuiltinType::kFract, ParamType::kF32, "fract"},
+        BuiltinData{BuiltinType::kFwidth, ParamType::kF32, "fwidth"},
+        BuiltinData{BuiltinType::kFwidthCoarse, ParamType::kF32, "fwidth"},
+        BuiltinData{BuiltinType::kFwidthFine, ParamType::kF32, "fwidth"},
+        BuiltinData{BuiltinType::kInverseSqrt, ParamType::kF32, "rsqrt"},
+        BuiltinData{BuiltinType::kIsFinite, ParamType::kF32, "isfinite"},
+        BuiltinData{BuiltinType::kIsInf, ParamType::kF32, "isinf"},
+        BuiltinData{BuiltinType::kIsNan, ParamType::kF32, "isnan"},
+        BuiltinData{BuiltinType::kIsNormal, ParamType::kF32, "isnormal"},
+        BuiltinData{BuiltinType::kLdexp, ParamType::kF32, "ldexp"},
+        BuiltinData{BuiltinType::kLength, ParamType::kF32, "length"},
+        BuiltinData{BuiltinType::kLog, ParamType::kF32, "log"},
+        BuiltinData{BuiltinType::kLog2, ParamType::kF32, "log2"},
+        BuiltinData{BuiltinType::kMax, ParamType::kF32, "fmax"},
+        BuiltinData{BuiltinType::kMax, ParamType::kU32, "max"},
+        BuiltinData{BuiltinType::kMin, ParamType::kF32, "fmin"},
+        BuiltinData{BuiltinType::kMin, ParamType::kU32, "min"},
+        BuiltinData{BuiltinType::kNormalize, ParamType::kF32, "normalize"},
+        BuiltinData{BuiltinType::kPack4x8snorm, ParamType::kF32,
+                    "pack_float_to_snorm4x8"},
+        BuiltinData{BuiltinType::kPack4x8unorm, ParamType::kF32,
+                    "pack_float_to_unorm4x8"},
+        BuiltinData{BuiltinType::kPack2x16snorm, ParamType::kF32,
+                    "pack_float_to_snorm2x16"},
+        BuiltinData{BuiltinType::kPack2x16unorm, ParamType::kF32,
+                    "pack_float_to_unorm2x16"},
+        BuiltinData{BuiltinType::kPow, ParamType::kF32, "pow"},
+        BuiltinData{BuiltinType::kReflect, ParamType::kF32, "reflect"},
+        BuiltinData{BuiltinType::kReverseBits, ParamType::kU32, "reverse_bits"},
+        BuiltinData{BuiltinType::kRound, ParamType::kU32, "rint"},
+        BuiltinData{BuiltinType::kSelect, ParamType::kF32, "select"},
+        BuiltinData{BuiltinType::kSign, ParamType::kF32, "sign"},
+        BuiltinData{BuiltinType::kSin, ParamType::kF32, "sin"},
+        BuiltinData{BuiltinType::kSinh, ParamType::kF32, "sinh"},
+        BuiltinData{BuiltinType::kSmoothStep, ParamType::kF32, "smoothstep"},
+        BuiltinData{BuiltinType::kSqrt, ParamType::kF32, "sqrt"},
+        BuiltinData{BuiltinType::kStep, ParamType::kF32, "step"},
+        BuiltinData{BuiltinType::kTan, ParamType::kF32, "tan"},
+        BuiltinData{BuiltinType::kTanh, ParamType::kF32, "tanh"},
+        BuiltinData{BuiltinType::kTranspose, ParamType::kF32, "transpose"},
+        BuiltinData{BuiltinType::kTrunc, ParamType::kF32, "trunc"},
+        BuiltinData{BuiltinType::kUnpack4x8snorm, ParamType::kU32,
+                    "unpack_snorm4x8_to_float"},
+        BuiltinData{BuiltinType::kUnpack4x8unorm, ParamType::kU32,
+                    "unpack_unorm4x8_to_float"},
+        BuiltinData{BuiltinType::kUnpack2x16snorm, ParamType::kU32,
+                    "unpack_snorm2x16_to_float"},
+        BuiltinData{BuiltinType::kUnpack2x16unorm, ParamType::kU32,
+                    "unpack_unorm2x16_to_float"}));
+
+TEST_F(MslGeneratorImplTest, Builtin_Call) {
+  Global("param1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  Global("param2", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+
+  auto* call = Call("dot", "param1", "param2");
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = Build();
+
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "dot(param1, param2)");
+}
+
+TEST_F(MslGeneratorImplTest, StorageBarrier) {
+  auto* call = Call("storageBarrier");
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = Build();
+
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "threadgroup_barrier(mem_flags::mem_device)");
+}
+
+TEST_F(MslGeneratorImplTest, WorkgroupBarrier) {
+  auto* call = Call("workgroupBarrier");
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = Build();
+
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "threadgroup_barrier(mem_flags::mem_threadgroup)");
+}
+
+TEST_F(MslGeneratorImplTest, Degrees_Scalar) {
+  auto* val = Var("val", ty.f32());
+  auto* call = Call("degrees", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
+
+using namespace metal;
+
+float tint_degrees(float param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+kernel void test_function() {
+  float val = 0.0f;
+  float const tint_symbol = tint_degrees(val);
+  return;
+}
+
+)");
+}
+
+TEST_F(MslGeneratorImplTest, Degrees_Vector) {
+  auto* val = Var("val", ty.vec3<f32>());
+  auto* call = Call("degrees", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
+
+using namespace metal;
+
+float3 tint_degrees(float3 param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+kernel void test_function() {
+  float3 val = 0.0f;
+  float3 const tint_symbol = tint_degrees(val);
+  return;
+}
+
+)");
+}
+
+TEST_F(MslGeneratorImplTest, Radians_Scalar) {
+  auto* val = Var("val", ty.f32());
+  auto* call = Call("radians", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
+
+using namespace metal;
+
+float tint_radians(float param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+kernel void test_function() {
+  float val = 0.0f;
+  float const tint_symbol = tint_radians(val);
+  return;
+}
+
+)");
+}
+
+TEST_F(MslGeneratorImplTest, Radians_Vector) {
+  auto* val = Var("val", ty.vec3<f32>());
+  auto* call = Call("radians", val);
+  WrapInFunction(val, call);
+
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
+
+using namespace metal;
+
+float3 tint_radians(float3 param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+kernel void test_function() {
+  float3 val = 0.0f;
+  float3 const tint_symbol = tint_radians(val);
+  return;
+}
+
+)");
+}
+
+TEST_F(MslGeneratorImplTest, Pack2x16Float) {
+  auto* call = Call("pack2x16float", "p1");
+  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = Build();
+
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "as_type<uint>(half2(p1))");
+}
+
+TEST_F(MslGeneratorImplTest, Unpack2x16Float) {
+  auto* call = Call("unpack2x16float", "p1");
+  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(call));
+
+  GeneratorImpl& gen = Build();
+
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+  EXPECT_EQ(out.str(), "float2(as_type<half2>(p1))");
+}
+
+TEST_F(MslGeneratorImplTest, DotI32) {
+  Global("v", ty.vec3<i32>(), ast::StorageClass::kPrivate);
+  WrapInFunction(CallStmt(Call("dot", "v", "v")));
+
+  GeneratorImpl& gen = SanitizeAndBuild();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
+
+using namespace metal;
+
+template<typename T>
+T tint_dot3(vec<T,3> a, vec<T,3> b) {
+  return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+}
+kernel void test_function() {
+  thread int3 tint_symbol = 0;
+  tint_dot3(tint_symbol, tint_symbol);
+  return;
+}
+
+)");
+}
+
+TEST_F(MslGeneratorImplTest, Ignore) {
+  Func("f", {Param("a", ty.i32()), Param("b", ty.i32()), Param("c", ty.i32())},
+       ty.i32(), {Return(Mul(Add("a", "b"), "c"))});
+
+  Func("func", {}, ty.void_(), {CallStmt(Call("f", 1, 2, 3))},
+       {
+           Stage(ast::PipelineStage::kCompute),
+           WorkgroupSize(1),
+       });
+
+  GeneratorImpl& gen = Build();
+
+  ASSERT_TRUE(gen.Generate()) << gen.error();
+  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
+
+using namespace metal;
+int f(int a, int b, int c) {
+  return as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) + as_type<uint>(b)))) * as_type<uint>(c)));
+}
+
+kernel void func() {
+  f(1, 2, 3);
+  return;
+}
+
+)");
+}
+
+}  // namespace
+}  // namespace msl
+}  // namespace writer
+}  // namespace tint
diff --git a/src/writer/msl/generator_impl_builtin_texture_test.cc b/src/writer/msl/generator_impl_builtin_texture_test.cc
new file mode 100644
index 0000000..f5887ff
--- /dev/null
+++ b/src/writer/msl/generator_impl_builtin_texture_test.cc
@@ -0,0 +1,305 @@
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/ast/builtin_texture_helper_test.h"
+#include "src/ast/call_statement.h"
+#include "src/writer/msl/test_helper.h"
+
+namespace tint {
+namespace writer {
+namespace msl {
+namespace {
+
+std::string expected_texture_overload(
+    ast::builtin::test::ValidTextureOverload overload) {
+  using ValidTextureOverload = ast::builtin::test::ValidTextureOverload;
+  switch (overload) {
+    case ValidTextureOverload::kDimensions1d:
+    case ValidTextureOverload::kDimensionsStorageWO1d:
+      return R"(int(texture.get_width()))";
+    case ValidTextureOverload::kDimensions2d:
+    case ValidTextureOverload::kDimensions2dArray:
+    case ValidTextureOverload::kDimensionsCube:
+    case ValidTextureOverload::kDimensionsCubeArray:
+    case ValidTextureOverload::kDimensionsMultisampled2d:
+    case ValidTextureOverload::kDimensionsDepth2d:
+    case ValidTextureOverload::kDimensionsDepth2dArray:
+    case ValidTextureOverload::kDimensionsDepthCube:
+    case ValidTextureOverload::kDimensionsDepthCubeArray:
+    case ValidTextureOverload::kDimensionsDepthMultisampled2d:
+    case ValidTextureOverload::kDimensionsStorageWO2d:
+    case ValidTextureOverload::kDimensionsStorageWO2dArray:
+      return R"(int2(texture.get_width(), texture.get_height()))";
+    case ValidTextureOverload::kDimensions3d:
+    case ValidTextureOverload::kDimensionsStorageWO3d:
+      return R"(int3(texture.get_width(), texture.get_height(), texture.get_depth()))";
+    case ValidTextureOverload::kDimensions2dLevel:
+    case ValidTextureOverload::kDimensionsCubeLevel:
+    case ValidTextureOverload::kDimensionsCubeArrayLevel:
+    case ValidTextureOverload::kDimensions2dArrayLevel:
+    case ValidTextureOverload::kDimensionsDepth2dLevel:
+    case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
+    case ValidTextureOverload::kDimensionsDepthCubeLevel:
+    case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
+      return R"(int2(texture.get_width(1), texture.get_height(1)))";
+    case ValidTextureOverload::kDimensions3dLevel:
+      return R"(int3(texture.get_width(1), texture.get_height(1), texture.get_depth(1)))";
+    case ValidTextureOverload::kGather2dF32:
+      return R"(texture.gather(sampler, float2(1.0f, 2.0f), int2(0), component::x))";
+    case ValidTextureOverload::kGather2dOffsetF32:
+      return R"(texture.gather(sampler, float2(1.0f, 2.0f), int2(3, 4), component::x))";
+    case ValidTextureOverload::kGather2dArrayF32:
+      return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3, int2(0), component::x))";
+    case ValidTextureOverload::kGather2dArrayOffsetF32:
+      return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3, int2(4, 5), component::x))";
+    case ValidTextureOverload::kGatherCubeF32:
+      return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), component::x))";
+    case ValidTextureOverload::kGatherCubeArrayF32:
+      return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), 4, component::x))";
+    case ValidTextureOverload::kGatherDepth2dF32:
+      return R"(texture.gather(sampler, float2(1.0f, 2.0f)))";
+    case ValidTextureOverload::kGatherDepth2dOffsetF32:
+      return R"(texture.gather(sampler, float2(1.0f, 2.0f), int2(3, 4)))";
+    case ValidTextureOverload::kGatherDepth2dArrayF32:
+      return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3))";
+    case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
+      return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3, int2(4, 5)))";
+    case ValidTextureOverload::kGatherDepthCubeF32:
+      return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f)))";
+    case ValidTextureOverload::kGatherDepthCubeArrayF32:
+      return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), 4))";
+    case ValidTextureOverload::kGatherCompareDepth2dF32:
+      return R"(texture.gather_compare(sampler, float2(1.0f, 2.0f), 3.0f))";
+    case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
+      return R"(texture.gather_compare(sampler, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
+    case ValidTextureOverload::kGatherCompareDepth2dArrayF32:
+      return R"(texture.gather_compare(sampler, float2(1.0f, 2.0f), 3, 4.0f))";
+    case ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32:
+      return R"(texture.gather_compare(sampler, float2(1.0f, 2.0f), 3, 4.0f, int2(5, 6)))";
+    case ValidTextureOverload::kGatherCompareDepthCubeF32:
+      return R"(texture.gather_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
+    case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
+      return R"(texture.gather_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
+    case ValidTextureOverload::kNumLayers2dArray:
+    case ValidTextureOverload::kNumLayersCubeArray:
+    case ValidTextureOverload::kNumLayersDepth2dArray:
+    case ValidTextureOverload::kNumLayersDepthCubeArray:
+    case ValidTextureOverload::kNumLayersStorageWO2dArray:
+      return R"(int(texture.get_array_size()))";
+    case ValidTextureOverload::kNumLevels2d:
+    case ValidTextureOverload::kNumLevels2dArray:
+    case ValidTextureOverload::kNumLevels3d:
+    case ValidTextureOverload::kNumLevelsCube:
+    case ValidTextureOverload::kNumLevelsCubeArray:
+    case ValidTextureOverload::kNumLevelsDepth2d:
+    case ValidTextureOverload::kNumLevelsDepth2dArray:
+    case ValidTextureOverload::kNumLevelsDepthCube:
+    case ValidTextureOverload::kNumLevelsDepthCubeArray:
+      return R"(int(texture.get_num_mip_levels()))";
+    case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
+    case ValidTextureOverload::kNumSamplesMultisampled2d:
+      return R"(int(texture.get_num_samples()))";
+    case ValidTextureOverload::kSample1dF32:
+      return R"(texture.sample(sampler, 1.0f))";
+    case ValidTextureOverload::kSample2dF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f)))";
+    case ValidTextureOverload::kSample2dOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), int2(3, 4)))";
+    case ValidTextureOverload::kSample2dArrayF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3))";
+    case ValidTextureOverload::kSample2dArrayOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, int2(4, 5)))";
+    case ValidTextureOverload::kSample3dF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f)))";
+    case ValidTextureOverload::kSample3dOffsetF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), int3(4, 5, 6)))";
+    case ValidTextureOverload::kSampleCubeF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f)))";
+    case ValidTextureOverload::kSampleCubeArrayF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4))";
+    case ValidTextureOverload::kSampleDepth2dF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f)))";
+    case ValidTextureOverload::kSampleDepth2dOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), int2(3, 4)))";
+    case ValidTextureOverload::kSampleDepth2dArrayF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3))";
+    case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, int2(4, 5)))";
+    case ValidTextureOverload::kSampleDepthCubeF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f)))";
+    case ValidTextureOverload::kSampleDepthCubeArrayF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4))";
+    case ValidTextureOverload::kSampleBias2dF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), bias(3.0f)))";
+    case ValidTextureOverload::kSampleBias2dOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), bias(3.0f), int2(4, 5)))";
+    case ValidTextureOverload::kSampleBias2dArrayF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 4, bias(3.0f)))";
+    case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, bias(4.0f), int2(5, 6)))";
+    case ValidTextureOverload::kSampleBias3dF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), bias(4.0f)))";
+    case ValidTextureOverload::kSampleBias3dOffsetF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), bias(4.0f), int3(5, 6, 7)))";
+    case ValidTextureOverload::kSampleBiasCubeF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), bias(4.0f)))";
+    case ValidTextureOverload::kSampleBiasCubeArrayF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 3, bias(4.0f)))";
+    case ValidTextureOverload::kSampleLevel2dF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3.0f)))";
+    case ValidTextureOverload::kSampleLevel2dOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3.0f), int2(4, 5)))";
+    case ValidTextureOverload::kSampleLevel2dArrayF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, level(4.0f)))";
+    case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, level(4.0f), int2(5, 6)))";
+    case ValidTextureOverload::kSampleLevel3dF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), level(4.0f)))";
+    case ValidTextureOverload::kSampleLevel3dOffsetF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), level(4.0f), int3(5, 6, 7)))";
+    case ValidTextureOverload::kSampleLevelCubeF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), level(4.0f)))";
+    case ValidTextureOverload::kSampleLevelCubeArrayF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4, level(5.0f)))";
+    case ValidTextureOverload::kSampleLevelDepth2dF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3)))";
+    case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3), int2(4, 5)))";
+    case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, level(4)))";
+    case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, level(4), int2(5, 6)))";
+    case ValidTextureOverload::kSampleLevelDepthCubeF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), level(4)))";
+    case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4, level(5)))";
+    case ValidTextureOverload::kSampleGrad2dF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), gradient2d(float2(3.0f, 4.0f), float2(5.0f, 6.0f))))";
+    case ValidTextureOverload::kSampleGrad2dOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), gradient2d(float2(3.0f, 4.0f), float2(5.0f, 6.0f)), int2(7, 7)))";
+    case ValidTextureOverload::kSampleGrad2dArrayF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f))))";
+    case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
+      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f)), int2(6, 7)))";
+    case ValidTextureOverload::kSampleGrad3dF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), gradient3d(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))))";
+    case ValidTextureOverload::kSampleGrad3dOffsetF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), gradient3d(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f)), int3(0, 1, 2)))";
+    case ValidTextureOverload::kSampleGradCubeF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), gradientcube(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))))";
+    case ValidTextureOverload::kSampleGradCubeArrayF32:
+      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4, gradientcube(float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f))))";
+    case ValidTextureOverload::kSampleCompareDepth2dF32:
+      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f))";
+    case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
+      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
+    case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
+      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f))";
+    case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
+      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f, int2(5, 6)))";
+    case ValidTextureOverload::kSampleCompareDepthCubeF32:
+      return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
+    case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
+      return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
+      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f))";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
+      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
+      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f))";
+    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
+      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f, int2(5, 6)))";
+    case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
+      return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
+    case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
+      return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
+    case ValidTextureOverload::kLoad1dLevelF32:
+      return R"(texture.read(uint(1), 3))";
+    case ValidTextureOverload::kLoad1dLevelU32:
+      return R"(texture.read(uint(1), 3))";
+    case ValidTextureOverload::kLoad1dLevelI32:
+      return R"(texture.read(uint(1), 3))";
+    case ValidTextureOverload::kLoad2dLevelF32:
+      return R"(texture.read(uint2(int2(1, 2)), 3))";
+    case ValidTextureOverload::kLoad2dLevelU32:
+      return R"(texture.read(uint2(int2(1, 2)), 3))";
+    case ValidTextureOverload::kLoad2dLevelI32:
+      return R"(texture.read(uint2(int2(1, 2)), 3))";
+    case ValidTextureOverload::kLoad2dArrayLevelF32:
+      return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
+    case ValidTextureOverload::kLoad2dArrayLevelU32:
+      return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
+    case ValidTextureOverload::kLoad2dArrayLevelI32:
+      return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
+    case ValidTextureOverload::kLoad3dLevelF32:
+      return R"(texture.read(uint3(int3(1, 2, 3)), 4))";
+    case ValidTextureOverload::kLoad3dLevelU32:
+      return R"(texture.read(uint3(int3(1, 2, 3)), 4))";
+    case ValidTextureOverload::kLoad3dLevelI32:
+      return R"(texture.read(uint3(int3(1, 2, 3)), 4))";
+    case ValidTextureOverload::kLoadMultisampled2dF32:
+      return R"(texture.read(uint2(int2(1, 2)), 3))";
+    case ValidTextureOverload::kLoadMultisampled2dU32:
+      return R"(texture.read(uint2(int2(1, 2)), 3))";
+    case ValidTextureOverload::kLoadMultisampled2dI32:
+      return R"(texture.read(uint2(int2(1, 2)), 3))";
+    case ValidTextureOverload::kLoadDepth2dLevelF32:
+    case ValidTextureOverload::kLoadDepthMultisampled2dF32:
+      return R"(texture.read(uint2(int2(1, 2)), 3))";
+    case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
+      return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
+    case ValidTextureOverload::kStoreWO1dRgba32float:
+      return R"(texture.write(float4(2.0f, 3.0f, 4.0f, 5.0f), uint(1)))";
+    case ValidTextureOverload::kStoreWO2dRgba32float:
+      return R"(texture.write(float4(3.0f, 4.0f, 5.0f, 6.0f), uint2(int2(1, 2))))";
+    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
+      return R"(texture.write(float4(4.0f, 5.0f, 6.0f, 7.0f), uint2(int2(1, 2)), 3))";
+    case ValidTextureOverload::kStoreWO3dRgba32float:
+      return R"(texture.write(float4(4.0f, 5.0f, 6.0f, 7.0f), uint3(int3(1, 2, 3))))";
+  }
+  return "<unmatched texture overload>";
+}  // NOLINT - Ignore the length of this function
+
+class MslGeneratorBuiltinTextureTest
+    : public TestParamHelper<ast::builtin::test::TextureOverloadCase> {};
+
+TEST_P(MslGeneratorBuiltinTextureTest, Call) {
+  auto param = GetParam();
+
+  param.BuildTextureVariable(this);
+  param.BuildSamplerVariable(this);
+
+  auto* call = Call(Expr(param.function), param.args(this));
+  auto* stmt = CallStmt(call);
+
+  Func("main", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
+
+  GeneratorImpl& gen = Build();
+
+  std::stringstream out;
+  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
+
+  auto expected = expected_texture_overload(param.overload);
+  EXPECT_EQ(expected, out.str());
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    MslGeneratorBuiltinTextureTest,
+    MslGeneratorBuiltinTextureTest,
+    testing::ValuesIn(ast::builtin::test::TextureOverloadCase::ValidCases()));
+
+}  // namespace
+}  // namespace msl
+}  // namespace writer
+}  // namespace tint
diff --git a/src/writer/msl/generator_impl_import_test.cc b/src/writer/msl/generator_impl_import_test.cc
index 84b9536..2624195 100644
--- a/src/writer/msl/generator_impl_import_test.cc
+++ b/src/writer/msl/generator_impl_import_test.cc
@@ -35,7 +35,7 @@
   auto param = GetParam();
   auto* call = Call(param.name, 1.f);
 
-  // The resolver will set the intrinsic data for the ident
+  // The resolver will set the builtin data for the ident
   WrapInFunction(call);
 
   GeneratorImpl& gen = Build();
@@ -44,10 +44,10 @@
   ASSERT_NE(sem, nullptr);
   auto* target = sem->Target();
   ASSERT_NE(target, nullptr);
-  auto* intrinsic = target->As<sem::Intrinsic>();
-  ASSERT_NE(intrinsic, nullptr);
+  auto* builtin = target->As<sem::Builtin>();
+  ASSERT_NE(builtin, nullptr);
 
-  ASSERT_EQ(gen.generate_builtin_name(intrinsic), param.msl_name);
+  ASSERT_EQ(gen.generate_builtin_name(builtin), param.msl_name);
 }
 INSTANTIATE_TEST_SUITE_P(MslGeneratorImplTest,
                          MslImportData_SingleParamTest,
diff --git a/src/writer/msl/generator_impl_intrinsic_test.cc b/src/writer/msl/generator_impl_intrinsic_test.cc
deleted file mode 100644
index 45885f5..0000000
--- a/src/writer/msl/generator_impl_intrinsic_test.cc
+++ /dev/null
@@ -1,501 +0,0 @@
-// Copyright 2020 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/ast/call_statement.h"
-#include "src/sem/call.h"
-#include "src/writer/msl/test_helper.h"
-
-namespace tint {
-namespace writer {
-namespace msl {
-namespace {
-
-using IntrinsicType = sem::IntrinsicType;
-
-using MslGeneratorImplTest = TestHelper;
-
-enum class ParamType {
-  kF32,
-  kU32,
-  kBool,
-};
-
-struct IntrinsicData {
-  IntrinsicType intrinsic;
-  ParamType type;
-  const char* msl_name;
-};
-inline std::ostream& operator<<(std::ostream& out, IntrinsicData data) {
-  out << data.msl_name << "<";
-  switch (data.type) {
-    case ParamType::kF32:
-      out << "f32";
-      break;
-    case ParamType::kU32:
-      out << "u32";
-      break;
-    case ParamType::kBool:
-      out << "bool";
-      break;
-  }
-  out << ">";
-  return out;
-}
-
-const ast::CallExpression* GenerateCall(IntrinsicType intrinsic,
-                                        ParamType type,
-                                        ProgramBuilder* builder) {
-  std::string name;
-  std::ostringstream str(name);
-  str << intrinsic;
-  switch (intrinsic) {
-    case IntrinsicType::kAcos:
-    case IntrinsicType::kAsin:
-    case IntrinsicType::kAtan:
-    case IntrinsicType::kCeil:
-    case IntrinsicType::kCos:
-    case IntrinsicType::kCosh:
-    case IntrinsicType::kDpdx:
-    case IntrinsicType::kDpdxCoarse:
-    case IntrinsicType::kDpdxFine:
-    case IntrinsicType::kDpdy:
-    case IntrinsicType::kDpdyCoarse:
-    case IntrinsicType::kDpdyFine:
-    case IntrinsicType::kExp:
-    case IntrinsicType::kExp2:
-    case IntrinsicType::kFloor:
-    case IntrinsicType::kFract:
-    case IntrinsicType::kFwidth:
-    case IntrinsicType::kFwidthCoarse:
-    case IntrinsicType::kFwidthFine:
-    case IntrinsicType::kInverseSqrt:
-    case IntrinsicType::kIsFinite:
-    case IntrinsicType::kIsInf:
-    case IntrinsicType::kIsNan:
-    case IntrinsicType::kIsNormal:
-    case IntrinsicType::kLength:
-    case IntrinsicType::kLog:
-    case IntrinsicType::kLog2:
-    case IntrinsicType::kNormalize:
-    case IntrinsicType::kRound:
-    case IntrinsicType::kSin:
-    case IntrinsicType::kSinh:
-    case IntrinsicType::kSqrt:
-    case IntrinsicType::kTan:
-    case IntrinsicType::kTanh:
-    case IntrinsicType::kTrunc:
-    case IntrinsicType::kSign:
-      return builder->Call(str.str(), "f2");
-    case IntrinsicType::kLdexp:
-      return builder->Call(str.str(), "f2", "i2");
-    case IntrinsicType::kAtan2:
-    case IntrinsicType::kDot:
-    case IntrinsicType::kDistance:
-    case IntrinsicType::kPow:
-    case IntrinsicType::kReflect:
-    case IntrinsicType::kStep:
-      return builder->Call(str.str(), "f2", "f2");
-    case IntrinsicType::kStorageBarrier:
-      return builder->Call(str.str());
-    case IntrinsicType::kCross:
-      return builder->Call(str.str(), "f3", "f3");
-    case IntrinsicType::kFma:
-    case IntrinsicType::kMix:
-    case IntrinsicType::kFaceForward:
-    case IntrinsicType::kSmoothStep:
-      return builder->Call(str.str(), "f2", "f2", "f2");
-    case IntrinsicType::kAll:
-    case IntrinsicType::kAny:
-      return builder->Call(str.str(), "b2");
-    case IntrinsicType::kAbs:
-      if (type == ParamType::kF32) {
-        return builder->Call(str.str(), "f2");
-      } else {
-        return builder->Call(str.str(), "u2");
-      }
-    case IntrinsicType::kCountOneBits:
-    case IntrinsicType::kReverseBits:
-      return builder->Call(str.str(), "u2");
-    case IntrinsicType::kMax:
-    case IntrinsicType::kMin:
-      if (type == ParamType::kF32) {
-        return builder->Call(str.str(), "f2", "f2");
-      } else {
-        return builder->Call(str.str(), "u2", "u2");
-      }
-    case IntrinsicType::kClamp:
-      if (type == ParamType::kF32) {
-        return builder->Call(str.str(), "f2", "f2", "f2");
-      } else {
-        return builder->Call(str.str(), "u2", "u2", "u2");
-      }
-    case IntrinsicType::kSelect:
-      return builder->Call(str.str(), "f2", "f2", "b2");
-    case IntrinsicType::kDeterminant:
-      return builder->Call(str.str(), "m2x2");
-    case IntrinsicType::kPack2x16snorm:
-    case IntrinsicType::kPack2x16unorm:
-      return builder->Call(str.str(), "f2");
-    case IntrinsicType::kPack4x8snorm:
-    case IntrinsicType::kPack4x8unorm:
-      return builder->Call(str.str(), "f4");
-    case IntrinsicType::kUnpack4x8snorm:
-    case IntrinsicType::kUnpack4x8unorm:
-    case IntrinsicType::kUnpack2x16snorm:
-    case IntrinsicType::kUnpack2x16unorm:
-      return builder->Call(str.str(), "u1");
-    case IntrinsicType::kWorkgroupBarrier:
-      return builder->Call(str.str());
-    case IntrinsicType::kTranspose:
-      return builder->Call(str.str(), "m3x2");
-    default:
-      break;
-  }
-  return nullptr;
-}
-
-using MslIntrinsicTest = TestParamHelper<IntrinsicData>;
-TEST_P(MslIntrinsicTest, Emit) {
-  auto param = GetParam();
-
-  Global("f2", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  Global("f3", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-  Global("f4", ty.vec4<f32>(), ast::StorageClass::kPrivate);
-  Global("u1", ty.u32(), ast::StorageClass::kPrivate);
-  Global("u2", ty.vec2<u32>(), ast::StorageClass::kPrivate);
-  Global("i2", ty.vec2<i32>(), ast::StorageClass::kPrivate);
-  Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
-  Global("m2x2", ty.mat2x2<f32>(), ast::StorageClass::kPrivate);
-  Global("m3x2", ty.mat3x2<f32>(), ast::StorageClass::kPrivate);
-
-  auto* call = GenerateCall(param.intrinsic, param.type, this);
-  ASSERT_NE(nullptr, call) << "Unhandled intrinsic";
-  Func("func", {}, ty.void_(), {Ignore(call)},
-       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
-
-  GeneratorImpl& gen = Build();
-
-  auto* sem = program->Sem().Get(call);
-  ASSERT_NE(sem, nullptr);
-  auto* target = sem->Target();
-  ASSERT_NE(target, nullptr);
-  auto* intrinsic = target->As<sem::Intrinsic>();
-  ASSERT_NE(intrinsic, nullptr);
-
-  EXPECT_EQ(gen.generate_builtin_name(intrinsic), param.msl_name);
-}
-INSTANTIATE_TEST_SUITE_P(
-    MslGeneratorImplTest,
-    MslIntrinsicTest,
-    testing::Values(
-        IntrinsicData{IntrinsicType::kAbs, ParamType::kF32, "fabs"},
-        IntrinsicData{IntrinsicType::kAbs, ParamType::kU32, "abs"},
-        IntrinsicData{IntrinsicType::kAcos, ParamType::kF32, "acos"},
-        IntrinsicData{IntrinsicType::kAll, ParamType::kBool, "all"},
-        IntrinsicData{IntrinsicType::kAny, ParamType::kBool, "any"},
-        IntrinsicData{IntrinsicType::kAsin, ParamType::kF32, "asin"},
-        IntrinsicData{IntrinsicType::kAtan, ParamType::kF32, "atan"},
-        IntrinsicData{IntrinsicType::kAtan2, ParamType::kF32, "atan2"},
-        IntrinsicData{IntrinsicType::kCeil, ParamType::kF32, "ceil"},
-        IntrinsicData{IntrinsicType::kClamp, ParamType::kF32, "clamp"},
-        IntrinsicData{IntrinsicType::kClamp, ParamType::kU32, "clamp"},
-        IntrinsicData{IntrinsicType::kCos, ParamType::kF32, "cos"},
-        IntrinsicData{IntrinsicType::kCosh, ParamType::kF32, "cosh"},
-        IntrinsicData{IntrinsicType::kCountOneBits, ParamType::kU32,
-                      "popcount"},
-        IntrinsicData{IntrinsicType::kCross, ParamType::kF32, "cross"},
-        IntrinsicData{IntrinsicType::kDeterminant, ParamType::kF32,
-                      "determinant"},
-        IntrinsicData{IntrinsicType::kDistance, ParamType::kF32, "distance"},
-        IntrinsicData{IntrinsicType::kDot, ParamType::kF32, "dot"},
-        IntrinsicData{IntrinsicType::kDpdx, ParamType::kF32, "dfdx"},
-        IntrinsicData{IntrinsicType::kDpdxCoarse, ParamType::kF32, "dfdx"},
-        IntrinsicData{IntrinsicType::kDpdxFine, ParamType::kF32, "dfdx"},
-        IntrinsicData{IntrinsicType::kDpdy, ParamType::kF32, "dfdy"},
-        IntrinsicData{IntrinsicType::kDpdyCoarse, ParamType::kF32, "dfdy"},
-        IntrinsicData{IntrinsicType::kDpdyFine, ParamType::kF32, "dfdy"},
-        IntrinsicData{IntrinsicType::kExp, ParamType::kF32, "exp"},
-        IntrinsicData{IntrinsicType::kExp2, ParamType::kF32, "exp2"},
-        IntrinsicData{IntrinsicType::kFaceForward, ParamType::kF32,
-                      "faceforward"},
-        IntrinsicData{IntrinsicType::kFloor, ParamType::kF32, "floor"},
-        IntrinsicData{IntrinsicType::kFma, ParamType::kF32, "fma"},
-        IntrinsicData{IntrinsicType::kFract, ParamType::kF32, "fract"},
-        IntrinsicData{IntrinsicType::kFwidth, ParamType::kF32, "fwidth"},
-        IntrinsicData{IntrinsicType::kFwidthCoarse, ParamType::kF32, "fwidth"},
-        IntrinsicData{IntrinsicType::kFwidthFine, ParamType::kF32, "fwidth"},
-        IntrinsicData{IntrinsicType::kInverseSqrt, ParamType::kF32, "rsqrt"},
-        IntrinsicData{IntrinsicType::kIsFinite, ParamType::kF32, "isfinite"},
-        IntrinsicData{IntrinsicType::kIsInf, ParamType::kF32, "isinf"},
-        IntrinsicData{IntrinsicType::kIsNan, ParamType::kF32, "isnan"},
-        IntrinsicData{IntrinsicType::kIsNormal, ParamType::kF32, "isnormal"},
-        IntrinsicData{IntrinsicType::kLdexp, ParamType::kF32, "ldexp"},
-        IntrinsicData{IntrinsicType::kLength, ParamType::kF32, "length"},
-        IntrinsicData{IntrinsicType::kLog, ParamType::kF32, "log"},
-        IntrinsicData{IntrinsicType::kLog2, ParamType::kF32, "log2"},
-        IntrinsicData{IntrinsicType::kMax, ParamType::kF32, "fmax"},
-        IntrinsicData{IntrinsicType::kMax, ParamType::kU32, "max"},
-        IntrinsicData{IntrinsicType::kMin, ParamType::kF32, "fmin"},
-        IntrinsicData{IntrinsicType::kMin, ParamType::kU32, "min"},
-        IntrinsicData{IntrinsicType::kNormalize, ParamType::kF32, "normalize"},
-        IntrinsicData{IntrinsicType::kPack4x8snorm, ParamType::kF32,
-                      "pack_float_to_snorm4x8"},
-        IntrinsicData{IntrinsicType::kPack4x8unorm, ParamType::kF32,
-                      "pack_float_to_unorm4x8"},
-        IntrinsicData{IntrinsicType::kPack2x16snorm, ParamType::kF32,
-                      "pack_float_to_snorm2x16"},
-        IntrinsicData{IntrinsicType::kPack2x16unorm, ParamType::kF32,
-                      "pack_float_to_unorm2x16"},
-        IntrinsicData{IntrinsicType::kPow, ParamType::kF32, "pow"},
-        IntrinsicData{IntrinsicType::kReflect, ParamType::kF32, "reflect"},
-        IntrinsicData{IntrinsicType::kReverseBits, ParamType::kU32,
-                      "reverse_bits"},
-        IntrinsicData{IntrinsicType::kRound, ParamType::kU32, "rint"},
-        IntrinsicData{IntrinsicType::kSelect, ParamType::kF32, "select"},
-        IntrinsicData{IntrinsicType::kSign, ParamType::kF32, "sign"},
-        IntrinsicData{IntrinsicType::kSin, ParamType::kF32, "sin"},
-        IntrinsicData{IntrinsicType::kSinh, ParamType::kF32, "sinh"},
-        IntrinsicData{IntrinsicType::kSmoothStep, ParamType::kF32,
-                      "smoothstep"},
-        IntrinsicData{IntrinsicType::kSqrt, ParamType::kF32, "sqrt"},
-        IntrinsicData{IntrinsicType::kStep, ParamType::kF32, "step"},
-        IntrinsicData{IntrinsicType::kTan, ParamType::kF32, "tan"},
-        IntrinsicData{IntrinsicType::kTanh, ParamType::kF32, "tanh"},
-        IntrinsicData{IntrinsicType::kTranspose, ParamType::kF32, "transpose"},
-        IntrinsicData{IntrinsicType::kTrunc, ParamType::kF32, "trunc"},
-        IntrinsicData{IntrinsicType::kUnpack4x8snorm, ParamType::kU32,
-                      "unpack_snorm4x8_to_float"},
-        IntrinsicData{IntrinsicType::kUnpack4x8unorm, ParamType::kU32,
-                      "unpack_unorm4x8_to_float"},
-        IntrinsicData{IntrinsicType::kUnpack2x16snorm, ParamType::kU32,
-                      "unpack_snorm2x16_to_float"},
-        IntrinsicData{IntrinsicType::kUnpack2x16unorm, ParamType::kU32,
-                      "unpack_unorm2x16_to_float"}));
-
-TEST_F(MslGeneratorImplTest, Intrinsic_Call) {
-  Global("param1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  Global("param2", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-
-  auto* call = Call("dot", "param1", "param2");
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = Build();
-
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "dot(param1, param2)");
-}
-
-TEST_F(MslGeneratorImplTest, StorageBarrier) {
-  auto* call = Call("storageBarrier");
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = Build();
-
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "threadgroup_barrier(mem_flags::mem_device)");
-}
-
-TEST_F(MslGeneratorImplTest, WorkgroupBarrier) {
-  auto* call = Call("workgroupBarrier");
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = Build();
-
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "threadgroup_barrier(mem_flags::mem_threadgroup)");
-}
-
-TEST_F(MslGeneratorImplTest, Degrees_Scalar) {
-  auto* val = Var("val", ty.f32());
-  auto* call = Call("degrees", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
-
-using namespace metal;
-
-float tint_degrees(float param_0) {
-  return param_0 * 57.295779513082322865;
-}
-
-kernel void test_function() {
-  float val = 0.0f;
-  float const tint_symbol = tint_degrees(val);
-  return;
-}
-
-)");
-}
-
-TEST_F(MslGeneratorImplTest, Degrees_Vector) {
-  auto* val = Var("val", ty.vec3<f32>());
-  auto* call = Call("degrees", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
-
-using namespace metal;
-
-float3 tint_degrees(float3 param_0) {
-  return param_0 * 57.295779513082322865;
-}
-
-kernel void test_function() {
-  float3 val = 0.0f;
-  float3 const tint_symbol = tint_degrees(val);
-  return;
-}
-
-)");
-}
-
-TEST_F(MslGeneratorImplTest, Radians_Scalar) {
-  auto* val = Var("val", ty.f32());
-  auto* call = Call("radians", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
-
-using namespace metal;
-
-float tint_radians(float param_0) {
-  return param_0 * 0.017453292519943295474;
-}
-
-kernel void test_function() {
-  float val = 0.0f;
-  float const tint_symbol = tint_radians(val);
-  return;
-}
-
-)");
-}
-
-TEST_F(MslGeneratorImplTest, Radians_Vector) {
-  auto* val = Var("val", ty.vec3<f32>());
-  auto* call = Call("radians", val);
-  WrapInFunction(val, call);
-
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
-
-using namespace metal;
-
-float3 tint_radians(float3 param_0) {
-  return param_0 * 0.017453292519943295474;
-}
-
-kernel void test_function() {
-  float3 val = 0.0f;
-  float3 const tint_symbol = tint_radians(val);
-  return;
-}
-
-)");
-}
-
-TEST_F(MslGeneratorImplTest, Pack2x16Float) {
-  auto* call = Call("pack2x16float", "p1");
-  Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = Build();
-
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "as_type<uint>(half2(p1))");
-}
-
-TEST_F(MslGeneratorImplTest, Unpack2x16Float) {
-  auto* call = Call("unpack2x16float", "p1");
-  Global("p1", ty.u32(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(call));
-
-  GeneratorImpl& gen = Build();
-
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-  EXPECT_EQ(out.str(), "float2(as_type<half2>(p1))");
-}
-
-TEST_F(MslGeneratorImplTest, DotI32) {
-  Global("v", ty.vec3<i32>(), ast::StorageClass::kPrivate);
-  WrapInFunction(CallStmt(Call("dot", "v", "v")));
-
-  GeneratorImpl& gen = SanitizeAndBuild();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
-
-using namespace metal;
-
-template<typename T>
-T tint_dot3(vec<T,3> a, vec<T,3> b) {
-  return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
-}
-kernel void test_function() {
-  thread int3 tint_symbol = 0;
-  tint_dot3(tint_symbol, tint_symbol);
-  return;
-}
-
-)");
-}
-
-TEST_F(MslGeneratorImplTest, Ignore) {
-  Func("f", {Param("a", ty.i32()), Param("b", ty.i32()), Param("c", ty.i32())},
-       ty.i32(), {Return(Mul(Add("a", "b"), "c"))});
-
-  Func("func", {}, ty.void_(), {CallStmt(Call("f", 1, 2, 3))},
-       {
-           Stage(ast::PipelineStage::kCompute),
-           WorkgroupSize(1),
-       });
-
-  GeneratorImpl& gen = Build();
-
-  ASSERT_TRUE(gen.Generate()) << gen.error();
-  EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
-
-using namespace metal;
-int f(int a, int b, int c) {
-  return as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) + as_type<uint>(b)))) * as_type<uint>(c)));
-}
-
-kernel void func() {
-  f(1, 2, 3);
-  return;
-}
-
-)");
-}
-
-}  // namespace
-}  // namespace msl
-}  // namespace writer
-}  // namespace tint
diff --git a/src/writer/msl/generator_impl_intrinsic_texture_test.cc b/src/writer/msl/generator_impl_intrinsic_texture_test.cc
deleted file mode 100644
index d3e298c..0000000
--- a/src/writer/msl/generator_impl_intrinsic_texture_test.cc
+++ /dev/null
@@ -1,305 +0,0 @@
-// Copyright 2020 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/ast/call_statement.h"
-#include "src/ast/intrinsic_texture_helper_test.h"
-#include "src/writer/msl/test_helper.h"
-
-namespace tint {
-namespace writer {
-namespace msl {
-namespace {
-
-std::string expected_texture_overload(
-    ast::intrinsic::test::ValidTextureOverload overload) {
-  using ValidTextureOverload = ast::intrinsic::test::ValidTextureOverload;
-  switch (overload) {
-    case ValidTextureOverload::kDimensions1d:
-    case ValidTextureOverload::kDimensionsStorageWO1d:
-      return R"(int(texture.get_width()))";
-    case ValidTextureOverload::kDimensions2d:
-    case ValidTextureOverload::kDimensions2dArray:
-    case ValidTextureOverload::kDimensionsCube:
-    case ValidTextureOverload::kDimensionsCubeArray:
-    case ValidTextureOverload::kDimensionsMultisampled2d:
-    case ValidTextureOverload::kDimensionsDepth2d:
-    case ValidTextureOverload::kDimensionsDepth2dArray:
-    case ValidTextureOverload::kDimensionsDepthCube:
-    case ValidTextureOverload::kDimensionsDepthCubeArray:
-    case ValidTextureOverload::kDimensionsDepthMultisampled2d:
-    case ValidTextureOverload::kDimensionsStorageWO2d:
-    case ValidTextureOverload::kDimensionsStorageWO2dArray:
-      return R"(int2(texture.get_width(), texture.get_height()))";
-    case ValidTextureOverload::kDimensions3d:
-    case ValidTextureOverload::kDimensionsStorageWO3d:
-      return R"(int3(texture.get_width(), texture.get_height(), texture.get_depth()))";
-    case ValidTextureOverload::kDimensions2dLevel:
-    case ValidTextureOverload::kDimensionsCubeLevel:
-    case ValidTextureOverload::kDimensionsCubeArrayLevel:
-    case ValidTextureOverload::kDimensions2dArrayLevel:
-    case ValidTextureOverload::kDimensionsDepth2dLevel:
-    case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
-    case ValidTextureOverload::kDimensionsDepthCubeLevel:
-    case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
-      return R"(int2(texture.get_width(1), texture.get_height(1)))";
-    case ValidTextureOverload::kDimensions3dLevel:
-      return R"(int3(texture.get_width(1), texture.get_height(1), texture.get_depth(1)))";
-    case ValidTextureOverload::kGather2dF32:
-      return R"(texture.gather(sampler, float2(1.0f, 2.0f), int2(0), component::x))";
-    case ValidTextureOverload::kGather2dOffsetF32:
-      return R"(texture.gather(sampler, float2(1.0f, 2.0f), int2(3, 4), component::x))";
-    case ValidTextureOverload::kGather2dArrayF32:
-      return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3, int2(0), component::x))";
-    case ValidTextureOverload::kGather2dArrayOffsetF32:
-      return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3, int2(4, 5), component::x))";
-    case ValidTextureOverload::kGatherCubeF32:
-      return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), component::x))";
-    case ValidTextureOverload::kGatherCubeArrayF32:
-      return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), 4, component::x))";
-    case ValidTextureOverload::kGatherDepth2dF32:
-      return R"(texture.gather(sampler, float2(1.0f, 2.0f)))";
-    case ValidTextureOverload::kGatherDepth2dOffsetF32:
-      return R"(texture.gather(sampler, float2(1.0f, 2.0f), int2(3, 4)))";
-    case ValidTextureOverload::kGatherDepth2dArrayF32:
-      return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3))";
-    case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
-      return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3, int2(4, 5)))";
-    case ValidTextureOverload::kGatherDepthCubeF32:
-      return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f)))";
-    case ValidTextureOverload::kGatherDepthCubeArrayF32:
-      return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), 4))";
-    case ValidTextureOverload::kGatherCompareDepth2dF32:
-      return R"(texture.gather_compare(sampler, float2(1.0f, 2.0f), 3.0f))";
-    case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
-      return R"(texture.gather_compare(sampler, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
-    case ValidTextureOverload::kGatherCompareDepth2dArrayF32:
-      return R"(texture.gather_compare(sampler, float2(1.0f, 2.0f), 3, 4.0f))";
-    case ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32:
-      return R"(texture.gather_compare(sampler, float2(1.0f, 2.0f), 3, 4.0f, int2(5, 6)))";
-    case ValidTextureOverload::kGatherCompareDepthCubeF32:
-      return R"(texture.gather_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
-    case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
-      return R"(texture.gather_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
-    case ValidTextureOverload::kNumLayers2dArray:
-    case ValidTextureOverload::kNumLayersCubeArray:
-    case ValidTextureOverload::kNumLayersDepth2dArray:
-    case ValidTextureOverload::kNumLayersDepthCubeArray:
-    case ValidTextureOverload::kNumLayersStorageWO2dArray:
-      return R"(int(texture.get_array_size()))";
-    case ValidTextureOverload::kNumLevels2d:
-    case ValidTextureOverload::kNumLevels2dArray:
-    case ValidTextureOverload::kNumLevels3d:
-    case ValidTextureOverload::kNumLevelsCube:
-    case ValidTextureOverload::kNumLevelsCubeArray:
-    case ValidTextureOverload::kNumLevelsDepth2d:
-    case ValidTextureOverload::kNumLevelsDepth2dArray:
-    case ValidTextureOverload::kNumLevelsDepthCube:
-    case ValidTextureOverload::kNumLevelsDepthCubeArray:
-      return R"(int(texture.get_num_mip_levels()))";
-    case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
-    case ValidTextureOverload::kNumSamplesMultisampled2d:
-      return R"(int(texture.get_num_samples()))";
-    case ValidTextureOverload::kSample1dF32:
-      return R"(texture.sample(sampler, 1.0f))";
-    case ValidTextureOverload::kSample2dF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f)))";
-    case ValidTextureOverload::kSample2dOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), int2(3, 4)))";
-    case ValidTextureOverload::kSample2dArrayF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3))";
-    case ValidTextureOverload::kSample2dArrayOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, int2(4, 5)))";
-    case ValidTextureOverload::kSample3dF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f)))";
-    case ValidTextureOverload::kSample3dOffsetF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), int3(4, 5, 6)))";
-    case ValidTextureOverload::kSampleCubeF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f)))";
-    case ValidTextureOverload::kSampleCubeArrayF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4))";
-    case ValidTextureOverload::kSampleDepth2dF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f)))";
-    case ValidTextureOverload::kSampleDepth2dOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), int2(3, 4)))";
-    case ValidTextureOverload::kSampleDepth2dArrayF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3))";
-    case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, int2(4, 5)))";
-    case ValidTextureOverload::kSampleDepthCubeF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f)))";
-    case ValidTextureOverload::kSampleDepthCubeArrayF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4))";
-    case ValidTextureOverload::kSampleBias2dF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), bias(3.0f)))";
-    case ValidTextureOverload::kSampleBias2dOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), bias(3.0f), int2(4, 5)))";
-    case ValidTextureOverload::kSampleBias2dArrayF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 4, bias(3.0f)))";
-    case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, bias(4.0f), int2(5, 6)))";
-    case ValidTextureOverload::kSampleBias3dF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), bias(4.0f)))";
-    case ValidTextureOverload::kSampleBias3dOffsetF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), bias(4.0f), int3(5, 6, 7)))";
-    case ValidTextureOverload::kSampleBiasCubeF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), bias(4.0f)))";
-    case ValidTextureOverload::kSampleBiasCubeArrayF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 3, bias(4.0f)))";
-    case ValidTextureOverload::kSampleLevel2dF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3.0f)))";
-    case ValidTextureOverload::kSampleLevel2dOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3.0f), int2(4, 5)))";
-    case ValidTextureOverload::kSampleLevel2dArrayF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, level(4.0f)))";
-    case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, level(4.0f), int2(5, 6)))";
-    case ValidTextureOverload::kSampleLevel3dF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), level(4.0f)))";
-    case ValidTextureOverload::kSampleLevel3dOffsetF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), level(4.0f), int3(5, 6, 7)))";
-    case ValidTextureOverload::kSampleLevelCubeF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), level(4.0f)))";
-    case ValidTextureOverload::kSampleLevelCubeArrayF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4, level(5.0f)))";
-    case ValidTextureOverload::kSampleLevelDepth2dF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3)))";
-    case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3), int2(4, 5)))";
-    case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, level(4)))";
-    case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, level(4), int2(5, 6)))";
-    case ValidTextureOverload::kSampleLevelDepthCubeF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), level(4)))";
-    case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4, level(5)))";
-    case ValidTextureOverload::kSampleGrad2dF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), gradient2d(float2(3.0f, 4.0f), float2(5.0f, 6.0f))))";
-    case ValidTextureOverload::kSampleGrad2dOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), gradient2d(float2(3.0f, 4.0f), float2(5.0f, 6.0f)), int2(7, 7)))";
-    case ValidTextureOverload::kSampleGrad2dArrayF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f))))";
-    case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
-      return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f)), int2(6, 7)))";
-    case ValidTextureOverload::kSampleGrad3dF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), gradient3d(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))))";
-    case ValidTextureOverload::kSampleGrad3dOffsetF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), gradient3d(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f)), int3(0, 1, 2)))";
-    case ValidTextureOverload::kSampleGradCubeF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), gradientcube(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))))";
-    case ValidTextureOverload::kSampleGradCubeArrayF32:
-      return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4, gradientcube(float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f))))";
-    case ValidTextureOverload::kSampleCompareDepth2dF32:
-      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f))";
-    case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
-      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
-    case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
-      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f))";
-    case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
-      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f, int2(5, 6)))";
-    case ValidTextureOverload::kSampleCompareDepthCubeF32:
-      return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
-    case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
-      return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
-      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f))";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
-      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
-      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f))";
-    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
-      return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f, int2(5, 6)))";
-    case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
-      return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
-    case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
-      return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
-    case ValidTextureOverload::kLoad1dLevelF32:
-      return R"(texture.read(uint(1), 3))";
-    case ValidTextureOverload::kLoad1dLevelU32:
-      return R"(texture.read(uint(1), 3))";
-    case ValidTextureOverload::kLoad1dLevelI32:
-      return R"(texture.read(uint(1), 3))";
-    case ValidTextureOverload::kLoad2dLevelF32:
-      return R"(texture.read(uint2(int2(1, 2)), 3))";
-    case ValidTextureOverload::kLoad2dLevelU32:
-      return R"(texture.read(uint2(int2(1, 2)), 3))";
-    case ValidTextureOverload::kLoad2dLevelI32:
-      return R"(texture.read(uint2(int2(1, 2)), 3))";
-    case ValidTextureOverload::kLoad2dArrayLevelF32:
-      return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
-    case ValidTextureOverload::kLoad2dArrayLevelU32:
-      return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
-    case ValidTextureOverload::kLoad2dArrayLevelI32:
-      return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
-    case ValidTextureOverload::kLoad3dLevelF32:
-      return R"(texture.read(uint3(int3(1, 2, 3)), 4))";
-    case ValidTextureOverload::kLoad3dLevelU32:
-      return R"(texture.read(uint3(int3(1, 2, 3)), 4))";
-    case ValidTextureOverload::kLoad3dLevelI32:
-      return R"(texture.read(uint3(int3(1, 2, 3)), 4))";
-    case ValidTextureOverload::kLoadMultisampled2dF32:
-      return R"(texture.read(uint2(int2(1, 2)), 3))";
-    case ValidTextureOverload::kLoadMultisampled2dU32:
-      return R"(texture.read(uint2(int2(1, 2)), 3))";
-    case ValidTextureOverload::kLoadMultisampled2dI32:
-      return R"(texture.read(uint2(int2(1, 2)), 3))";
-    case ValidTextureOverload::kLoadDepth2dLevelF32:
-    case ValidTextureOverload::kLoadDepthMultisampled2dF32:
-      return R"(texture.read(uint2(int2(1, 2)), 3))";
-    case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
-      return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
-    case ValidTextureOverload::kStoreWO1dRgba32float:
-      return R"(texture.write(float4(2.0f, 3.0f, 4.0f, 5.0f), uint(1)))";
-    case ValidTextureOverload::kStoreWO2dRgba32float:
-      return R"(texture.write(float4(3.0f, 4.0f, 5.0f, 6.0f), uint2(int2(1, 2))))";
-    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
-      return R"(texture.write(float4(4.0f, 5.0f, 6.0f, 7.0f), uint2(int2(1, 2)), 3))";
-    case ValidTextureOverload::kStoreWO3dRgba32float:
-      return R"(texture.write(float4(4.0f, 5.0f, 6.0f, 7.0f), uint3(int3(1, 2, 3))))";
-  }
-  return "<unmatched texture overload>";
-}  // NOLINT - Ignore the length of this function
-
-class MslGeneratorIntrinsicTextureTest
-    : public TestParamHelper<ast::intrinsic::test::TextureOverloadCase> {};
-
-TEST_P(MslGeneratorIntrinsicTextureTest, Call) {
-  auto param = GetParam();
-
-  param.BuildTextureVariable(this);
-  param.BuildSamplerVariable(this);
-
-  auto* call = Call(Expr(param.function), param.args(this));
-  auto* stmt = CallStmt(call);
-
-  Func("main", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
-
-  GeneratorImpl& gen = Build();
-
-  std::stringstream out;
-  ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error();
-
-  auto expected = expected_texture_overload(param.overload);
-  EXPECT_EQ(expected, out.str());
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    MslGeneratorIntrinsicTextureTest,
-    MslGeneratorIntrinsicTextureTest,
-    testing::ValuesIn(ast::intrinsic::test::TextureOverloadCase::ValidCases()));
-
-}  // namespace
-}  // namespace msl
-}  // namespace writer
-}  // namespace tint
diff --git a/src/writer/spirv/builder.cc b/src/writer/spirv/builder.cc
index a40e394..19707c0 100644
--- a/src/writer/spirv/builder.cc
+++ b/src/writer/spirv/builder.cc
@@ -25,11 +25,11 @@
 #include "src/ast/traverse_expressions.h"
 #include "src/sem/array.h"
 #include "src/sem/atomic_type.h"
+#include "src/sem/builtin.h"
 #include "src/sem/call.h"
 #include "src/sem/depth_multisampled_texture_type.h"
 #include "src/sem/depth_texture_type.h"
 #include "src/sem/function.h"
-#include "src/sem/intrinsic.h"
 #include "src/sem/member_accessor_expression.h"
 #include "src/sem/multisampled_texture_type.h"
 #include "src/sem/reference_type.h"
@@ -62,7 +62,7 @@
 namespace spirv {
 namespace {
 
-using IntrinsicType = sem::IntrinsicType;
+using BuiltinType = sem::BuiltinType;
 
 const char kGLSLstd450[] = "GLSL.std.450";
 
@@ -109,131 +109,131 @@
   return type->As<sem::Matrix>();
 }
 
-uint32_t intrinsic_to_glsl_method(const sem::Intrinsic* intrinsic) {
-  switch (intrinsic->Type()) {
-    case IntrinsicType::kAcos:
+uint32_t builtin_to_glsl_method(const sem::Builtin* builtin) {
+  switch (builtin->Type()) {
+    case BuiltinType::kAcos:
       return GLSLstd450Acos;
-    case IntrinsicType::kAsin:
+    case BuiltinType::kAsin:
       return GLSLstd450Asin;
-    case IntrinsicType::kAtan:
+    case BuiltinType::kAtan:
       return GLSLstd450Atan;
-    case IntrinsicType::kAtan2:
+    case BuiltinType::kAtan2:
       return GLSLstd450Atan2;
-    case IntrinsicType::kCeil:
+    case BuiltinType::kCeil:
       return GLSLstd450Ceil;
-    case IntrinsicType::kClamp:
-      if (intrinsic->ReturnType()->is_float_scalar_or_vector()) {
+    case BuiltinType::kClamp:
+      if (builtin->ReturnType()->is_float_scalar_or_vector()) {
         return GLSLstd450NClamp;
-      } else if (intrinsic->ReturnType()->is_unsigned_scalar_or_vector()) {
+      } else if (builtin->ReturnType()->is_unsigned_scalar_or_vector()) {
         return GLSLstd450UClamp;
       } else {
         return GLSLstd450SClamp;
       }
-    case IntrinsicType::kCos:
+    case BuiltinType::kCos:
       return GLSLstd450Cos;
-    case IntrinsicType::kCosh:
+    case BuiltinType::kCosh:
       return GLSLstd450Cosh;
-    case IntrinsicType::kCross:
+    case BuiltinType::kCross:
       return GLSLstd450Cross;
-    case IntrinsicType::kDegrees:
+    case BuiltinType::kDegrees:
       return GLSLstd450Degrees;
-    case IntrinsicType::kDeterminant:
+    case BuiltinType::kDeterminant:
       return GLSLstd450Determinant;
-    case IntrinsicType::kDistance:
+    case BuiltinType::kDistance:
       return GLSLstd450Distance;
-    case IntrinsicType::kExp:
+    case BuiltinType::kExp:
       return GLSLstd450Exp;
-    case IntrinsicType::kExp2:
+    case BuiltinType::kExp2:
       return GLSLstd450Exp2;
-    case IntrinsicType::kFaceForward:
+    case BuiltinType::kFaceForward:
       return GLSLstd450FaceForward;
-    case IntrinsicType::kFloor:
+    case BuiltinType::kFloor:
       return GLSLstd450Floor;
-    case IntrinsicType::kFma:
+    case BuiltinType::kFma:
       return GLSLstd450Fma;
-    case IntrinsicType::kFract:
+    case BuiltinType::kFract:
       return GLSLstd450Fract;
-    case IntrinsicType::kFrexp:
+    case BuiltinType::kFrexp:
       return GLSLstd450FrexpStruct;
-    case IntrinsicType::kInverseSqrt:
+    case BuiltinType::kInverseSqrt:
       return GLSLstd450InverseSqrt;
-    case IntrinsicType::kLdexp:
+    case BuiltinType::kLdexp:
       return GLSLstd450Ldexp;
-    case IntrinsicType::kLength:
+    case BuiltinType::kLength:
       return GLSLstd450Length;
-    case IntrinsicType::kLog:
+    case BuiltinType::kLog:
       return GLSLstd450Log;
-    case IntrinsicType::kLog2:
+    case BuiltinType::kLog2:
       return GLSLstd450Log2;
-    case IntrinsicType::kMax:
-      if (intrinsic->ReturnType()->is_float_scalar_or_vector()) {
+    case BuiltinType::kMax:
+      if (builtin->ReturnType()->is_float_scalar_or_vector()) {
         return GLSLstd450NMax;
-      } else if (intrinsic->ReturnType()->is_unsigned_scalar_or_vector()) {
+      } else if (builtin->ReturnType()->is_unsigned_scalar_or_vector()) {
         return GLSLstd450UMax;
       } else {
         return GLSLstd450SMax;
       }
-    case IntrinsicType::kMin:
-      if (intrinsic->ReturnType()->is_float_scalar_or_vector()) {
+    case BuiltinType::kMin:
+      if (builtin->ReturnType()->is_float_scalar_or_vector()) {
         return GLSLstd450NMin;
-      } else if (intrinsic->ReturnType()->is_unsigned_scalar_or_vector()) {
+      } else if (builtin->ReturnType()->is_unsigned_scalar_or_vector()) {
         return GLSLstd450UMin;
       } else {
         return GLSLstd450SMin;
       }
-    case IntrinsicType::kMix:
+    case BuiltinType::kMix:
       return GLSLstd450FMix;
-    case IntrinsicType::kModf:
+    case BuiltinType::kModf:
       return GLSLstd450ModfStruct;
-    case IntrinsicType::kNormalize:
+    case BuiltinType::kNormalize:
       return GLSLstd450Normalize;
-    case IntrinsicType::kPack4x8snorm:
+    case BuiltinType::kPack4x8snorm:
       return GLSLstd450PackSnorm4x8;
-    case IntrinsicType::kPack4x8unorm:
+    case BuiltinType::kPack4x8unorm:
       return GLSLstd450PackUnorm4x8;
-    case IntrinsicType::kPack2x16snorm:
+    case BuiltinType::kPack2x16snorm:
       return GLSLstd450PackSnorm2x16;
-    case IntrinsicType::kPack2x16unorm:
+    case BuiltinType::kPack2x16unorm:
       return GLSLstd450PackUnorm2x16;
-    case IntrinsicType::kPack2x16float:
+    case BuiltinType::kPack2x16float:
       return GLSLstd450PackHalf2x16;
-    case IntrinsicType::kPow:
+    case BuiltinType::kPow:
       return GLSLstd450Pow;
-    case IntrinsicType::kRadians:
+    case BuiltinType::kRadians:
       return GLSLstd450Radians;
-    case IntrinsicType::kReflect:
+    case BuiltinType::kReflect:
       return GLSLstd450Reflect;
-    case IntrinsicType::kRefract:
+    case BuiltinType::kRefract:
       return GLSLstd450Refract;
-    case IntrinsicType::kRound:
+    case BuiltinType::kRound:
       return GLSLstd450RoundEven;
-    case IntrinsicType::kSign:
+    case BuiltinType::kSign:
       return GLSLstd450FSign;
-    case IntrinsicType::kSin:
+    case BuiltinType::kSin:
       return GLSLstd450Sin;
-    case IntrinsicType::kSinh:
+    case BuiltinType::kSinh:
       return GLSLstd450Sinh;
-    case IntrinsicType::kSmoothStep:
+    case BuiltinType::kSmoothStep:
       return GLSLstd450SmoothStep;
-    case IntrinsicType::kSqrt:
+    case BuiltinType::kSqrt:
       return GLSLstd450Sqrt;
-    case IntrinsicType::kStep:
+    case BuiltinType::kStep:
       return GLSLstd450Step;
-    case IntrinsicType::kTan:
+    case BuiltinType::kTan:
       return GLSLstd450Tan;
-    case IntrinsicType::kTanh:
+    case BuiltinType::kTanh:
       return GLSLstd450Tanh;
-    case IntrinsicType::kTrunc:
+    case BuiltinType::kTrunc:
       return GLSLstd450Trunc;
-    case IntrinsicType::kUnpack4x8snorm:
+    case BuiltinType::kUnpack4x8snorm:
       return GLSLstd450UnpackSnorm4x8;
-    case IntrinsicType::kUnpack4x8unorm:
+    case BuiltinType::kUnpack4x8unorm:
       return GLSLstd450UnpackUnorm4x8;
-    case IntrinsicType::kUnpack2x16snorm:
+    case BuiltinType::kUnpack2x16snorm:
       return GLSLstd450UnpackSnorm2x16;
-    case IntrinsicType::kUnpack2x16unorm:
+    case BuiltinType::kUnpack2x16unorm:
       return GLSLstd450UnpackUnorm2x16;
-    case IntrinsicType::kUnpack2x16float:
+    case BuiltinType::kUnpack2x16float:
       return GLSLstd450UnpackHalf2x16;
     default:
       break;
@@ -2213,8 +2213,8 @@
   if (auto* func = target->As<sem::Function>()) {
     return GenerateFunctionCall(call, func);
   }
-  if (auto* intrinsic = target->As<sem::Intrinsic>()) {
-    return GenerateIntrinsicCall(call, intrinsic);
+  if (auto* builtin = target->As<sem::Builtin>()) {
+    return GenerateBuiltinCall(call, builtin);
   }
   if (target->IsAnyOf<sem::TypeConversion, sem::TypeConstructor>()) {
     return GenerateTypeConstructorOrConversion(call, nullptr);
@@ -2264,42 +2264,42 @@
   return result_id;
 }
 
-uint32_t Builder::GenerateIntrinsicCall(const sem::Call* call,
-                                        const sem::Intrinsic* intrinsic) {
+uint32_t Builder::GenerateBuiltinCall(const sem::Call* call,
+                                      const sem::Builtin* builtin) {
   auto result = result_op();
   auto result_id = result.to_i();
 
-  auto result_type_id = GenerateTypeIfNeeded(intrinsic->ReturnType());
+  auto result_type_id = GenerateTypeIfNeeded(builtin->ReturnType());
   if (result_type_id == 0) {
     return 0;
   }
 
-  if (intrinsic->IsFineDerivative() || intrinsic->IsCoarseDerivative()) {
+  if (builtin->IsFineDerivative() || builtin->IsCoarseDerivative()) {
     push_capability(SpvCapabilityDerivativeControl);
   }
 
-  if (intrinsic->IsImageQuery()) {
+  if (builtin->IsImageQuery()) {
     push_capability(SpvCapabilityImageQuery);
   }
 
-  if (intrinsic->IsTexture()) {
-    if (!GenerateTextureIntrinsic(call, intrinsic, Operand::Int(result_type_id),
-                                  result)) {
+  if (builtin->IsTexture()) {
+    if (!GenerateTextureBuiltin(call, builtin, Operand::Int(result_type_id),
+                                result)) {
       return 0;
     }
     return result_id;
   }
 
-  if (intrinsic->IsBarrier()) {
-    if (!GenerateControlBarrierIntrinsic(intrinsic)) {
+  if (builtin->IsBarrier()) {
+    if (!GenerateControlBarrierBuiltin(builtin)) {
       return 0;
     }
     return result_id;
   }
 
-  if (intrinsic->IsAtomic()) {
-    if (!GenerateAtomicIntrinsic(call, intrinsic, Operand::Int(result_type_id),
-                                 result)) {
+  if (builtin->IsAtomic()) {
+    if (!GenerateAtomicBuiltin(call, builtin, Operand::Int(result_type_id),
+                               result)) {
       return 0;
     }
     return result_id;
@@ -2310,7 +2310,7 @@
   auto get_arg_as_value_id = [&](size_t i,
                                  bool generate_load = true) -> uint32_t {
     auto* arg = call->Arguments()[i];
-    auto* param = intrinsic->Parameters()[i];
+    auto* param = builtin->Parameters()[i];
     auto val_id = GenerateExpression(arg->Declaration());
     if (val_id == 0) {
       return 0;
@@ -2334,22 +2334,22 @@
     op = spv::Op::OpExtInst;
   };
 
-  switch (intrinsic->Type()) {
-    case IntrinsicType::kAny:
-      if (intrinsic->Parameters()[0]->Type()->Is<sem::Bool>()) {
+  switch (builtin->Type()) {
+    case BuiltinType::kAny:
+      if (builtin->Parameters()[0]->Type()->Is<sem::Bool>()) {
         // any(v: bool) just resolves to v.
         return get_arg_as_value_id(0);
       }
       op = spv::Op::OpAny;
       break;
-    case IntrinsicType::kAll:
-      if (intrinsic->Parameters()[0]->Type()->Is<sem::Bool>()) {
+    case BuiltinType::kAll:
+      if (builtin->Parameters()[0]->Type()->Is<sem::Bool>()) {
         // all(v: bool) just resolves to v.
         return get_arg_as_value_id(0);
       }
       op = spv::Op::OpAll;
       break;
-    case IntrinsicType::kArrayLength: {
+    case BuiltinType::kArrayLength: {
       auto* address_of =
           call->Arguments()[0]->Declaration()->As<ast::UnaryOpExpression>();
       if (!address_of || address_of->op != ast::UnaryOp::kAddressOf) {
@@ -2388,12 +2388,12 @@
       }
       return result_id;
     }
-    case IntrinsicType::kCountOneBits:
+    case BuiltinType::kCountOneBits:
       op = spv::Op::OpBitCount;
       break;
-    case IntrinsicType::kDot: {
+    case BuiltinType::kDot: {
       op = spv::Op::OpDot;
-      auto* vec_ty = intrinsic->Parameters()[0]->Type()->As<sem::Vector>();
+      auto* vec_ty = builtin->Parameters()[0]->Type()->As<sem::Vector>();
       if (vec_ty->type()->is_integer_scalar()) {
         // TODO(crbug.com/tint/1267): OpDot requires floating-point types, but
         // WGSL also supports integer types. SPV_KHR_integer_dot_product adds
@@ -2433,40 +2433,40 @@
       }
       break;
     }
-    case IntrinsicType::kDpdx:
+    case BuiltinType::kDpdx:
       op = spv::Op::OpDPdx;
       break;
-    case IntrinsicType::kDpdxCoarse:
+    case BuiltinType::kDpdxCoarse:
       op = spv::Op::OpDPdxCoarse;
       break;
-    case IntrinsicType::kDpdxFine:
+    case BuiltinType::kDpdxFine:
       op = spv::Op::OpDPdxFine;
       break;
-    case IntrinsicType::kDpdy:
+    case BuiltinType::kDpdy:
       op = spv::Op::OpDPdy;
       break;
-    case IntrinsicType::kDpdyCoarse:
+    case BuiltinType::kDpdyCoarse:
       op = spv::Op::OpDPdyCoarse;
       break;
-    case IntrinsicType::kDpdyFine:
+    case BuiltinType::kDpdyFine:
       op = spv::Op::OpDPdyFine;
       break;
-    case IntrinsicType::kFwidth:
+    case BuiltinType::kFwidth:
       op = spv::Op::OpFwidth;
       break;
-    case IntrinsicType::kFwidthCoarse:
+    case BuiltinType::kFwidthCoarse:
       op = spv::Op::OpFwidthCoarse;
       break;
-    case IntrinsicType::kFwidthFine:
+    case BuiltinType::kFwidthFine:
       op = spv::Op::OpFwidthFine;
       break;
-    case IntrinsicType::kIsInf:
+    case BuiltinType::kIsInf:
       op = spv::Op::OpIsInf;
       break;
-    case IntrinsicType::kIsNan:
+    case BuiltinType::kIsNan:
       op = spv::Op::OpIsNan;
       break;
-    case IntrinsicType::kIsFinite: {
+    case BuiltinType::kIsFinite: {
       // Implemented as:   not(IsInf or IsNan)
       auto val_id = get_arg_as_value_id(0);
       if (!val_id) {
@@ -2492,7 +2492,7 @@
       }
       return 0;
     }
-    case IntrinsicType::kIsNormal: {
+    case BuiltinType::kIsNormal: {
       // A normal number is finite, non-zero, and not subnormal.
       // Its exponent is neither of the extreme possible values.
       // Implemented as:
@@ -2520,7 +2520,7 @@
           GenerateConstantIfNeeded(ScalarConstant::U32(kMinNormalExponent));
       auto max_exponent_id =
           GenerateConstantIfNeeded(ScalarConstant::U32(kMaxNormalExponent));
-      if (auto* fvec_ty = intrinsic->ReturnType()->As<sem::Vector>()) {
+      if (auto* fvec_ty = builtin->ReturnType()->As<sem::Vector>()) {
         // In the vector case, update the unsigned type to a vector type of the
         // same size, and create vector constants by replicating the scalars.
         // I expect backend compilers to fold these into unique constants, so
@@ -2570,7 +2570,7 @@
       }
       return 0;
     }
-    case IntrinsicType::kMix: {
+    case BuiltinType::kMix: {
       auto std450 = Operand::Int(GetGLSLstd450Import());
 
       auto a_id = get_arg_as_value_id(0);
@@ -2582,10 +2582,9 @@
 
       // If the interpolant is scalar but the objects are vectors, we need to
       // splat the interpolant into a vector of the same size.
-      auto* result_vector_type = intrinsic->ReturnType()->As<sem::Vector>();
-      if (result_vector_type &&
-          intrinsic->Parameters()[2]->Type()->is_scalar()) {
-        f_id = GenerateSplat(f_id, intrinsic->Parameters()[0]->Type());
+      auto* result_vector_type = builtin->ReturnType()->As<sem::Vector>();
+      if (result_vector_type && builtin->Parameters()[2]->Type()->is_scalar()) {
+        f_id = GenerateSplat(f_id, builtin->Parameters()[0]->Type());
         if (f_id == 0) {
           return 0;
         }
@@ -2599,10 +2598,10 @@
       }
       return result_id;
     }
-    case IntrinsicType::kReverseBits:
+    case BuiltinType::kReverseBits:
       op = spv::Op::OpBitReverse;
       break;
-    case IntrinsicType::kSelect: {
+    case BuiltinType::kSelect: {
       // Note: Argument order is different in WGSL and SPIR-V
       auto cond_id = get_arg_as_value_id(2);
       auto true_id = get_arg_as_value_id(1);
@@ -2614,9 +2613,8 @@
       // If the condition is scalar but the objects are vectors, we need to
       // splat the condition into a vector of the same size.
       // TODO(jrprice): If we're targeting SPIR-V 1.4, we don't need to do this.
-      auto* result_vector_type = intrinsic->ReturnType()->As<sem::Vector>();
-      if (result_vector_type &&
-          intrinsic->Parameters()[2]->Type()->is_scalar()) {
+      auto* result_vector_type = builtin->ReturnType()->As<sem::Vector>();
+      if (result_vector_type && builtin->Parameters()[2]->Type()->is_scalar()) {
         auto* bool_vec_ty = builder_.create<sem::Vector>(
             builder_.create<sem::Bool>(), result_vector_type->Width());
         if (!GenerateTypeIfNeeded(bool_vec_ty)) {
@@ -2636,25 +2634,25 @@
       }
       return result_id;
     }
-    case IntrinsicType::kTranspose:
+    case BuiltinType::kTranspose:
       op = spv::Op::OpTranspose;
       break;
-    case IntrinsicType::kAbs:
-      if (intrinsic->ReturnType()->is_unsigned_scalar_or_vector()) {
+    case BuiltinType::kAbs:
+      if (builtin->ReturnType()->is_unsigned_scalar_or_vector()) {
         // abs() only operates on *signed* integers.
         // This is a no-op for unsigned integers.
         return get_arg_as_value_id(0);
       }
-      if (intrinsic->ReturnType()->is_float_scalar_or_vector()) {
+      if (builtin->ReturnType()->is_float_scalar_or_vector()) {
         glsl_std450(GLSLstd450FAbs);
       } else {
         glsl_std450(GLSLstd450SAbs);
       }
       break;
     default: {
-      auto inst_id = intrinsic_to_glsl_method(intrinsic);
+      auto inst_id = builtin_to_glsl_method(builtin);
       if (inst_id == 0) {
-        error_ = "unknown method " + std::string(intrinsic->str());
+        error_ = "unknown method " + std::string(builtin->str());
         return 0;
       }
       glsl_std450(inst_id);
@@ -2663,8 +2661,7 @@
   }
 
   if (op == spv::Op::OpNop) {
-    error_ =
-        "unable to determine operator for: " + std::string(intrinsic->str());
+    error_ = "unable to determine operator for: " + std::string(builtin->str());
     return 0;
   }
 
@@ -2683,13 +2680,13 @@
   return result_id;
 }
 
-bool Builder::GenerateTextureIntrinsic(const sem::Call* call,
-                                       const sem::Intrinsic* intrinsic,
-                                       Operand result_type,
-                                       Operand result_id) {
+bool Builder::GenerateTextureBuiltin(const sem::Call* call,
+                                     const sem::Builtin* builtin,
+                                     Operand result_type,
+                                     Operand result_id) {
   using Usage = sem::ParameterUsage;
 
-  auto& signature = intrinsic->Signature();
+  auto& signature = builtin->Signature();
   auto& arguments = call->Arguments();
 
   // Generates the given expression, returning the operand ID
@@ -2723,7 +2720,7 @@
 
   auto op = spv::Op::OpNop;
 
-  // Custom function to call after the texture-intrinsic op has been generated.
+  // Custom function to call after the texture-builtin op has been generated.
   std::function<bool()> post_emission = [] { return true; };
 
   // Populate the spirv_params with common parameters
@@ -2848,8 +2845,8 @@
     return append_coords_to_spirv_params();
   };
 
-  switch (intrinsic->Type()) {
-    case IntrinsicType::kTextureDimensions: {
+  switch (builtin->Type()) {
+    case BuiltinType::kTextureDimensions: {
       // Number of returned elements from OpImageQuerySize[Lod] may not match
       // those of textureDimensions().
       // This might be due to an extra vector scalar describing the number of
@@ -2896,7 +2893,7 @@
       }
       break;
     }
-    case IntrinsicType::kTextureNumLayers: {
+    case BuiltinType::kTextureNumLayers: {
       uint32_t spirv_dims = 0;
       switch (texture_type->dim()) {
         default:
@@ -2928,19 +2925,19 @@
       }
       break;
     }
-    case IntrinsicType::kTextureNumLevels: {
+    case BuiltinType::kTextureNumLevels: {
       op = spv::Op::OpImageQueryLevels;
       append_result_type_and_id_to_spirv_params();
       spirv_params.emplace_back(gen_arg(Usage::kTexture));
       break;
     }
-    case IntrinsicType::kTextureNumSamples: {
+    case BuiltinType::kTextureNumSamples: {
       op = spv::Op::OpImageQuerySamples;
       append_result_type_and_id_to_spirv_params();
       spirv_params.emplace_back(gen_arg(Usage::kTexture));
       break;
     }
-    case IntrinsicType::kTextureLoad: {
+    case BuiltinType::kTextureLoad: {
       op = texture_type->Is<sem::StorageTexture>() ? spv::Op::OpImageRead
                                                    : spv::Op::OpImageFetch;
       append_result_type_and_id_to_spirv_params_for_read();
@@ -2961,7 +2958,7 @@
 
       break;
     }
-    case IntrinsicType::kTextureStore: {
+    case BuiltinType::kTextureStore: {
       op = spv::Op::OpImageWrite;
       spirv_params.emplace_back(gen_arg(Usage::kTexture));
       if (!append_coords_to_spirv_params()) {
@@ -2970,7 +2967,7 @@
       spirv_params.emplace_back(gen_arg(Usage::kValue));
       break;
     }
-    case IntrinsicType::kTextureGather: {
+    case BuiltinType::kTextureGather: {
       op = spv::Op::OpImageGather;
       append_result_type_and_id_to_spirv_params();
       if (!append_image_and_coords_to_spirv_params()) {
@@ -2984,7 +2981,7 @@
       }
       break;
     }
-    case IntrinsicType::kTextureGatherCompare: {
+    case BuiltinType::kTextureGatherCompare: {
       op = spv::Op::OpImageDrefGather;
       append_result_type_and_id_to_spirv_params();
       if (!append_image_and_coords_to_spirv_params()) {
@@ -2993,7 +2990,7 @@
       spirv_params.emplace_back(gen_arg(Usage::kDepthRef));
       break;
     }
-    case IntrinsicType::kTextureSample: {
+    case BuiltinType::kTextureSample: {
       op = spv::Op::OpImageSampleImplicitLod;
       append_result_type_and_id_to_spirv_params_for_read();
       if (!append_image_and_coords_to_spirv_params()) {
@@ -3001,7 +2998,7 @@
       }
       break;
     }
-    case IntrinsicType::kTextureSampleBias: {
+    case BuiltinType::kTextureSampleBias: {
       op = spv::Op::OpImageSampleImplicitLod;
       append_result_type_and_id_to_spirv_params_for_read();
       if (!append_image_and_coords_to_spirv_params()) {
@@ -3011,7 +3008,7 @@
           ImageOperand{SpvImageOperandsBiasMask, gen_arg(Usage::kBias)});
       break;
     }
-    case IntrinsicType::kTextureSampleLevel: {
+    case BuiltinType::kTextureSampleLevel: {
       op = spv::Op::OpImageSampleExplicitLod;
       append_result_type_and_id_to_spirv_params_for_read();
       if (!append_image_and_coords_to_spirv_params()) {
@@ -3037,7 +3034,7 @@
       image_operands.emplace_back(ImageOperand{SpvImageOperandsLodMask, level});
       break;
     }
-    case IntrinsicType::kTextureSampleGrad: {
+    case BuiltinType::kTextureSampleGrad: {
       op = spv::Op::OpImageSampleExplicitLod;
       append_result_type_and_id_to_spirv_params_for_read();
       if (!append_image_and_coords_to_spirv_params()) {
@@ -3049,7 +3046,7 @@
           ImageOperand{SpvImageOperandsGradMask, gen_arg(Usage::kDdy)});
       break;
     }
-    case IntrinsicType::kTextureSampleCompare: {
+    case BuiltinType::kTextureSampleCompare: {
       op = spv::Op::OpImageSampleDrefImplicitLod;
       append_result_type_and_id_to_spirv_params();
       if (!append_image_and_coords_to_spirv_params()) {
@@ -3058,7 +3055,7 @@
       spirv_params.emplace_back(gen_arg(Usage::kDepthRef));
       break;
     }
-    case IntrinsicType::kTextureSampleCompareLevel: {
+    case BuiltinType::kTextureSampleCompareLevel: {
       op = spv::Op::OpImageSampleDrefExplicitLod;
       append_result_type_and_id_to_spirv_params();
       if (!append_image_and_coords_to_spirv_params()) {
@@ -3096,8 +3093,7 @@
   }
 
   if (op == spv::Op::OpNop) {
-    error_ =
-        "unable to determine operator for: " + std::string(intrinsic->str());
+    error_ = "unable to determine operator for: " + std::string(builtin->str());
     return false;
   }
 
@@ -3108,7 +3104,7 @@
   return post_emission();
 }
 
-bool Builder::GenerateControlBarrierIntrinsic(const sem::Intrinsic* intrinsic) {
+bool Builder::GenerateControlBarrierBuiltin(const sem::Builtin* builtin) {
   auto const op = spv::Op::OpControlBarrier;
   uint32_t execution = 0;
   uint32_t memory = 0;
@@ -3116,21 +3112,21 @@
 
   // TODO(crbug.com/tint/661): Combine sequential barriers to a single
   // instruction.
-  if (intrinsic->Type() == sem::IntrinsicType::kWorkgroupBarrier) {
+  if (builtin->Type() == sem::BuiltinType::kWorkgroupBarrier) {
     execution = static_cast<uint32_t>(spv::Scope::Workgroup);
     memory = static_cast<uint32_t>(spv::Scope::Workgroup);
     semantics =
         static_cast<uint32_t>(spv::MemorySemanticsMask::AcquireRelease) |
         static_cast<uint32_t>(spv::MemorySemanticsMask::WorkgroupMemory);
-  } else if (intrinsic->Type() == sem::IntrinsicType::kStorageBarrier) {
+  } else if (builtin->Type() == sem::BuiltinType::kStorageBarrier) {
     execution = static_cast<uint32_t>(spv::Scope::Workgroup);
     memory = static_cast<uint32_t>(spv::Scope::Workgroup);
     semantics =
         static_cast<uint32_t>(spv::MemorySemanticsMask::AcquireRelease) |
         static_cast<uint32_t>(spv::MemorySemanticsMask::UniformMemory);
   } else {
-    error_ = "unexpected barrier intrinsic type ";
-    error_ += sem::str(intrinsic->Type());
+    error_ = "unexpected barrier builtin type ";
+    error_ += sem::str(builtin->Type());
     return false;
   }
 
@@ -3148,20 +3144,20 @@
                                 });
 }
 
-bool Builder::GenerateAtomicIntrinsic(const sem::Call* call,
-                                      const sem::Intrinsic* intrinsic,
-                                      Operand result_type,
-                                      Operand result_id) {
+bool Builder::GenerateAtomicBuiltin(const sem::Call* call,
+                                    const sem::Builtin* builtin,
+                                    Operand result_type,
+                                    Operand result_id) {
   auto is_value_signed = [&] {
-    return intrinsic->Parameters()[1]->Type()->Is<sem::I32>();
+    return builtin->Parameters()[1]->Type()->Is<sem::I32>();
   };
 
   auto storage_class =
-      intrinsic->Parameters()[0]->Type()->As<sem::Pointer>()->StorageClass();
+      builtin->Parameters()[0]->Type()->As<sem::Pointer>()->StorageClass();
 
   uint32_t memory_id = 0;
   switch (
-      intrinsic->Parameters()[0]->Type()->As<sem::Pointer>()->StorageClass()) {
+      builtin->Parameters()[0]->Type()->As<sem::Pointer>()->StorageClass()) {
     case ast::StorageClass::kWorkgroup:
       memory_id = GenerateConstantIfNeeded(
           ScalarConstant::U32(static_cast<uint32_t>(spv::Scope::Workgroup)));
@@ -3203,8 +3199,8 @@
   Operand memory = Operand::Int(memory_id);
   Operand semantics = Operand::Int(semantics_id);
 
-  switch (intrinsic->Type()) {
-    case sem::IntrinsicType::kAtomicLoad:
+  switch (builtin->Type()) {
+    case sem::BuiltinType::kAtomicLoad:
       return push_function_inst(spv::Op::OpAtomicLoad, {
                                                            result_type,
                                                            result_id,
@@ -3212,14 +3208,14 @@
                                                            memory,
                                                            semantics,
                                                        });
-    case sem::IntrinsicType::kAtomicStore:
+    case sem::BuiltinType::kAtomicStore:
       return push_function_inst(spv::Op::OpAtomicStore, {
                                                             pointer,
                                                             memory,
                                                             semantics,
                                                             value,
                                                         });
-    case sem::IntrinsicType::kAtomicAdd:
+    case sem::BuiltinType::kAtomicAdd:
       return push_function_inst(spv::Op::OpAtomicIAdd, {
                                                            result_type,
                                                            result_id,
@@ -3228,7 +3224,7 @@
                                                            semantics,
                                                            value,
                                                        });
-    case sem::IntrinsicType::kAtomicSub:
+    case sem::BuiltinType::kAtomicSub:
       return push_function_inst(spv::Op::OpAtomicISub, {
                                                            result_type,
                                                            result_id,
@@ -3237,7 +3233,7 @@
                                                            semantics,
                                                            value,
                                                        });
-    case sem::IntrinsicType::kAtomicMax:
+    case sem::BuiltinType::kAtomicMax:
       return push_function_inst(
           is_value_signed() ? spv::Op::OpAtomicSMax : spv::Op::OpAtomicUMax,
           {
@@ -3248,7 +3244,7 @@
               semantics,
               value,
           });
-    case sem::IntrinsicType::kAtomicMin:
+    case sem::BuiltinType::kAtomicMin:
       return push_function_inst(
           is_value_signed() ? spv::Op::OpAtomicSMin : spv::Op::OpAtomicUMin,
           {
@@ -3259,7 +3255,7 @@
               semantics,
               value,
           });
-    case sem::IntrinsicType::kAtomicAnd:
+    case sem::BuiltinType::kAtomicAnd:
       return push_function_inst(spv::Op::OpAtomicAnd, {
                                                           result_type,
                                                           result_id,
@@ -3268,7 +3264,7 @@
                                                           semantics,
                                                           value,
                                                       });
-    case sem::IntrinsicType::kAtomicOr:
+    case sem::BuiltinType::kAtomicOr:
       return push_function_inst(spv::Op::OpAtomicOr, {
                                                          result_type,
                                                          result_id,
@@ -3277,7 +3273,7 @@
                                                          semantics,
                                                          value,
                                                      });
-    case sem::IntrinsicType::kAtomicXor:
+    case sem::BuiltinType::kAtomicXor:
       return push_function_inst(spv::Op::OpAtomicXor, {
                                                           result_type,
                                                           result_id,
@@ -3286,7 +3282,7 @@
                                                           semantics,
                                                           value,
                                                       });
-    case sem::IntrinsicType::kAtomicExchange:
+    case sem::BuiltinType::kAtomicExchange:
       return push_function_inst(spv::Op::OpAtomicExchange, {
                                                                result_type,
                                                                result_id,
@@ -3295,7 +3291,7 @@
                                                                semantics,
                                                                value,
                                                            });
-    case sem::IntrinsicType::kAtomicCompareExchangeWeak: {
+    case sem::BuiltinType::kAtomicCompareExchangeWeak: {
       auto comparator = GenerateExpression(call->Arguments()[1]->Declaration());
       if (comparator == 0) {
         return false;
@@ -3383,7 +3379,7 @@
     }
     default:
       TINT_UNREACHABLE(Writer, builder_.Diagnostics())
-          << "unhandled atomic intrinsic " << intrinsic->Type();
+          << "unhandled atomic builtin " << builtin->Type();
       return false;
   }
 }
diff --git a/src/writer/spirv/builder.h b/src/writer/spirv/builder.h
index 34d3a31..3b194f4 100644
--- a/src/writer/spirv/builder.h
+++ b/src/writer/spirv/builder.h
@@ -35,7 +35,7 @@
 #include "src/ast/variable_decl_statement.h"
 #include "src/program_builder.h"
 #include "src/scope_stack.h"
-#include "src/sem/intrinsic.h"
+#include "src/sem/builtin.h"
 #include "src/sem/storage_texture_type.h"
 #include "src/writer/spirv/function.h"
 #include "src/writer/spirv/scalar_constant.h"
@@ -376,44 +376,44 @@
   /// @returns the expression ID on success or 0 otherwise
   uint32_t GenerateFunctionCall(const sem::Call* call,
                                 const sem::Function* function);
-  /// Handles generating an intrinsic call expression
+  /// Handles generating a builtin call expression
   /// @param call the call expression
-  /// @param intrinsic the intrinsic being called
+  /// @param builtin the builtin being called
   /// @returns the expression ID on success or 0 otherwise
-  uint32_t GenerateIntrinsicCall(const sem::Call* call,
-                                 const sem::Intrinsic* intrinsic);
+  uint32_t GenerateBuiltinCall(const sem::Call* call,
+                               const sem::Builtin* builtin);
   /// Handles generating a type constructor or type conversion expression
   /// @param call the call expression
   /// @param var the variable that is being initialized. May be null.
   /// @returns the expression ID on success or 0 otherwise
   uint32_t GenerateTypeConstructorOrConversion(const sem::Call* call,
                                                const ast::Variable* var);
-  /// Generates a texture intrinsic call. Emits an error and returns false if
+  /// Generates a texture builtin call. Emits an error and returns false if
   /// we're currently outside a function.
   /// @param call the call expression
-  /// @param intrinsic the semantic information for the texture intrinsic
+  /// @param builtin the semantic information for the texture builtin
   /// @param result_type result type operand of the texture instruction
   /// @param result_id result identifier operand of the texture instruction
   /// parameters
   /// @returns true on success
-  bool GenerateTextureIntrinsic(const sem::Call* call,
-                                const sem::Intrinsic* intrinsic,
-                                spirv::Operand result_type,
-                                spirv::Operand result_id);
+  bool GenerateTextureBuiltin(const sem::Call* call,
+                              const sem::Builtin* builtin,
+                              spirv::Operand result_type,
+                              spirv::Operand result_id);
   /// Generates a control barrier statement.
-  /// @param intrinsic the semantic information for the barrier intrinsic call
+  /// @param builtin the semantic information for the barrier builtin call
   /// @returns true on success
-  bool GenerateControlBarrierIntrinsic(const sem::Intrinsic* intrinsic);
-  /// Generates an atomic intrinsic call.
+  bool GenerateControlBarrierBuiltin(const sem::Builtin* builtin);
+  /// Generates an atomic builtin call.
   /// @param call the call expression
-  /// @param intrinsic the semantic information for the atomic intrinsic call
+  /// @param builtin the semantic information for the atomic builtin call
   /// @param result_type result type operand of the texture instruction
   /// @param result_id result identifier operand of the texture instruction
   /// @returns true on success
-  bool GenerateAtomicIntrinsic(const sem::Call* call,
-                               const sem::Intrinsic* intrinsic,
-                               Operand result_type,
-                               Operand result_id);
+  bool GenerateAtomicBuiltin(const sem::Call* call,
+                             const sem::Builtin* builtin,
+                             Operand result_type,
+                             Operand result_id);
   /// Generates a sampled image
   /// @param texture_type the texture type
   /// @param texture_operand the texture operand
diff --git a/src/writer/spirv/builder_builtin_test.cc b/src/writer/spirv/builder_builtin_test.cc
new file mode 100644
index 0000000..3786265
--- /dev/null
+++ b/src/writer/spirv/builder_builtin_test.cc
@@ -0,0 +1,2560 @@
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/ast/call_statement.h"
+#include "src/ast/stage_attribute.h"
+#include "src/ast/struct_block_attribute.h"
+#include "src/sem/depth_texture_type.h"
+#include "src/utils/string.h"
+#include "src/writer/spirv/spv_dump.h"
+#include "src/writer/spirv/test_helper.h"
+
+namespace tint {
+namespace writer {
+namespace spirv {
+namespace {
+
+using BuiltinBuilderTest = TestHelper;
+
+template <typename T>
+using BuiltinBuilderTestWithParam = TestParamHelper<T>;
+
+struct BuiltinData {
+  std::string name;
+  std::string op;
+};
+inline std::ostream& operator<<(std::ostream& out, BuiltinData data) {
+  out << data.name;
+  return out;
+}
+
+using BuiltinBoolTest = BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(BuiltinBoolTest, Call_Bool_Scalar) {
+  auto param = GetParam();
+  auto* var = Global("v", ty.bool_(), ast::StorageClass::kPrivate);
+  auto* expr = Call(param.name, "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeBool
+%2 = OpTypePointer Private %3
+%4 = OpConstantNull %3
+%1 = OpVariable %2 Private %4
+%6 = OpTypeVoid
+%5 = OpTypeFunction %6
+)");
+
+  // both any and all are 'passthrough' for scalar booleans
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
+            "%10 = OpLoad %3 %1\nOpReturn\n");
+}
+
+TEST_P(BuiltinBoolTest, Call_Bool_Vector) {
+  auto param = GetParam();
+  auto* var = Global("v", ty.vec3<bool>(), ast::StorageClass::kPrivate);
+  auto* expr = Call(param.name, "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeBool
+%3 = OpTypeVector %4 3
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+)");
+
+  auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
+%10 = ${op} %4 %11
+OpReturn
+)",
+                                    "${op}", param.op);
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
+}
+INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
+                         BuiltinBoolTest,
+                         testing::Values(BuiltinData{"any", "OpAny"},
+                                         BuiltinData{"all", "OpAll"}));
+
+using BuiltinFloatTest = BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(BuiltinFloatTest, Call_Float_Scalar) {
+  auto param = GetParam();
+  auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
+  auto* expr = Call(param.name, "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeFloat 32
+%2 = OpTypePointer Private %3
+%4 = OpConstantNull %3
+%1 = OpVariable %2 Private %4
+%6 = OpTypeVoid
+%5 = OpTypeFunction %6
+%10 = OpTypeBool
+)");
+
+  auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
+%9 = ${op} %10 %11
+OpReturn
+)",
+                                    "${op}", param.op);
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
+}
+
+TEST_P(BuiltinFloatTest, Call_Float_Vector) {
+  auto param = GetParam();
+  auto* var = Global("v", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call(param.name, "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
+%3 = OpTypeVector %4 3
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%12 = OpTypeBool
+%11 = OpTypeVector %12 3
+)");
+
+  auto expected = utils::ReplaceAll(R"(%13 = OpLoad %3 %1
+%10 = ${op} %11 %13
+OpReturn
+)",
+                                    "${op}", param.op);
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
+}
+INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
+                         BuiltinFloatTest,
+                         testing::Values(BuiltinData{"isNan", "OpIsNan"},
+                                         BuiltinData{"isInf", "OpIsInf"}));
+
+TEST_F(BuiltinBuilderTest, IsFinite_Scalar) {
+  auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
+  auto* expr = Call("isFinite", "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeFloat 32
+%2 = OpTypePointer Private %3
+%4 = OpConstantNull %3
+%1 = OpVariable %2 Private %4
+%6 = OpTypeVoid
+%5 = OpTypeFunction %6
+%10 = OpTypeBool
+)");
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
+            R"(%11 = OpLoad %3 %1
+%12 = OpIsInf %10 %11
+%13 = OpIsNan %10 %11
+%14 = OpLogicalOr %10 %12 %13
+%9 = OpLogicalNot %10 %14
+OpReturn
+)");
+}
+
+TEST_F(BuiltinBuilderTest, IsFinite_Vector) {
+  auto* var = Global("v", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call("isFinite", "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
+%3 = OpTypeVector %4 3
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%12 = OpTypeBool
+%11 = OpTypeVector %12 3
+)");
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
+            R"(%13 = OpLoad %3 %1
+%14 = OpIsInf %11 %13
+%15 = OpIsNan %11 %13
+%16 = OpLogicalOr %11 %14 %15
+%10 = OpLogicalNot %11 %16
+OpReturn
+)");
+}
+
+TEST_F(BuiltinBuilderTest, IsNormal_Scalar) {
+  auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
+  auto* expr = Call("isNormal", "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  auto got = DumpBuilder(b);
+  EXPECT_EQ(got, R"(%12 = OpExtInstImport "GLSL.std.450"
+OpName %1 "v"
+OpName %7 "a_func"
+%3 = OpTypeFloat 32
+%2 = OpTypePointer Private %3
+%4 = OpConstantNull %3
+%1 = OpVariable %2 Private %4
+%6 = OpTypeVoid
+%5 = OpTypeFunction %6
+%10 = OpTypeBool
+%13 = OpTypeInt 32 0
+%14 = OpConstant %13 133693440
+%15 = OpConstant %13 524288
+%16 = OpConstant %13 133169152
+%7 = OpFunction %6 None %5
+%8 = OpLabel
+%11 = OpLoad %3 %1
+%17 = OpBitcast %13 %11
+%18 = OpBitwiseAnd %13 %17 %14
+%19 = OpExtInst %13 %12 UClamp %18 %15 %16
+%9 = OpIEqual %10 %18 %19
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_F(BuiltinBuilderTest, IsNormal_Vector) {
+  auto* var = Global("v", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call("isNormal", "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  auto got = DumpBuilder(b);
+  EXPECT_EQ(got, R"(%14 = OpExtInstImport "GLSL.std.450"
+OpName %1 "v"
+OpName %8 "a_func"
+%4 = OpTypeFloat 32
+%3 = OpTypeVector %4 2
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%12 = OpTypeBool
+%11 = OpTypeVector %12 2
+%15 = OpTypeInt 32 0
+%16 = OpConstant %15 133693440
+%17 = OpConstant %15 524288
+%18 = OpConstant %15 133169152
+%19 = OpTypeVector %15 2
+%8 = OpFunction %7 None %6
+%9 = OpLabel
+%13 = OpLoad %3 %1
+%20 = OpCompositeConstruct %19 %16 %16
+%21 = OpCompositeConstruct %19 %17 %17
+%22 = OpCompositeConstruct %19 %18 %18
+%23 = OpBitcast %19 %13
+%24 = OpBitwiseAnd %19 %23 %20
+%25 = OpExtInst %19 %14 UClamp %24 %21 %22
+%10 = OpIEqual %11 %24 %25
+OpReturn
+OpFunctionEnd
+)");
+}
+
+using BuiltinIntTest = BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(BuiltinIntTest, Call_SInt_Scalar) {
+  auto param = GetParam();
+  auto* var = Global("v", ty.i32(), ast::StorageClass::kPrivate);
+  auto* expr = Call(param.name, "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeInt 32 1
+%2 = OpTypePointer Private %3
+%4 = OpConstantNull %3
+%1 = OpVariable %2 Private %4
+%6 = OpTypeVoid
+%5 = OpTypeFunction %6
+)");
+
+  auto expected = utils::ReplaceAll(R"(%10 = OpLoad %3 %1
+%9 = ${op} %3 %10
+OpReturn
+)",
+                                    "${op}", param.op);
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
+}
+
+TEST_P(BuiltinIntTest, Call_SInt_Vector) {
+  auto param = GetParam();
+  auto* var = Global("v", ty.vec3<i32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call(param.name, "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeInt 32 1
+%3 = OpTypeVector %4 3
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+)");
+
+  auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
+%10 = ${op} %3 %11
+OpReturn
+)",
+                                    "${op}", param.op);
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
+}
+
+TEST_P(BuiltinIntTest, Call_UInt_Scalar) {
+  auto param = GetParam();
+  auto* var = Global("v", ty.u32(), ast::StorageClass::kPrivate);
+  auto* expr = Call(param.name, "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeInt 32 0
+%2 = OpTypePointer Private %3
+%4 = OpConstantNull %3
+%1 = OpVariable %2 Private %4
+%6 = OpTypeVoid
+%5 = OpTypeFunction %6
+)");
+
+  auto expected = utils::ReplaceAll(R"(%10 = OpLoad %3 %1
+%9 = ${op} %3 %10
+OpReturn
+)",
+                                    "${op}", param.op);
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
+}
+
+TEST_P(BuiltinIntTest, Call_UInt_Vector) {
+  auto param = GetParam();
+  auto* var = Global("v", ty.vec3<u32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call(param.name, "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeInt 32 0
+%3 = OpTypeVector %4 3
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+)");
+
+  auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
+%10 = ${op} %3 %11
+OpReturn
+)",
+                                    "${op}", param.op);
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
+}
+INSTANTIATE_TEST_SUITE_P(
+    BuiltinBuilderTest,
+    BuiltinIntTest,
+    testing::Values(BuiltinData{"countOneBits", "OpBitCount"},
+                    BuiltinData{"reverseBits", "OpBitReverse"}));
+
+TEST_F(BuiltinBuilderTest, Call_Dot_F32) {
+  auto* var = Global("v", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call("dot", "v", "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
+%3 = OpTypeVector %4 3
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+)");
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
+            R"(%11 = OpLoad %3 %1
+%12 = OpLoad %3 %1
+%10 = OpDot %4 %11 %12
+OpReturn
+)");
+}
+
+TEST_F(BuiltinBuilderTest, Call_Dot_U32) {
+  auto* var = Global("v", ty.vec3<u32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call("dot", "v", "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeInt 32 0
+%3 = OpTypeVector %4 3
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+)");
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
+            R"(%11 = OpLoad %3 %1
+%12 = OpLoad %3 %1
+%13 = OpCompositeExtract %4 %11 0
+%14 = OpCompositeExtract %4 %12 0
+%15 = OpIMul %4 %13 %14
+%16 = OpCompositeExtract %4 %11 1
+%17 = OpCompositeExtract %4 %12 1
+%18 = OpIMul %4 %16 %17
+%19 = OpIAdd %4 %15 %18
+%20 = OpCompositeExtract %4 %11 2
+%21 = OpCompositeExtract %4 %12 2
+%22 = OpIMul %4 %20 %21
+%10 = OpIAdd %4 %19 %22
+OpReturn
+)");
+}
+
+TEST_F(BuiltinBuilderTest, Call_Dot_I32) {
+  auto* var = Global("v", ty.vec3<i32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call("dot", "v", "v");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeInt 32 1
+%3 = OpTypeVector %4 3
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+)");
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
+            R"(%11 = OpLoad %3 %1
+%12 = OpLoad %3 %1
+%13 = OpCompositeExtract %4 %11 0
+%14 = OpCompositeExtract %4 %12 0
+%15 = OpIMul %4 %13 %14
+%16 = OpCompositeExtract %4 %11 1
+%17 = OpCompositeExtract %4 %12 1
+%18 = OpIMul %4 %16 %17
+%19 = OpIAdd %4 %15 %18
+%20 = OpCompositeExtract %4 %11 2
+%21 = OpCompositeExtract %4 %12 2
+%22 = OpIMul %4 %20 %21
+%10 = OpIAdd %4 %19 %22
+OpReturn
+)");
+}
+
+using BuiltinDeriveTest = BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(BuiltinDeriveTest, Call_Derivative_Scalar) {
+  auto param = GetParam();
+  auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
+  auto* expr = Call(param.name, "v");
+  auto* func = Func("func", {}, ty.void_(), {CallStmt(expr)},
+                    {Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeFloat 32
+%2 = OpTypePointer Private %3
+%4 = OpConstantNull %3
+%1 = OpVariable %2 Private %4
+%6 = OpTypeVoid
+%5 = OpTypeFunction %6
+)");
+
+  auto expected = utils::ReplaceAll(R"(%10 = OpLoad %3 %1
+%9 = ${op} %3 %10
+OpReturn
+)",
+                                    "${op}", param.op);
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
+}
+
+TEST_P(BuiltinDeriveTest, Call_Derivative_Vector) {
+  auto param = GetParam();
+  auto* var = Global("v", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call(param.name, "v");
+  auto* func = Func("func", {}, ty.void_(), {CallStmt(expr)},
+                    {Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  if (param.name != "dpdx" && param.name != "dpdy" && param.name != "fwidth") {
+    EXPECT_EQ(DumpInstructions(b.capabilities()),
+              R"(OpCapability DerivativeControl
+)");
+  }
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
+%3 = OpTypeVector %4 3
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+)");
+
+  auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
+%10 = ${op} %3 %11
+OpReturn
+)",
+                                    "${op}", param.op);
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
+}
+INSTANTIATE_TEST_SUITE_P(
+    BuiltinBuilderTest,
+    BuiltinDeriveTest,
+    testing::Values(BuiltinData{"dpdx", "OpDPdx"},
+                    BuiltinData{"dpdxFine", "OpDPdxFine"},
+                    BuiltinData{"dpdxCoarse", "OpDPdxCoarse"},
+                    BuiltinData{"dpdy", "OpDPdy"},
+                    BuiltinData{"dpdyFine", "OpDPdyFine"},
+                    BuiltinData{"dpdyCoarse", "OpDPdyCoarse"},
+                    BuiltinData{"fwidth", "OpFwidth"},
+                    BuiltinData{"fwidthFine", "OpFwidthFine"},
+                    BuiltinData{"fwidthCoarse", "OpFwidthCoarse"}));
+
+TEST_F(BuiltinBuilderTest, Call_Select) {
+  auto* v3 = Global("v3", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+
+  auto* bool_v3 =
+      Global("bool_v3", ty.vec3<bool>(), ast::StorageClass::kPrivate);
+  auto* expr = Call("select", "v3", "v3", "bool_v3");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(v3)) << b.error();
+  ASSERT_TRUE(b.GenerateGlobalVariable(bool_v3)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
+%3 = OpTypeVector %4 3
+%2 = OpTypePointer Private %3
+%5 = OpConstantNull %3
+%1 = OpVariable %2 Private %5
+%9 = OpTypeBool
+%8 = OpTypeVector %9 3
+%7 = OpTypePointer Private %8
+%10 = OpConstantNull %8
+%6 = OpVariable %7 Private %10
+%12 = OpTypeVoid
+%11 = OpTypeFunction %12
+)");
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
+            R"(%16 = OpLoad %8 %6
+%17 = OpLoad %3 %1
+%18 = OpLoad %3 %1
+%15 = OpSelect %3 %16 %17 %18
+OpReturn
+)");
+}
+
+// This tests that we do not push OpTypeSampledImage and float_0 type twice.
+TEST_F(BuiltinBuilderTest, Call_TextureSampleCompare_Twice) {
+  auto* s = ty.sampler(ast::SamplerKind::kComparisonSampler);
+  auto* t = ty.depth_texture(ast::TextureDimension::k2d);
+
+  auto* tex = Global("texture", t,
+                     ast::AttributeList{
+                         create<ast::BindingAttribute>(0),
+                         create<ast::GroupAttribute>(0),
+                     });
+
+  auto* sampler = Global("sampler", s,
+                         ast::AttributeList{
+                             create<ast::BindingAttribute>(1),
+                             create<ast::GroupAttribute>(0),
+                         });
+
+  auto* expr1 = Call("textureSampleCompare", "texture", "sampler",
+                     vec2<f32>(1.0f, 2.0f), 2.0f);
+  auto* expr2 = Call("textureSampleCompare", "texture", "sampler",
+                     vec2<f32>(1.0f, 2.0f), 2.0f);
+
+  Func("f1", {}, ty.void_(), {CallStmt(expr1)}, {});
+  Func("f2", {}, ty.void_(), {CallStmt(expr2)}, {});
+
+  spirv::Builder& b = Build();
+
+  b.push_function(Function{});
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(tex)) << b.error();
+  ASSERT_TRUE(b.GenerateGlobalVariable(sampler)) << b.error();
+
+  EXPECT_EQ(b.GenerateExpression(expr1), 8u) << b.error();
+  EXPECT_EQ(b.GenerateExpression(expr2), 17u) << b.error();
+
+  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 2
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstantComposite %13 %14 %15
+)");
+
+  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
+            R"(%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%8 = OpImageSampleDrefImplicitLod %4 %12 %16 %15
+%18 = OpLoad %7 %5
+%19 = OpLoad %3 %1
+%20 = OpSampledImage %11 %19 %18
+%17 = OpImageSampleDrefImplicitLod %4 %20 %16 %15
+)");
+}
+
+TEST_F(BuiltinBuilderTest, Call_GLSLMethod_WithLoad) {
+  auto* var = Global("ident", ty.f32(), ast::StorageClass::kPrivate);
+  auto* expr = Call("round", "ident");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%10 = OpExtInstImport "GLSL.std.450"
+OpName %1 "ident"
+OpName %7 "a_func"
+%3 = OpTypeFloat 32
+%2 = OpTypePointer Private %3
+%4 = OpConstantNull %3
+%1 = OpVariable %2 Private %4
+%6 = OpTypeVoid
+%5 = OpTypeFunction %6
+%7 = OpFunction %6 None %5
+%8 = OpLabel
+%11 = OpLoad %3 %1
+%9 = OpExtInst %3 %10 RoundEven %11
+OpReturn
+OpFunctionEnd
+)");
+}
+
+using Builtin_Builtin_SingleParam_Float_Test =
+    BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_SingleParam_Float_Test, Call_Scalar) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, 1.0f);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeFloat 32
+%8 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 )" + param.op +
+                                R"( %8
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_P(Builtin_Builtin_SingleParam_Float_Test, Call_Vector) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, vec2<f32>(1.0f, 1.0f));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeFloat 32
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 )" + param.op +
+                                R"( %10
+OpReturn
+OpFunctionEnd
+)");
+}
+INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
+                         Builtin_Builtin_SingleParam_Float_Test,
+                         testing::Values(BuiltinData{"abs", "FAbs"},
+                                         BuiltinData{"acos", "Acos"},
+                                         BuiltinData{"asin", "Asin"},
+                                         BuiltinData{"atan", "Atan"},
+                                         BuiltinData{"ceil", "Ceil"},
+                                         BuiltinData{"cos", "Cos"},
+                                         BuiltinData{"cosh", "Cosh"},
+                                         BuiltinData{"degrees", "Degrees"},
+                                         BuiltinData{"exp", "Exp"},
+                                         BuiltinData{"exp2", "Exp2"},
+                                         BuiltinData{"floor", "Floor"},
+                                         BuiltinData{"fract", "Fract"},
+                                         BuiltinData{"inverseSqrt",
+                                                     "InverseSqrt"},
+                                         BuiltinData{"log", "Log"},
+                                         BuiltinData{"log2", "Log2"},
+                                         BuiltinData{"radians", "Radians"},
+                                         BuiltinData{"round", "RoundEven"},
+                                         BuiltinData{"sign", "FSign"},
+                                         BuiltinData{"sin", "Sin"},
+                                         BuiltinData{"sinh", "Sinh"},
+                                         BuiltinData{"sqrt", "Sqrt"},
+                                         BuiltinData{"tan", "Tan"},
+                                         BuiltinData{"tanh", "Tanh"},
+                                         BuiltinData{"trunc", "Trunc"}));
+
+TEST_F(BuiltinBuilderTest, Call_Length_Scalar) {
+  auto* expr = Call("length", 1.0f);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeFloat 32
+%8 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 Length %8
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_F(BuiltinBuilderTest, Call_Length_Vector) {
+  auto* expr = Call("length", vec2<f32>(1.0f, 1.0f));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeFloat 32
+%8 = OpTypeVector %6 2
+%9 = OpConstant %6 1
+%10 = OpConstantComposite %8 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 Length %10
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_F(BuiltinBuilderTest, Call_Normalize) {
+  auto* expr = Call("normalize", vec2<f32>(1.0f, 1.0f));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeFloat 32
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 Normalize %10
+OpReturn
+OpFunctionEnd
+)");
+}
+
+using Builtin_Builtin_DualParam_Float_Test =
+    BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_DualParam_Float_Test, Call_Scalar) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, 1.0f, 1.0f);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeFloat 32
+%8 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 )" + param.op +
+                                R"( %8 %8
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_P(Builtin_Builtin_DualParam_Float_Test, Call_Vector) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeFloat 32
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 )" + param.op +
+                                R"( %10 %10
+OpReturn
+OpFunctionEnd
+)");
+}
+INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
+                         Builtin_Builtin_DualParam_Float_Test,
+                         testing::Values(BuiltinData{"atan2", "Atan2"},
+                                         BuiltinData{"max", "NMax"},
+                                         BuiltinData{"min", "NMin"},
+                                         BuiltinData{"pow", "Pow"},
+                                         BuiltinData{"step", "Step"}));
+
+TEST_F(BuiltinBuilderTest, Call_Reflect_Vector) {
+  auto* expr = Call("reflect", vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeFloat 32
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 Reflect %10 %10
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_F(BuiltinBuilderTest, Call_Distance_Scalar) {
+  auto* expr = Call("distance", 1.0f, 1.0f);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeFloat 32
+%8 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 Distance %8 %8
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_F(BuiltinBuilderTest, Call_Distance_Vector) {
+  auto* expr = Call("distance", vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeFloat 32
+%8 = OpTypeVector %6 2
+%9 = OpConstant %6 1
+%10 = OpConstantComposite %8 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 Distance %10 %10
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_F(BuiltinBuilderTest, Call_Cross) {
+  auto* expr =
+      Call("cross", vec3<f32>(1.0f, 1.0f, 1.0f), vec3<f32>(1.0f, 1.0f, 1.0f));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeFloat 32
+%6 = OpTypeVector %7 3
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 Cross %10 %10
+OpReturn
+OpFunctionEnd
+)");
+}
+
+using Builtin_Builtin_ThreeParam_Float_Test =
+    BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_ThreeParam_Float_Test, Call_Scalar) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, 1.0f, 1.0f, 1.0f);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeFloat 32
+%8 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 )" + param.op +
+                                R"( %8 %8 %8
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_P(Builtin_Builtin_ThreeParam_Float_Test, Call_Vector) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f),
+                    vec2<f32>(1.0f, 1.0f));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeFloat 32
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 )" + param.op +
+                                R"( %10 %10 %10
+OpReturn
+OpFunctionEnd
+)");
+}
+INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
+                         Builtin_Builtin_ThreeParam_Float_Test,
+                         testing::Values(BuiltinData{"clamp", "NClamp"},
+                                         BuiltinData{"fma", "Fma"},
+                                         BuiltinData{"mix", "FMix"},
+
+                                         BuiltinData{"smoothStep",
+                                                     "SmoothStep"}));
+
+TEST_F(BuiltinBuilderTest, Call_FaceForward_Vector) {
+  auto* expr = Call("faceForward", vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f),
+                    vec2<f32>(1.0f, 1.0f));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeFloat 32
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 FaceForward %10 %10 %10
+OpReturn
+OpFunctionEnd
+)");
+}
+
+using Builtin_Builtin_SingleParam_Sint_Test =
+    BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_SingleParam_Sint_Test, Call_Scalar) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, 1);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeInt 32 1
+%8 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 )" + param.op +
+                                R"( %8
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_P(Builtin_Builtin_SingleParam_Sint_Test, Call_Vector) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, vec2<i32>(1, 1));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeInt 32 1
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 )" + param.op +
+                                R"( %10
+OpReturn
+OpFunctionEnd
+)");
+}
+INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
+                         Builtin_Builtin_SingleParam_Sint_Test,
+                         testing::Values(BuiltinData{"abs", "SAbs"}));
+
+// Calling abs() on an unsigned integer scalar / vector is a no-op.
+using Builtin_Builtin_Abs_Uint_Test = BuiltinBuilderTest;
+TEST_F(Builtin_Builtin_Abs_Uint_Test, Call_Scalar) {
+  auto* expr = Call("abs", 1u);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeInt 32 0
+%7 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_F(Builtin_Builtin_Abs_Uint_Test, Call_Vector) {
+  auto* expr = Call("abs", vec2<u32>(1u, 1u));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeInt 32 0
+%6 = OpTypeVector %7 2
+%8 = OpConstant %7 1
+%9 = OpConstantComposite %6 %8 %8
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+OpReturn
+OpFunctionEnd
+)");
+}
+
+using Builtin_Builtin_DualParam_SInt_Test =
+    BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_DualParam_SInt_Test, Call_Scalar) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, 1, 1);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeInt 32 1
+%8 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 )" + param.op +
+                                R"( %8 %8
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_P(Builtin_Builtin_DualParam_SInt_Test, Call_Vector) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, vec2<i32>(1, 1), vec2<i32>(1, 1));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeInt 32 1
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 )" + param.op +
+                                R"( %10 %10
+OpReturn
+OpFunctionEnd
+)");
+}
+INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
+                         Builtin_Builtin_DualParam_SInt_Test,
+                         testing::Values(BuiltinData{"max", "SMax"},
+                                         BuiltinData{"min", "SMin"}));
+
+using Builtin_Builtin_DualParam_UInt_Test =
+    BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_DualParam_UInt_Test, Call_Scalar) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, 1u, 1u);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeInt 32 0
+%8 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 )" + param.op +
+                                R"( %8 %8
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_P(Builtin_Builtin_DualParam_UInt_Test, Call_Vector) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, vec2<u32>(1u, 1u), vec2<u32>(1u, 1u));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeInt 32 0
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 )" + param.op +
+                                R"( %10 %10
+OpReturn
+OpFunctionEnd
+)");
+}
+INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
+                         Builtin_Builtin_DualParam_UInt_Test,
+                         testing::Values(BuiltinData{"max", "UMax"},
+                                         BuiltinData{"min", "UMin"}));
+
+using Builtin_Builtin_ThreeParam_Sint_Test =
+    BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_ThreeParam_Sint_Test, Call_Scalar) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, 1, 1, 1);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeInt 32 1
+%8 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 )" + param.op +
+                                R"( %8 %8 %8
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_P(Builtin_Builtin_ThreeParam_Sint_Test, Call_Vector) {
+  auto param = GetParam();
+  auto* expr =
+      Call(param.name, vec2<i32>(1, 1), vec2<i32>(1, 1), vec2<i32>(1, 1));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeInt 32 1
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 )" + param.op +
+                                R"( %10 %10 %10
+OpReturn
+OpFunctionEnd
+)");
+}
+INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
+                         Builtin_Builtin_ThreeParam_Sint_Test,
+                         testing::Values(BuiltinData{"clamp", "SClamp"}));
+
+using Builtin_Builtin_ThreeParam_Uint_Test =
+    BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_ThreeParam_Uint_Test, Call_Scalar) {
+  auto param = GetParam();
+  auto* expr = Call(param.name, 1u, 1u, 1u);
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeInt 32 0
+%8 = OpConstant %6 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 )" + param.op +
+                                R"( %8 %8 %8
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_P(Builtin_Builtin_ThreeParam_Uint_Test, Call_Vector) {
+  auto param = GetParam();
+  auto* expr =
+      Call(param.name, vec2<u32>(1u, 1u), vec2<u32>(1u, 1u), vec2<u32>(1u, 1u));
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeInt 32 0
+%6 = OpTypeVector %7 2
+%9 = OpConstant %7 1
+%10 = OpConstantComposite %6 %9 %9
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 )" + param.op +
+                                R"( %10 %10 %10
+OpReturn
+OpFunctionEnd
+)");
+}
+INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
+                         Builtin_Builtin_ThreeParam_Uint_Test,
+                         testing::Values(BuiltinData{"clamp", "UClamp"}));
+
+TEST_F(BuiltinBuilderTest, Call_Modf) {
+  auto* expr = Call("modf", vec2<f32>(1.0f, 2.0f));
+  Func("a_func", {}, ty.void_(), {CallStmt(expr)},
+       {Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+  auto got = DumpBuilder(b);
+  auto* expect = R"(OpCapability Shader
+%9 = OpExtInstImport "GLSL.std.450"
+OpMemoryModel Logical GLSL450
+OpEntryPoint Fragment %3 "a_func"
+OpExecutionMode %3 OriginUpperLeft
+OpName %3 "a_func"
+OpName %6 "__modf_result_vec2"
+OpMemberName %6 0 "fract"
+OpMemberName %6 1 "whole"
+OpMemberDecorate %6 0 Offset 0
+OpMemberDecorate %6 1 Offset 8
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%8 = OpTypeFloat 32
+%7 = OpTypeVector %8 2
+%6 = OpTypeStruct %7 %7
+%10 = OpConstant %8 1
+%11 = OpConstant %8 2
+%12 = OpConstantComposite %7 %10 %11
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %9 ModfStruct %12
+OpReturn
+OpFunctionEnd
+)";
+  EXPECT_EQ(expect, got);
+
+  Validate(b);
+}
+
+TEST_F(BuiltinBuilderTest, Call_Frexp) {
+  auto* expr = Call("frexp", vec2<f32>(1.0f, 2.0f));
+  Func("a_func", {}, ty.void_(), {CallStmt(expr)},
+       {Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+  auto got = DumpBuilder(b);
+  auto* expect = R"(OpCapability Shader
+%11 = OpExtInstImport "GLSL.std.450"
+OpMemoryModel Logical GLSL450
+OpEntryPoint Fragment %3 "a_func"
+OpExecutionMode %3 OriginUpperLeft
+OpName %3 "a_func"
+OpName %6 "__frexp_result_vec2"
+OpMemberName %6 0 "sig"
+OpMemberName %6 1 "exp"
+OpMemberDecorate %6 0 Offset 0
+OpMemberDecorate %6 1 Offset 8
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%8 = OpTypeFloat 32
+%7 = OpTypeVector %8 2
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%6 = OpTypeStruct %7 %9
+%12 = OpConstant %8 1
+%13 = OpConstant %8 2
+%14 = OpConstantComposite %7 %12 %13
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %11 FrexpStruct %14
+OpReturn
+OpFunctionEnd
+)";
+  EXPECT_EQ(expect, got);
+
+  Validate(b);
+}
+
+TEST_F(BuiltinBuilderTest, Call_Determinant) {
+  auto* var = Global("var", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call("determinant", "var");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(%12 = OpExtInstImport "GLSL.std.450"
+OpName %1 "var"
+OpName %9 "a_func"
+%5 = OpTypeFloat 32
+%4 = OpTypeVector %5 3
+%3 = OpTypeMatrix %4 3
+%2 = OpTypePointer Private %3
+%6 = OpConstantNull %3
+%1 = OpVariable %2 Private %6
+%8 = OpTypeVoid
+%7 = OpTypeFunction %8
+%9 = OpFunction %8 None %7
+%10 = OpLabel
+%13 = OpLoad %3 %1
+%11 = OpExtInst %5 %12 Determinant %13
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_F(BuiltinBuilderTest, Call_Transpose) {
+  auto* var = Global("var", ty.mat2x3<f32>(), ast::StorageClass::kPrivate);
+  auto* expr = Call("transpose", "var");
+  auto* func = Func("a_func", {}, ty.void_(),
+                    {
+                        Assign(Phony(), expr),
+                    });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  EXPECT_EQ(DumpBuilder(b), R"(OpName %1 "var"
+OpName %9 "a_func"
+%5 = OpTypeFloat 32
+%4 = OpTypeVector %5 3
+%3 = OpTypeMatrix %4 2
+%2 = OpTypePointer Private %3
+%6 = OpConstantNull %3
+%1 = OpVariable %2 Private %6
+%8 = OpTypeVoid
+%7 = OpTypeFunction %8
+%13 = OpTypeVector %5 2
+%12 = OpTypeMatrix %13 3
+%9 = OpFunction %8 None %7
+%10 = OpLabel
+%14 = OpLoad %3 %1
+%11 = OpTranspose %12 %14
+OpReturn
+OpFunctionEnd
+)");
+}
+
+TEST_F(BuiltinBuilderTest, Call_ArrayLength) {
+  auto* s = Structure("my_struct", {Member("a", ty.array<f32>(4))},
+                      {create<ast::StructBlockAttribute>()});
+  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(1),
+             create<ast::GroupAttribute>(2),
+         });
+  auto* expr = Call("arrayLength", AddressOf(MemberAccessor("b", "a")));
+
+  Func("a_func", {}, ty.void_(),
+       ast::StatementList{
+           CallStmt(expr),
+       },
+       ast::AttributeList{
+           Stage(ast::PipelineStage::kFragment),
+       });
+
+  spirv::Builder& b = SanitizeAndBuild();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  auto* expected_types = R"(%5 = OpTypeFloat 32
+%4 = OpTypeRuntimeArray %5
+%3 = OpTypeStruct %4
+%2 = OpTypePointer StorageBuffer %3
+%1 = OpVariable %2 StorageBuffer
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%11 = OpTypeInt 32 0
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  auto* expected_instructions = R"(%10 = OpArrayLength %11 %1 0
+OpReturn
+)";
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+
+TEST_F(BuiltinBuilderTest, Call_ArrayLength_OtherMembersInStruct) {
+  auto* s = Structure("my_struct",
+                      {
+                          Member("z", ty.f32()),
+                          Member(4, "a", ty.array<f32>(4)),
+                      },
+                      {create<ast::StructBlockAttribute>()});
+  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(1),
+             create<ast::GroupAttribute>(2),
+         });
+  auto* expr = Call("arrayLength", AddressOf(MemberAccessor("b", "a")));
+
+  Func("a_func", {}, ty.void_(),
+       ast::StatementList{
+           CallStmt(expr),
+       },
+       ast::AttributeList{
+           Stage(ast::PipelineStage::kFragment),
+       });
+
+  spirv::Builder& b = SanitizeAndBuild();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  auto* expected_types = R"(%4 = OpTypeFloat 32
+%5 = OpTypeRuntimeArray %4
+%3 = OpTypeStruct %4 %5
+%2 = OpTypePointer StorageBuffer %3
+%1 = OpVariable %2 StorageBuffer
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%11 = OpTypeInt 32 0
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  auto* expected_instructions = R"(%10 = OpArrayLength %11 %1 1
+OpReturn
+)";
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+
+TEST_F(BuiltinBuilderTest, Call_ArrayLength_ViaLets) {
+  auto* s = Structure("my_struct", {Member("a", ty.array<f32>(4))},
+                      {create<ast::StructBlockAttribute>()});
+  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(1),
+             create<ast::GroupAttribute>(2),
+         });
+
+  auto* p = Const("p", nullptr, AddressOf("b"));
+  auto* p2 = Const("p2", nullptr, AddressOf(MemberAccessor(Deref(p), "a")));
+  auto* expr = Call("arrayLength", p2);
+
+  Func("a_func", {}, ty.void_(),
+       ast::StatementList{
+           Decl(p),
+           Decl(p2),
+           CallStmt(expr),
+       },
+       ast::AttributeList{
+           Stage(ast::PipelineStage::kFragment),
+       });
+
+  spirv::Builder& b = SanitizeAndBuild();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  auto* expected_types = R"(%5 = OpTypeFloat 32
+%4 = OpTypeRuntimeArray %5
+%3 = OpTypeStruct %4
+%2 = OpTypePointer StorageBuffer %3
+%1 = OpVariable %2 StorageBuffer
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%11 = OpTypeInt 32 0
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  auto* expected_instructions = R"(%10 = OpArrayLength %11 %1 0
+OpReturn
+)";
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+
+TEST_F(BuiltinBuilderTest, Call_ArrayLength_ViaLets_WithPtrNoise) {
+  // [[block]] struct my_struct {
+  //   a : @stride(4) array<f32>;
+  // };
+  // @binding(1) @group(2) var<storage, read> b : my_struct;
+  //
+  // fn a_func() {
+  //   let p = &*&b;
+  //   let p2 = &*p;
+  //   let p3 = &((*p).a);
+  //   arrayLength(&*p3);
+  // }
+  auto* s = Structure("my_struct", {Member("a", ty.array<f32>(4))},
+                      {create<ast::StructBlockAttribute>()});
+  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(1),
+             create<ast::GroupAttribute>(2),
+         });
+
+  auto* p = Const("p", nullptr, AddressOf(Deref(AddressOf("b"))));
+  auto* p2 = Const("p2", nullptr, AddressOf(Deref(p)));
+  auto* p3 = Const("p3", nullptr, AddressOf(MemberAccessor(Deref(p2), "a")));
+  auto* expr = Call("arrayLength", AddressOf(Deref(p3)));
+
+  Func("a_func", {}, ty.void_(),
+       ast::StatementList{
+           Decl(p),
+           Decl(p2),
+           Decl(p3),
+           CallStmt(expr),
+       },
+       ast::AttributeList{
+           Stage(ast::PipelineStage::kFragment),
+       });
+
+  spirv::Builder& b = SanitizeAndBuild();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  auto* expected_types = R"(%5 = OpTypeFloat 32
+%4 = OpTypeRuntimeArray %5
+%3 = OpTypeStruct %4
+%2 = OpTypePointer StorageBuffer %3
+%1 = OpVariable %2 StorageBuffer
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%11 = OpTypeInt 32 0
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  auto* expected_instructions = R"(%10 = OpArrayLength %11 %1 0
+OpReturn
+)";
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+
+TEST_F(BuiltinBuilderTest, Call_AtomicLoad) {
+  // [[block]] struct S {
+  //   u : atomic<u32>;
+  //   i : atomic<i32>;
+  // }
+  //
+  // @binding(1) @group(2) var<storage, read_write> b : S;
+  //
+  // fn a_func() {
+  //   let u : u32 = atomicLoad(&b.u);
+  //   let i : i32 = atomicLoad(&b.i);
+  // }
+  auto* s = Structure("S",
+                      {
+                          Member("u", ty.atomic<u32>()),
+                          Member("i", ty.atomic<i32>()),
+                      },
+                      {create<ast::StructBlockAttribute>()});
+  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(1),
+             create<ast::GroupAttribute>(2),
+         });
+
+  Func("a_func", {}, ty.void_(),
+       ast::StatementList{
+           Decl(Const("u", ty.u32(),
+                      Call("atomicLoad", AddressOf(MemberAccessor("b", "u"))))),
+           Decl(Const("i", ty.i32(),
+                      Call("atomicLoad", AddressOf(MemberAccessor("b", "i"))))),
+       },
+       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = SanitizeAndBuild();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  auto* expected_types = R"(%4 = OpTypeInt 32 0
+%5 = OpTypeInt 32 1
+%3 = OpTypeStruct %4 %5
+%2 = OpTypePointer StorageBuffer %3
+%1 = OpVariable %2 StorageBuffer
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%11 = OpConstant %4 1
+%12 = OpConstant %4 0
+%14 = OpTypePointer StorageBuffer %4
+%18 = OpTypePointer StorageBuffer %5
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  auto* expected_instructions = R"(%15 = OpAccessChain %14 %1 %12
+%10 = OpAtomicLoad %4 %15 %11 %12
+%19 = OpAccessChain %18 %1 %11
+%16 = OpAtomicLoad %5 %19 %11 %12
+OpReturn
+)";
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+
+TEST_F(BuiltinBuilderTest, Call_AtomicStore) {
+  // [[block]] struct S {
+  //   u : atomic<u32>;
+  //   i : atomic<i32>;
+  // }
+  //
+  // @binding(1) @group(2) var<storage, read_write> b : S;
+  //
+  // fn a_func() {
+  //   var u = 1u;
+  //   var i = 2;
+  //   atomicStore(&b.u, u);
+  //   atomicStore(&b.i, i);
+  // }
+  auto* s = Structure("S",
+                      {
+                          Member("u", ty.atomic<u32>()),
+                          Member("i", ty.atomic<i32>()),
+                      },
+                      {create<ast::StructBlockAttribute>()});
+  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(1),
+             create<ast::GroupAttribute>(2),
+         });
+
+  Func("a_func", {}, ty.void_(),
+       ast::StatementList{
+           Decl(Var("u", nullptr, Expr(1u))),
+           Decl(Var("i", nullptr, Expr(2))),
+           CallStmt(
+               Call("atomicStore", AddressOf(MemberAccessor("b", "u")), "u")),
+           CallStmt(
+               Call("atomicStore", AddressOf(MemberAccessor("b", "i")), "i")),
+       },
+       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = SanitizeAndBuild();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  auto* expected_types = R"(%4 = OpTypeInt 32 0
+%5 = OpTypeInt 32 1
+%3 = OpTypeStruct %4 %5
+%2 = OpTypePointer StorageBuffer %3
+%1 = OpVariable %2 StorageBuffer
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%10 = OpConstant %4 1
+%12 = OpTypePointer Function %4
+%13 = OpConstantNull %4
+%14 = OpConstant %5 2
+%16 = OpTypePointer Function %5
+%17 = OpConstantNull %5
+%19 = OpConstant %4 0
+%21 = OpTypePointer StorageBuffer %4
+%26 = OpTypePointer StorageBuffer %5
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  auto* expected_instructions = R"(OpStore %11 %10
+OpStore %15 %14
+%22 = OpAccessChain %21 %1 %19
+%23 = OpLoad %4 %11
+OpAtomicStore %22 %10 %19 %23
+%27 = OpAccessChain %26 %1 %10
+%28 = OpLoad %5 %15
+OpAtomicStore %27 %10 %19 %28
+OpReturn
+)";
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+
+using Builtin_Builtin_AtomicRMW_i32 = BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_AtomicRMW_i32, Test) {
+  // [[block]] struct S {
+  //   v : atomic<i32>;
+  // }
+  //
+  // @binding(1) @group(2) var<storage, read_write> b : S;
+  //
+  // fn a_func() {
+  //   var v = 10;
+  //   let x : i32 = atomicOP(&b.v, v);
+  // }
+  auto* s = Structure("S",
+                      {
+                          Member("v", ty.atomic<i32>()),
+                      },
+                      {create<ast::StructBlockAttribute>()});
+  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(1),
+             create<ast::GroupAttribute>(2),
+         });
+
+  Func("a_func", {}, ty.void_(),
+       ast::StatementList{
+           Decl(Var("v", nullptr, Expr(10))),
+           Decl(Const("x", ty.i32(),
+                      Call(GetParam().name, AddressOf(MemberAccessor("b", "v")),
+                           "v"))),
+       },
+       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = SanitizeAndBuild();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  std::string expected_types = R"(%4 = OpTypeInt 32 1
+%3 = OpTypeStruct %4
+%2 = OpTypePointer StorageBuffer %3
+%1 = OpVariable %2 StorageBuffer
+%6 = OpTypeVoid
+%5 = OpTypeFunction %6
+%9 = OpConstant %4 10
+%11 = OpTypePointer Function %4
+%12 = OpConstantNull %4
+%14 = OpTypeInt 32 0
+%15 = OpConstant %14 1
+%16 = OpConstant %14 0
+%18 = OpTypePointer StorageBuffer %4
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  std::string expected_instructions = R"(OpStore %10 %9
+%19 = OpAccessChain %18 %1 %16
+%20 = OpLoad %4 %10
+)";
+  expected_instructions += "%13 = " + GetParam().op + " %4 %19 %15 %16 %20\n";
+  expected_instructions += "OpReturn\n";
+
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+INSTANTIATE_TEST_SUITE_P(
+    BuiltinBuilderTest,
+    Builtin_Builtin_AtomicRMW_i32,
+    testing::Values(BuiltinData{"atomicAdd", "OpAtomicIAdd"},
+                    BuiltinData{"atomicMax", "OpAtomicSMax"},
+                    BuiltinData{"atomicMin", "OpAtomicSMin"},
+                    BuiltinData{"atomicAnd", "OpAtomicAnd"},
+                    BuiltinData{"atomicOr", "OpAtomicOr"},
+                    BuiltinData{"atomicXor", "OpAtomicXor"}));
+
+using Builtin_Builtin_AtomicRMW_u32 = BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_AtomicRMW_u32, Test) {
+  // [[block]] struct S {
+  //   v : atomic<u32>;
+  // }
+  //
+  // @binding(1) @group(2) var<storage, read_write> b : S;
+  //
+  // fn a_func() {
+  //   var v = 10u;
+  //   let x : u32 = atomicOP(&b.v, v);
+  // }
+  auto* s = Structure("S",
+                      {
+                          Member("v", ty.atomic<u32>()),
+                      },
+                      {create<ast::StructBlockAttribute>()});
+  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(1),
+             create<ast::GroupAttribute>(2),
+         });
+
+  Func("a_func", {}, ty.void_(),
+       ast::StatementList{
+           Decl(Var("v", nullptr, Expr(10u))),
+           Decl(Const("x", ty.u32(),
+                      Call(GetParam().name, AddressOf(MemberAccessor("b", "v")),
+                           "v"))),
+       },
+       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = SanitizeAndBuild();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  std::string expected_types = R"(%4 = OpTypeInt 32 0
+%3 = OpTypeStruct %4
+%2 = OpTypePointer StorageBuffer %3
+%1 = OpVariable %2 StorageBuffer
+%6 = OpTypeVoid
+%5 = OpTypeFunction %6
+%9 = OpConstant %4 10
+%11 = OpTypePointer Function %4
+%12 = OpConstantNull %4
+%14 = OpConstant %4 1
+%15 = OpConstant %4 0
+%17 = OpTypePointer StorageBuffer %4
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  std::string expected_instructions = R"(OpStore %10 %9
+%18 = OpAccessChain %17 %1 %15
+%19 = OpLoad %4 %10
+)";
+  expected_instructions += "%13 = " + GetParam().op + " %4 %18 %14 %15 %19\n";
+  expected_instructions += "OpReturn\n";
+
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+INSTANTIATE_TEST_SUITE_P(
+    BuiltinBuilderTest,
+    Builtin_Builtin_AtomicRMW_u32,
+    testing::Values(BuiltinData{"atomicAdd", "OpAtomicIAdd"},
+                    BuiltinData{"atomicMax", "OpAtomicUMax"},
+                    BuiltinData{"atomicMin", "OpAtomicUMin"},
+                    BuiltinData{"atomicAnd", "OpAtomicAnd"},
+                    BuiltinData{"atomicOr", "OpAtomicOr"},
+                    BuiltinData{"atomicXor", "OpAtomicXor"}));
+
+TEST_F(BuiltinBuilderTest, Call_AtomicExchange) {
+  // [[block]] struct S {
+  //   u : atomic<u32>;
+  //   i : atomic<i32>;
+  // }
+  //
+  // @binding(1) @group(2) var<storage, read_write> b : S;
+  //
+  // fn a_func() {
+  //   var u = 10u;
+  //   var i = 10;
+  //   let r : u32 = atomicExchange(&b.u, u);
+  //   let s : i32 = atomicExchange(&b.i, i);
+  // }
+  auto* s = Structure("S",
+                      {
+                          Member("u", ty.atomic<u32>()),
+                          Member("i", ty.atomic<i32>()),
+                      },
+                      {create<ast::StructBlockAttribute>()});
+  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(1),
+             create<ast::GroupAttribute>(2),
+         });
+
+  Func("a_func", {}, ty.void_(),
+       ast::StatementList{
+           Decl(Var("u", nullptr, Expr(10u))),
+           Decl(Var("i", nullptr, Expr(10))),
+           Decl(Const("r", ty.u32(),
+                      Call("atomicExchange",
+                           AddressOf(MemberAccessor("b", "u")), "u"))),
+           Decl(Const("s", ty.i32(),
+                      Call("atomicExchange",
+                           AddressOf(MemberAccessor("b", "i")), "i"))),
+       },
+       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = SanitizeAndBuild();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  auto* expected_types = R"(%4 = OpTypeInt 32 0
+%5 = OpTypeInt 32 1
+%3 = OpTypeStruct %4 %5
+%2 = OpTypePointer StorageBuffer %3
+%1 = OpVariable %2 StorageBuffer
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%10 = OpConstant %4 10
+%12 = OpTypePointer Function %4
+%13 = OpConstantNull %4
+%14 = OpConstant %5 10
+%16 = OpTypePointer Function %5
+%17 = OpConstantNull %5
+%19 = OpConstant %4 1
+%20 = OpConstant %4 0
+%22 = OpTypePointer StorageBuffer %4
+%27 = OpTypePointer StorageBuffer %5
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  auto* expected_instructions = R"(OpStore %11 %10
+OpStore %15 %14
+%23 = OpAccessChain %22 %1 %20
+%24 = OpLoad %4 %11
+%18 = OpAtomicExchange %4 %23 %19 %20 %24
+%28 = OpAccessChain %27 %1 %19
+%29 = OpLoad %5 %15
+%25 = OpAtomicExchange %5 %28 %19 %20 %29
+OpReturn
+)";
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+
+TEST_F(BuiltinBuilderTest, Call_AtomicCompareExchangeWeak) {
+  // [[block]] struct S {
+  //   u : atomic<u32>;
+  //   i : atomic<i32>;
+  // }
+  //
+  // @binding(1) @group(2) var<storage, read_write> b : S;
+  //
+  // fn a_func() {
+  //   let u : vec2<u32> = atomicCompareExchangeWeak(&b.u, 10u);
+  //   let i : vec2<i32> = atomicCompareExchangeWeak(&b.i, 10);
+  // }
+  auto* s = Structure("S",
+                      {
+                          Member("u", ty.atomic<u32>()),
+                          Member("i", ty.atomic<i32>()),
+                      },
+                      {create<ast::StructBlockAttribute>()});
+  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+         ast::AttributeList{
+             create<ast::BindingAttribute>(1),
+             create<ast::GroupAttribute>(2),
+         });
+
+  Func("a_func", {}, ty.void_(),
+       ast::StatementList{
+           Decl(Const("u", ty.vec2<u32>(),
+                      Call("atomicCompareExchangeWeak",
+                           AddressOf(MemberAccessor("b", "u")), 10u, 20u))),
+           Decl(Const("i", ty.vec2<i32>(),
+                      Call("atomicCompareExchangeWeak",
+                           AddressOf(MemberAccessor("b", "i")), 10, 20))),
+       },
+       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = SanitizeAndBuild();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  auto* expected_types = R"(%4 = OpTypeInt 32 0
+%5 = OpTypeInt 32 1
+%3 = OpTypeStruct %4 %5
+%2 = OpTypePointer StorageBuffer %3
+%1 = OpVariable %2 StorageBuffer
+%7 = OpTypeVoid
+%6 = OpTypeFunction %7
+%11 = OpTypeVector %4 2
+%12 = OpConstant %4 1
+%13 = OpConstant %4 0
+%15 = OpTypePointer StorageBuffer %4
+%17 = OpConstant %4 20
+%18 = OpConstant %4 10
+%19 = OpTypeBool
+%24 = OpTypeVector %5 2
+%26 = OpTypePointer StorageBuffer %5
+%28 = OpConstant %5 20
+%29 = OpConstant %5 10
+%32 = OpConstant %5 0
+%33 = OpConstant %5 1
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  auto* expected_instructions = R"(%16 = OpAccessChain %15 %1 %13
+%20 = OpAtomicCompareExchange %4 %16 %12 %13 %13 %17 %18
+%21 = OpIEqual %19 %20 %17
+%22 = OpSelect %4 %21 %12 %13
+%10 = OpCompositeConstruct %11 %20 %22
+%27 = OpAccessChain %26 %1 %12
+%30 = OpAtomicCompareExchange %5 %27 %12 %13 %13 %28 %29
+%31 = OpIEqual %19 %30 %28
+%34 = OpSelect %5 %31 %33 %32
+%23 = OpCompositeConstruct %24 %30 %34
+OpReturn
+)";
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+
+using Builtin_Builtin_DataPacking_Test =
+    BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_DataPacking_Test, Binary) {
+  auto param = GetParam();
+
+  bool pack4 = param.name == "pack4x8snorm" || param.name == "pack4x8unorm";
+  auto* call = pack4 ? Call(param.name, vec4<float>(1.0f, 1.0f, 1.0f, 1.0f))
+                     : Call(param.name, vec2<float>(1.0f, 1.0f));
+  auto* func = Func("a_func", {}, ty.void_(), {CallStmt(call)});
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  if (pack4) {
+    EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeInt 32 0
+%9 = OpTypeFloat 32
+%8 = OpTypeVector %9 4
+%10 = OpConstant %9 1
+%11 = OpConstantComposite %8 %10 %10 %10 %10
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 )" + param.op +
+                                  R"( %11
+OpReturn
+OpFunctionEnd
+)");
+  } else {
+    EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeInt 32 0
+%9 = OpTypeFloat 32
+%8 = OpTypeVector %9 2
+%10 = OpConstant %9 1
+%11 = OpConstantComposite %8 %10 %10
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %7 )" + param.op +
+                                  R"( %11
+OpReturn
+OpFunctionEnd
+)");
+  }
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    BuiltinBuilderTest,
+    Builtin_Builtin_DataPacking_Test,
+    testing::Values(BuiltinData{"pack4x8snorm", "PackSnorm4x8"},
+                    BuiltinData{"pack4x8unorm", "PackUnorm4x8"},
+                    BuiltinData{"pack2x16snorm", "PackSnorm2x16"},
+                    BuiltinData{"pack2x16unorm", "PackUnorm2x16"},
+                    BuiltinData{"pack2x16float", "PackHalf2x16"}));
+
+using Builtin_Builtin_DataUnpacking_Test =
+    BuiltinBuilderTestWithParam<BuiltinData>;
+TEST_P(Builtin_Builtin_DataUnpacking_Test, Binary) {
+  auto param = GetParam();
+
+  bool pack4 = param.name == "unpack4x8snorm" || param.name == "unpack4x8unorm";
+  auto* func = Func("a_func", {}, ty.void_(), {CallStmt(Call(param.name, 1u))});
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
+
+  if (pack4) {
+    EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeFloat 32
+%6 = OpTypeVector %7 4
+%9 = OpTypeInt 32 0
+%10 = OpConstant %9 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 )" + param.op +
+                                  R"( %10
+OpReturn
+OpFunctionEnd
+)");
+  } else {
+    EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
+OpName %3 "a_func"
+%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%7 = OpTypeFloat 32
+%6 = OpTypeVector %7 2
+%9 = OpTypeInt 32 0
+%10 = OpConstant %9 1
+%3 = OpFunction %2 None %1
+%4 = OpLabel
+%5 = OpExtInst %6 %8 )" + param.op +
+                                  R"( %10
+OpReturn
+OpFunctionEnd
+)");
+  }
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    BuiltinBuilderTest,
+    Builtin_Builtin_DataUnpacking_Test,
+    testing::Values(BuiltinData{"unpack4x8snorm", "UnpackSnorm4x8"},
+                    BuiltinData{"unpack4x8unorm", "UnpackUnorm4x8"},
+                    BuiltinData{"unpack2x16snorm", "UnpackSnorm2x16"},
+                    BuiltinData{"unpack2x16unorm", "UnpackUnorm2x16"},
+                    BuiltinData{"unpack2x16float", "UnpackHalf2x16"}));
+
+TEST_F(BuiltinBuilderTest, Call_WorkgroupBarrier) {
+  Func("f", {}, ty.void_(),
+       ast::StatementList{
+           CallStmt(Call("workgroupBarrier")),
+       },
+       ast::AttributeList{
+           Stage(ast::PipelineStage::kCompute),
+           WorkgroupSize(1),
+       });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  auto* expected_types = R"(%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeInt 32 0
+%7 = OpConstant %6 2
+%8 = OpConstant %6 264
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  auto* expected_instructions = R"(OpControlBarrier %7 %7 %8
+OpReturn
+)";
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+
+TEST_F(BuiltinBuilderTest, Call_StorageBarrier) {
+  Func("f", {}, ty.void_(),
+       ast::StatementList{
+           CallStmt(Call("storageBarrier")),
+       },
+       ast::AttributeList{
+           Stage(ast::PipelineStage::kCompute),
+           WorkgroupSize(1),
+       });
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  ASSERT_EQ(b.functions().size(), 1u);
+
+  auto* expected_types = R"(%2 = OpTypeVoid
+%1 = OpTypeFunction %2
+%6 = OpTypeInt 32 0
+%7 = OpConstant %6 2
+%8 = OpConstant %6 72
+)";
+  auto got_types = DumpInstructions(b.types());
+  EXPECT_EQ(expected_types, got_types);
+
+  auto* expected_instructions = R"(OpControlBarrier %7 %7 %8
+OpReturn
+)";
+  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
+  EXPECT_EQ(expected_instructions, got_instructions);
+
+  Validate(b);
+}
+
+}  // namespace
+}  // namespace spirv
+}  // namespace writer
+}  // namespace tint
diff --git a/src/writer/spirv/builder_builtin_texture_test.cc b/src/writer/spirv/builder_builtin_texture_test.cc
new file mode 100644
index 0000000..d26f288
--- /dev/null
+++ b/src/writer/spirv/builder_builtin_texture_test.cc
@@ -0,0 +1,3755 @@
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "gmock/gmock.h"
+#include "src/ast/builtin_texture_helper_test.h"
+#include "src/ast/call_statement.h"
+#include "src/ast/stage_attribute.h"
+#include "src/writer/spirv/spv_dump.h"
+#include "src/writer/spirv/test_helper.h"
+
+namespace tint {
+namespace writer {
+namespace spirv {
+namespace {
+
+struct expected_texture_overload_spirv {
+  std::string types;
+  std::string instructions;
+  std::string capabilities;
+};
+
+expected_texture_overload_spirv expected_texture_overload(
+    ast::builtin::test::ValidTextureOverload overload) {
+  using ValidTextureOverload = ast::builtin::test::ValidTextureOverload;
+  switch (overload) {
+    case ValidTextureOverload::kDimensions1d:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+%11 = OpConstant %9 0
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %10 %11
+)",
+          R"(
+OpCapability Sampled1D
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensions2d:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpConstant %10 0
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %11 %12
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensions2dLevel:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpConstant %10 1
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %11 %12
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensions2dArray:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpTypeVector %10 3
+%14 = OpConstant %10 0
+)",
+          R"(
+%13 = OpLoad %3 %1
+%11 = OpImageQuerySizeLod %12 %13 %14
+%8 = OpVectorShuffle %9 %11 %11 0 1
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensions2dArrayLevel:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpTypeVector %10 3
+%14 = OpConstant %10 1
+)",
+          R"(
+%13 = OpLoad %3 %1
+%11 = OpImageQuerySizeLod %12 %13 %14
+%8 = OpVectorShuffle %9 %11 %11 0 1
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensions3d:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 3
+%12 = OpConstant %10 0
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %11 %12
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensions3dLevel:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 3
+%12 = OpConstant %10 1
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %11 %12
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsCube:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpConstant %10 0
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %11 %12
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsCubeLevel:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpConstant %10 1
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %11 %12
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsCubeArray:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpTypeVector %10 3
+%14 = OpConstant %10 0
+)",
+          R"(
+%13 = OpLoad %3 %1
+%11 = OpImageQuerySizeLod %12 %13 %14
+%8 = OpVectorShuffle %9 %11 %11 0 1
+)",
+          R"(
+OpCapability SampledCubeArray
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsCubeArrayLevel:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpTypeVector %10 3
+%14 = OpConstant %10 1
+)",
+          R"(
+%13 = OpLoad %3 %1
+%11 = OpImageQuerySizeLod %12 %13 %14
+%8 = OpVectorShuffle %9 %11 %11 0 1
+)",
+          R"(
+OpCapability SampledCubeArray
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsMultisampled2d:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySize %9 %11
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsDepth2d:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpConstant %10 0
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %11 %12
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsDepth2dLevel:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpConstant %10 1
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %11 %12
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsDepth2dArray:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpTypeVector %10 3
+%14 = OpConstant %10 0
+)",
+          R"(
+%13 = OpLoad %3 %1
+%11 = OpImageQuerySizeLod %12 %13 %14
+%8 = OpVectorShuffle %9 %11 %11 0 1
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpTypeVector %10 3
+%14 = OpConstant %10 1
+)",
+          R"(
+%13 = OpLoad %3 %1
+%11 = OpImageQuerySizeLod %12 %13 %14
+%8 = OpVectorShuffle %9 %11 %11 0 1
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsDepthCube:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpConstant %10 0
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %11 %12
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsDepthCubeLevel:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpConstant %10 1
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySizeLod %9 %11 %12
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsDepthCubeArray:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpTypeVector %10 3
+%14 = OpConstant %10 0
+)",
+          R"(
+%13 = OpLoad %3 %1
+%11 = OpImageQuerySizeLod %12 %13 %14
+%8 = OpVectorShuffle %9 %11 %11 0 1
+)",
+          R"(
+OpCapability SampledCubeArray
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpTypeVector %10 3
+%14 = OpConstant %10 1
+)",
+          R"(
+%13 = OpLoad %3 %1
+%11 = OpImageQuerySizeLod %12 %13 %14
+%8 = OpVectorShuffle %9 %11 %11 0 1
+)",
+          R"(
+OpCapability SampledCubeArray
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsDepthMultisampled2d:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 1 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySize %9 %11
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsStorageWO1d:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 1D 0 0 0 2 Rgba32f
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQuerySize %9 %10
+)",
+          R"(
+OpCapability Image1D
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsStorageWO2d:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 2 Rgba32f
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySize %9 %11
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsStorageWO2dArray:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 2 Rgba32f
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 2
+%12 = OpTypeVector %10 3
+)",
+          R"(
+%13 = OpLoad %3 %1
+%11 = OpImageQuerySize %12 %13
+%8 = OpVectorShuffle %9 %11 %11 0 1
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kDimensionsStorageWO3d:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 2 Rgba32f
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeInt 32 1
+%9 = OpTypeVector %10 3
+)",
+          R"(
+%11 = OpLoad %3 %1
+%8 = OpImageQuerySize %9 %11
+)",
+          R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kGather2dF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 0
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageGather %9 %13 %17 %19
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGather2dOffsetF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 0
+%20 = OpTypeVector %18 2
+%21 = OpConstant %18 3
+%22 = OpConstant %18 4
+%23 = OpConstantComposite %20 %21 %22
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageGather %9 %13 %17 %19 ConstOffset %23
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGather2dArrayF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpConstant %18 0
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageGather %9 %13 %20 %21
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGather2dArrayOffsetF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpConstant %18 0
+%22 = OpTypeVector %18 2
+%23 = OpConstant %18 4
+%24 = OpConstant %18 5
+%25 = OpConstantComposite %22 %23 %24
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageGather %9 %13 %20 %21 ConstOffset %25
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherCubeF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpTypeInt 32 1
+%20 = OpConstant %19 0
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageGather %9 %13 %18 %20
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherCubeArrayF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 4
+%21 = OpConstant %18 0
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %9 %14 %15 %16 %17
+%8 = OpImageGather %9 %13 %20 %21
+)",
+              R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kGatherDepth2dF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 0
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageGather %9 %13 %17 %19
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherDepth2dOffsetF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 0
+%20 = OpTypeVector %18 2
+%21 = OpConstant %18 3
+%22 = OpConstant %18 4
+%23 = OpConstantComposite %20 %21 %22
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageGather %9 %13 %17 %19 ConstOffset %23
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherDepth2dArrayF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpConstant %18 0
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageGather %9 %13 %20 %21
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpConstant %18 0
+%22 = OpTypeVector %18 2
+%23 = OpConstant %18 4
+%24 = OpConstant %18 5
+%25 = OpConstantComposite %22 %23 %24
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageGather %9 %13 %20 %21 ConstOffset %25
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherDepthCubeF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpTypeInt 32 1
+%20 = OpConstant %19 0
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageGather %9 %13 %18 %20
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherDepthCubeArrayF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 4
+%21 = OpConstant %18 0
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %9 %14 %15 %16 %17
+%8 = OpImageGather %9 %13 %20 %21
+)",
+              R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kGatherCompareDepth2dF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpConstant %4 3
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageDrefGather %9 %13 %17 %18
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpConstant %4 3
+%20 = OpTypeInt 32 1
+%19 = OpTypeVector %20 2
+%21 = OpConstant %20 4
+%22 = OpConstant %20 5
+%23 = OpConstantComposite %19 %21 %22
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageDrefGather %9 %13 %17 %18 ConstOffset %23
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherCompareDepth2dArrayF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpConstant %4 4
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageDrefGather %9 %13 %20 %21
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpConstant %4 4
+%22 = OpTypeVector %18 2
+%23 = OpConstant %18 5
+%24 = OpConstant %18 6
+%25 = OpConstantComposite %22 %23 %24
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageDrefGather %9 %13 %20 %21 ConstOffset %25
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherCompareDepthCubeF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpConstant %4 4
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageDrefGather %9 %13 %18 %19
+)",
+              R"(
+)"};
+    case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 4
+%21 = OpConstant %4 5
+)",
+              R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %9 %14 %15 %16 %17
+%8 = OpImageDrefGather %9 %13 %20 %21
+)",
+              R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kNumLayers2dArray:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+%11 = OpTypeVector %9 3
+%13 = OpConstant %9 0
+)",
+              R"(
+%12 = OpLoad %3 %1
+%10 = OpImageQuerySizeLod %11 %12 %13
+%8 = OpCompositeExtract %9 %10 2
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLayersCubeArray:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+%11 = OpTypeVector %9 3
+%13 = OpConstant %9 0
+)",
+              R"(
+%12 = OpLoad %3 %1
+%10 = OpImageQuerySizeLod %11 %12 %13
+%8 = OpCompositeExtract %9 %10 2
+)",
+              R"(
+OpCapability SampledCubeArray
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLayersDepth2dArray:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+%11 = OpTypeVector %9 3
+%13 = OpConstant %9 0
+)",
+              R"(
+%12 = OpLoad %3 %1
+%10 = OpImageQuerySizeLod %11 %12 %13
+%8 = OpCompositeExtract %9 %10 2
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLayersDepthCubeArray:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+%11 = OpTypeVector %9 3
+%13 = OpConstant %9 0
+)",
+              R"(
+%12 = OpLoad %3 %1
+%10 = OpImageQuerySizeLod %11 %12 %13
+%8 = OpCompositeExtract %9 %10 2
+)",
+              R"(
+OpCapability SampledCubeArray
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLayersStorageWO2dArray:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 2 Rgba32f
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+%11 = OpTypeVector %9 3
+)",
+              R"(
+%12 = OpLoad %3 %1
+%10 = OpImageQuerySize %11 %12
+%8 = OpCompositeExtract %9 %10 2
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLevels2d:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQueryLevels %9 %10
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLevels2dArray:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQueryLevels %9 %10
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLevels3d:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQueryLevels %9 %10
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLevelsCube:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQueryLevels %9 %10
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLevelsCubeArray:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQueryLevels %9 %10
+)",
+              R"(
+OpCapability SampledCubeArray
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLevelsDepth2d:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQueryLevels %9 %10
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLevelsDepth2dArray:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQueryLevels %9 %10
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLevelsDepthCube:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQueryLevels %9 %10
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumLevelsDepthCubeArray:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQueryLevels %9 %10
+)",
+              R"(
+OpCapability SampledCubeArray
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumSamplesMultisampled2d:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQuerySamples %9 %10
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
+      return {R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 1 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeInt 32 1
+)",
+              R"(
+%10 = OpLoad %3 %1
+%8 = OpImageQuerySamples %9 %10
+)",
+              R"(
+OpCapability ImageQuery
+)"};
+    case ValidTextureOverload::kSample1dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpConstant %4 1
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %14
+)",
+          R"(
+OpCapability Sampled1D
+)"};
+    case ValidTextureOverload::kSample2dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %17
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSample2dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%19 = OpTypeInt 32 1
+%18 = OpTypeVector %19 2
+%20 = OpConstant %19 3
+%21 = OpConstant %19 4
+%22 = OpConstantComposite %18 %20 %21
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %17 ConstOffset %22
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSample2dArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageSampleImplicitLod %9 %13 %20
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSample2dArrayOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpTypeVector %18 2
+%22 = OpConstant %18 4
+%23 = OpConstant %18 5
+%24 = OpConstantComposite %21 %22 %23
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageSampleImplicitLod %9 %13 %20 ConstOffset %24
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSample3dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %18
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSample3dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%20 = OpTypeInt 32 1
+%19 = OpTypeVector %20 3
+%21 = OpConstant %20 4
+%22 = OpConstant %20 5
+%23 = OpConstant %20 6
+%24 = OpConstantComposite %19 %21 %22 %23
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %18 ConstOffset %24
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCubeF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %18
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCubeArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 4
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %9 %14 %15 %16 %17
+%8 = OpImageSampleImplicitLod %9 %13 %20
+)",
+          R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kSampleDepth2dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpTypeVector %4 2
+%16 = OpConstant %4 1
+%17 = OpConstant %4 2
+%18 = OpConstantComposite %15 %16 %17
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%9 = OpImageSampleImplicitLod %10 %14 %18
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleDepth2dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpTypeVector %4 2
+%16 = OpConstant %4 1
+%17 = OpConstant %4 2
+%18 = OpConstantComposite %15 %16 %17
+%20 = OpTypeInt 32 1
+%19 = OpTypeVector %20 2
+%21 = OpConstant %20 3
+%22 = OpConstant %20 4
+%23 = OpConstantComposite %19 %21 %22
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%9 = OpImageSampleImplicitLod %10 %14 %18 ConstOffset %23
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleDepth2dArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpTypeVector %4 3
+%16 = OpConstant %4 1
+%17 = OpConstant %4 2
+%19 = OpTypeInt 32 1
+%20 = OpConstant %19 3
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%18 = OpConvertSToF %4 %20
+%21 = OpCompositeConstruct %15 %16 %17 %18
+%9 = OpImageSampleImplicitLod %10 %14 %21
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpTypeVector %4 3
+%16 = OpConstant %4 1
+%17 = OpConstant %4 2
+%19 = OpTypeInt 32 1
+%20 = OpConstant %19 3
+%22 = OpTypeVector %19 2
+%23 = OpConstant %19 4
+%24 = OpConstant %19 5
+%25 = OpConstantComposite %22 %23 %24
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%18 = OpConvertSToF %4 %20
+%21 = OpCompositeConstruct %15 %16 %17 %18
+%9 = OpImageSampleImplicitLod %10 %14 %21 ConstOffset %25
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleDepthCubeF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpTypeVector %4 3
+%16 = OpConstant %4 1
+%17 = OpConstant %4 2
+%18 = OpConstant %4 3
+%19 = OpConstantComposite %15 %16 %17 %18
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%9 = OpImageSampleImplicitLod %10 %14 %19
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleDepthCubeArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%19 = OpTypeInt 32 1
+%20 = OpConstant %19 4
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%18 = OpConvertSToF %4 %20
+%21 = OpCompositeConstruct %10 %15 %16 %17 %18
+%9 = OpImageSampleImplicitLod %10 %14 %21
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kSampleBias2dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpConstant %4 3
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %17 Bias %18
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleBias2dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpConstant %4 3
+%20 = OpTypeInt 32 1
+%19 = OpTypeVector %20 2
+%21 = OpConstant %20 4
+%22 = OpConstant %20 5
+%23 = OpConstantComposite %19 %21 %22
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %17 Bias|ConstOffset %18 %23
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleBias2dArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 4
+%21 = OpConstant %4 3
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageSampleImplicitLod %9 %13 %20 Bias %21
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpConstant %4 4
+%22 = OpTypeVector %18 2
+%23 = OpConstant %18 5
+%24 = OpConstant %18 6
+%25 = OpConstantComposite %22 %23 %24
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageSampleImplicitLod %9 %13 %20 Bias|ConstOffset %21 %25
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleBias3dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpConstant %4 4
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %18 Bias %19
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleBias3dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpConstant %4 4
+%21 = OpTypeInt 32 1
+%20 = OpTypeVector %21 3
+%22 = OpConstant %21 5
+%23 = OpConstant %21 6
+%24 = OpConstant %21 7
+%25 = OpConstantComposite %20 %22 %23 %24
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %18 Bias|ConstOffset %19 %25
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleBiasCubeF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpConstant %4 4
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleImplicitLod %9 %13 %18 Bias %19
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleBiasCubeArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpConstant %4 4
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %9 %14 %15 %16 %17
+%8 = OpImageSampleImplicitLod %9 %13 %20 Bias %21
+)",
+          R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kSampleLevel2dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpConstant %4 3
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleExplicitLod %9 %13 %17 Lod %18
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevel2dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpConstant %4 3
+%20 = OpTypeInt 32 1
+%19 = OpTypeVector %20 2
+%21 = OpConstant %20 4
+%22 = OpConstant %20 5
+%23 = OpConstantComposite %19 %21 %22
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleExplicitLod %9 %13 %17 Lod|ConstOffset %18 %23
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevel2dArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpConstant %4 4
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageSampleExplicitLod %9 %13 %20 Lod %21
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpConstant %4 4
+%22 = OpTypeVector %18 2
+%23 = OpConstant %18 5
+%24 = OpConstant %18 6
+%25 = OpConstantComposite %22 %23 %24
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageSampleExplicitLod %9 %13 %20 Lod|ConstOffset %21 %25
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevel3dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpConstant %4 4
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleExplicitLod %9 %13 %18 Lod %19
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevel3dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpConstant %4 4
+%21 = OpTypeInt 32 1
+%20 = OpTypeVector %21 3
+%22 = OpConstant %21 5
+%23 = OpConstant %21 6
+%24 = OpConstant %21 7
+%25 = OpConstantComposite %20 %22 %23 %24
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleExplicitLod %9 %13 %18 Lod|ConstOffset %19 %25
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevelCubeF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpConstant %4 4
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleExplicitLod %9 %13 %18 Lod %19
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevelCubeArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 4
+%21 = OpConstant %4 5
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %9 %14 %15 %16 %17
+%8 = OpImageSampleExplicitLod %9 %13 %20 Lod %21
+)",
+          R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kSampleLevelDepth2dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpTypeVector %4 2
+%16 = OpConstant %4 1
+%17 = OpConstant %4 2
+%18 = OpConstantComposite %15 %16 %17
+%20 = OpTypeInt 32 1
+%21 = OpConstant %20 3
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%19 = OpConvertSToF %4 %21
+%9 = OpImageSampleExplicitLod %10 %14 %18 Lod %19
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpTypeVector %4 2
+%16 = OpConstant %4 1
+%17 = OpConstant %4 2
+%18 = OpConstantComposite %15 %16 %17
+%20 = OpTypeInt 32 1
+%21 = OpConstant %20 3
+%22 = OpTypeVector %20 2
+%23 = OpConstant %20 4
+%24 = OpConstant %20 5
+%25 = OpConstantComposite %22 %23 %24
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%19 = OpConvertSToF %4 %21
+%9 = OpImageSampleExplicitLod %10 %14 %18 Lod|ConstOffset %19 %25
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpTypeVector %4 3
+%16 = OpConstant %4 1
+%17 = OpConstant %4 2
+%19 = OpTypeInt 32 1
+%20 = OpConstant %19 3
+%23 = OpConstant %19 4
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%18 = OpConvertSToF %4 %20
+%21 = OpCompositeConstruct %15 %16 %17 %18
+%22 = OpConvertSToF %4 %23
+%9 = OpImageSampleExplicitLod %10 %14 %21 Lod %22
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpTypeVector %4 3
+%16 = OpConstant %4 1
+%17 = OpConstant %4 2
+%19 = OpTypeInt 32 1
+%20 = OpConstant %19 3
+%23 = OpConstant %19 4
+%24 = OpTypeVector %19 2
+%25 = OpConstant %19 5
+%26 = OpConstant %19 6
+%27 = OpConstantComposite %24 %25 %26
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%18 = OpConvertSToF %4 %20
+%21 = OpCompositeConstruct %15 %16 %17 %18
+%22 = OpConvertSToF %4 %23
+%9 = OpImageSampleExplicitLod %10 %14 %21 Lod|ConstOffset %22 %27
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevelDepthCubeF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpTypeVector %4 3
+%16 = OpConstant %4 1
+%17 = OpConstant %4 2
+%18 = OpConstant %4 3
+%19 = OpConstantComposite %15 %16 %17 %18
+%21 = OpTypeInt 32 1
+%22 = OpConstant %21 4
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%20 = OpConvertSToF %4 %22
+%9 = OpImageSampleExplicitLod %10 %14 %19 Lod %20
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeSampledImage %3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%19 = OpTypeInt 32 1
+%20 = OpConstant %19 4
+%23 = OpConstant %19 5
+)",
+          R"(
+%11 = OpLoad %7 %5
+%12 = OpLoad %3 %1
+%14 = OpSampledImage %13 %12 %11
+%18 = OpConvertSToF %4 %20
+%21 = OpCompositeConstruct %10 %15 %16 %17 %18
+%22 = OpConvertSToF %4 %23
+%9 = OpImageSampleExplicitLod %10 %14 %21 Lod %22
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kSampleGrad2dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpConstant %4 3
+%19 = OpConstant %4 4
+%20 = OpConstantComposite %14 %18 %19
+%21 = OpConstant %4 5
+%22 = OpConstant %4 6
+%23 = OpConstantComposite %14 %21 %22
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleExplicitLod %9 %13 %17 Grad %20 %23
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleGrad2dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 2
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstantComposite %14 %15 %16
+%18 = OpConstant %4 3
+%19 = OpConstant %4 4
+%20 = OpConstantComposite %14 %18 %19
+%21 = OpConstant %4 5
+%22 = OpConstant %4 6
+%23 = OpConstantComposite %14 %21 %22
+%25 = OpTypeInt 32 1
+%24 = OpTypeVector %25 2
+%26 = OpConstant %25 7
+%27 = OpConstantComposite %24 %26 %26
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleExplicitLod %9 %13 %17 Grad|ConstOffset %20 %23 %27
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleGrad2dArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpTypeVector %4 2
+%22 = OpConstant %4 4
+%23 = OpConstant %4 5
+%24 = OpConstantComposite %21 %22 %23
+%25 = OpConstant %4 6
+%26 = OpConstant %4 7
+%27 = OpConstantComposite %21 %25 %26
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageSampleExplicitLod %9 %13 %20 Grad %24 %27
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 3
+%21 = OpTypeVector %4 2
+%22 = OpConstant %4 4
+%23 = OpConstant %4 5
+%24 = OpConstantComposite %21 %22 %23
+%25 = OpConstant %4 6
+%26 = OpConstant %4 7
+%27 = OpConstantComposite %21 %25 %26
+%28 = OpTypeVector %18 2
+%29 = OpConstant %18 6
+%30 = OpConstant %18 7
+%31 = OpConstantComposite %28 %29 %30
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %14 %15 %16 %17
+%8 = OpImageSampleExplicitLod %9 %13 %20 Grad|ConstOffset %24 %27 %31
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleGrad3dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpConstant %4 4
+%20 = OpConstant %4 5
+%21 = OpConstant %4 6
+%22 = OpConstantComposite %14 %19 %20 %21
+%23 = OpConstant %4 7
+%24 = OpConstant %4 8
+%25 = OpConstant %4 9
+%26 = OpConstantComposite %14 %23 %24 %25
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleExplicitLod %9 %13 %18 Grad %22 %26
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleGrad3dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpConstant %4 4
+%20 = OpConstant %4 5
+%21 = OpConstant %4 6
+%22 = OpConstantComposite %14 %19 %20 %21
+%23 = OpConstant %4 7
+%24 = OpConstant %4 8
+%25 = OpConstant %4 9
+%26 = OpConstantComposite %14 %23 %24 %25
+%28 = OpTypeInt 32 1
+%27 = OpTypeVector %28 3
+%29 = OpConstant %28 0
+%30 = OpConstant %28 1
+%31 = OpConstant %28 2
+%32 = OpConstantComposite %27 %29 %30 %31
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleExplicitLod %9 %13 %18 Grad|ConstOffset %22 %26 %32
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleGradCubeF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpTypeVector %4 3
+%15 = OpConstant %4 1
+%16 = OpConstant %4 2
+%17 = OpConstant %4 3
+%18 = OpConstantComposite %14 %15 %16 %17
+%19 = OpConstant %4 4
+%20 = OpConstant %4 5
+%21 = OpConstant %4 6
+%22 = OpConstantComposite %14 %19 %20 %21
+%23 = OpConstant %4 7
+%24 = OpConstant %4 8
+%25 = OpConstant %4 9
+%26 = OpConstantComposite %14 %23 %24 %25
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%8 = OpImageSampleExplicitLod %9 %13 %18 Grad %22 %26
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleGradCubeArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeSampledImage %3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 4
+%21 = OpTypeVector %4 3
+%22 = OpConstant %4 5
+%23 = OpConstant %4 6
+%24 = OpConstant %4 7
+%25 = OpConstantComposite %21 %22 %23 %24
+%26 = OpConstant %4 8
+%27 = OpConstant %4 9
+%28 = OpConstant %4 10
+%29 = OpConstantComposite %21 %26 %27 %28
+)",
+          R"(
+%10 = OpLoad %7 %5
+%11 = OpLoad %3 %1
+%13 = OpSampledImage %12 %11 %10
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %9 %14 %15 %16 %17
+%8 = OpImageSampleExplicitLod %9 %13 %20 Grad %25 %29
+)",
+          R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kSampleCompareDepth2dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 2
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstantComposite %13 %14 %15
+%17 = OpConstant %4 3
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%8 = OpImageSampleDrefImplicitLod %4 %12 %16 %17
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 2
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstantComposite %13 %14 %15
+%17 = OpConstant %4 3
+%19 = OpTypeInt 32 1
+%18 = OpTypeVector %19 2
+%20 = OpConstant %19 4
+%21 = OpConstant %19 5
+%22 = OpConstantComposite %18 %20 %21
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%8 = OpImageSampleDrefImplicitLod %4 %12 %16 %17 ConstOffset %22
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%17 = OpTypeInt 32 1
+%18 = OpConstant %17 4
+%20 = OpConstant %4 3
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%16 = OpConvertSToF %4 %18
+%19 = OpCompositeConstruct %13 %14 %15 %16
+%8 = OpImageSampleDrefImplicitLod %4 %12 %19 %20
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%17 = OpTypeInt 32 1
+%18 = OpConstant %17 4
+%20 = OpConstant %4 3
+%21 = OpTypeVector %17 2
+%22 = OpConstant %17 5
+%23 = OpConstant %17 6
+%24 = OpConstantComposite %21 %22 %23
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%16 = OpConvertSToF %4 %18
+%19 = OpCompositeConstruct %13 %14 %15 %16
+%8 = OpImageSampleDrefImplicitLod %4 %12 %19 %20 ConstOffset %24
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCompareDepthCubeF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%17 = OpConstantComposite %13 %14 %15 %16
+%18 = OpConstant %4 4
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%8 = OpImageSampleDrefImplicitLod %4 %12 %17 %18
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 4
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 4
+%21 = OpConstant %4 5
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %13 %14 %15 %16 %17
+%8 = OpImageSampleDrefImplicitLod %4 %12 %20 %21
+)",
+          R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 2
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstantComposite %13 %14 %15
+%17 = OpConstant %4 3
+%18 = OpConstant %4 0
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%8 = OpImageSampleDrefExplicitLod %4 %12 %16 %17 Lod %18
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 2
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstantComposite %13 %14 %15
+%17 = OpConstant %4 3
+%18 = OpConstant %4 0
+%20 = OpTypeInt 32 1
+%19 = OpTypeVector %20 2
+%21 = OpConstant %20 4
+%22 = OpConstant %20 5
+%23 = OpConstantComposite %19 %21 %22
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%8 = OpImageSampleDrefExplicitLod %4 %12 %16 %17 Lod|ConstOffset %18 %23
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%17 = OpTypeInt 32 1
+%18 = OpConstant %17 4
+%20 = OpConstant %4 3
+%21 = OpConstant %4 0
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%16 = OpConvertSToF %4 %18
+%19 = OpCompositeConstruct %13 %14 %15 %16
+%8 = OpImageSampleDrefExplicitLod %4 %12 %19 %20 Lod %21
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%17 = OpTypeInt 32 1
+%18 = OpConstant %17 4
+%20 = OpConstant %4 3
+%21 = OpConstant %4 0
+%22 = OpTypeVector %17 2
+%23 = OpConstant %17 5
+%24 = OpConstant %17 6
+%25 = OpConstantComposite %22 %23 %24
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%16 = OpConvertSToF %4 %18
+%19 = OpCompositeConstruct %13 %14 %15 %16
+%8 = OpImageSampleDrefExplicitLod %4 %12 %19 %20 Lod|ConstOffset %21 %25
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 3
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%17 = OpConstantComposite %13 %14 %15 %16
+%18 = OpConstant %4 4
+%19 = OpConstant %4 0
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%8 = OpImageSampleDrefExplicitLod %4 %12 %17 %18 Lod %19
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%11 = OpTypeSampledImage %3
+%13 = OpTypeVector %4 4
+%14 = OpConstant %4 1
+%15 = OpConstant %4 2
+%16 = OpConstant %4 3
+%18 = OpTypeInt 32 1
+%19 = OpConstant %18 4
+%21 = OpConstant %4 5
+%22 = OpConstant %4 0
+)",
+          R"(
+%9 = OpLoad %7 %5
+%10 = OpLoad %3 %1
+%12 = OpSampledImage %11 %10 %9
+%17 = OpConvertSToF %4 %19
+%20 = OpCompositeConstruct %13 %14 %15 %16 %17
+%8 = OpImageSampleDrefExplicitLod %4 %12 %20 %21 Lod %22
+)",
+          R"(
+OpCapability SampledCubeArray
+)"};
+    case ValidTextureOverload::kLoad1dLevelF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%11 = OpTypeInt 32 1
+%12 = OpConstant %11 1
+%13 = OpConstant %11 3
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %12 Lod %13
+)",
+          R"(
+OpCapability Sampled1D
+)"};
+    case ValidTextureOverload::kLoad1dLevelU32:
+      return {
+          R"(
+%4 = OpTypeInt 32 0
+%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%11 = OpTypeInt 32 1
+%12 = OpConstant %11 1
+%13 = OpConstant %11 3
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %12 Lod %13
+)",
+          R"(
+OpCapability Sampled1D
+)"};
+    case ValidTextureOverload::kLoad1dLevelI32:
+      return {
+          R"(
+%4 = OpTypeInt 32 1
+%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%11 = OpConstant %4 1
+%12 = OpConstant %4 3
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %11 Lod %12
+)",
+          R"(
+OpCapability Sampled1D
+)"};
+    case ValidTextureOverload::kLoad2dLevelF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 2
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstantComposite %11 %13 %14
+%16 = OpConstant %12 3
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %15 Lod %16
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoad2dLevelU32:
+      return {
+          R"(
+%4 = OpTypeInt 32 0
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 2
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstantComposite %11 %13 %14
+%16 = OpConstant %12 3
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %15 Lod %16
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoad2dLevelI32:
+      return {
+          R"(
+%4 = OpTypeInt 32 1
+%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%11 = OpTypeVector %4 2
+%12 = OpConstant %4 1
+%13 = OpConstant %4 2
+%14 = OpConstantComposite %11 %12 %13
+%15 = OpConstant %4 3
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %14 Lod %15
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoad2dArrayLevelF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 3
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstant %12 3
+%16 = OpConstantComposite %11 %13 %14 %15
+%17 = OpConstant %12 4
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %16 Lod %17
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoad2dArrayLevelU32:
+      return {
+          R"(
+%4 = OpTypeInt 32 0
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 3
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstant %12 3
+%16 = OpConstantComposite %11 %13 %14 %15
+%17 = OpConstant %12 4
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %16 Lod %17
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoad2dArrayLevelI32:
+      return {
+          R"(
+%4 = OpTypeInt 32 1
+%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%11 = OpTypeVector %4 3
+%12 = OpConstant %4 1
+%13 = OpConstant %4 2
+%14 = OpConstant %4 3
+%15 = OpConstantComposite %11 %12 %13 %14
+%16 = OpConstant %4 4
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %15 Lod %16
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoad3dLevelF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 3
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstant %12 3
+%16 = OpConstantComposite %11 %13 %14 %15
+%17 = OpConstant %12 4
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %16 Lod %17
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoad3dLevelU32:
+      return {
+          R"(
+%4 = OpTypeInt 32 0
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 3
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstant %12 3
+%16 = OpConstantComposite %11 %13 %14 %15
+%17 = OpConstant %12 4
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %16 Lod %17
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoad3dLevelI32:
+      return {
+          R"(
+%4 = OpTypeInt 32 1
+%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%11 = OpTypeVector %4 3
+%12 = OpConstant %4 1
+%13 = OpConstant %4 2
+%14 = OpConstant %4 3
+%15 = OpConstantComposite %11 %12 %13 %14
+%16 = OpConstant %4 4
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %15 Lod %16
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoadMultisampled2dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 2
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstantComposite %11 %13 %14
+%16 = OpConstant %12 3
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %15 Sample %16
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoadMultisampled2dU32:
+      return {
+          R"(
+%4 = OpTypeInt 32 0
+%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 2
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstantComposite %11 %13 %14
+%16 = OpConstant %12 3
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %15 Sample %16
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoadMultisampled2dI32:
+      return {
+          R"(
+%4 = OpTypeInt 32 1
+%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVector %4 4
+%11 = OpTypeVector %4 2
+%12 = OpConstant %4 1
+%13 = OpConstant %4 2
+%14 = OpConstantComposite %11 %12 %13
+%15 = OpConstant %4 3
+)",
+          R"(
+%10 = OpLoad %3 %1
+%8 = OpImageFetch %9 %10 %14 Sample %15
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoadDepth2dLevelF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeInt 32 1
+%12 = OpTypeVector %13 2
+%14 = OpConstant %13 1
+%15 = OpConstant %13 2
+%16 = OpConstantComposite %12 %14 %15
+%17 = OpConstant %13 3
+)",
+          R"(
+%11 = OpLoad %3 %1
+%9 = OpImageFetch %10 %11 %16 Lod %17
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeInt 32 1
+%12 = OpTypeVector %13 3
+%14 = OpConstant %13 1
+%15 = OpConstant %13 2
+%16 = OpConstant %13 3
+%17 = OpConstantComposite %12 %14 %15 %16
+%18 = OpConstant %13 4
+)",
+          R"(
+%11 = OpLoad %3 %1
+%9 = OpImageFetch %10 %11 %17 Lod %18
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kLoadDepthMultisampled2dF32:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%10 = OpTypeVector %4 4
+%13 = OpTypeInt 32 1
+%12 = OpTypeVector %13 3
+%14 = OpConstant %13 1
+%15 = OpConstant %13 2
+%16 = OpConstant %13 3
+%17 = OpConstantComposite %12 %14 %15 %16
+%18 = OpConstant %13 4
+)",
+          R"(
+%11 = OpLoad %3 %1
+%9 = OpImageFetch %10 %11 %17 Sample %18
+%8 = OpCompositeExtract %4 %9 0
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kStoreWO1dRgba32float:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 1D 0 0 0 2 Rgba32f
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVoid
+%11 = OpTypeInt 32 1
+%12 = OpConstant %11 1
+%13 = OpTypeVector %4 4
+%14 = OpConstant %4 2
+%15 = OpConstant %4 3
+%16 = OpConstant %4 4
+%17 = OpConstant %4 5
+%18 = OpConstantComposite %13 %14 %15 %16 %17
+)",
+          R"(
+%10 = OpLoad %3 %1
+OpImageWrite %10 %12 %18
+)",
+          R"(
+OpCapability Image1D
+)"};
+    case ValidTextureOverload::kStoreWO2dRgba32float:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 0 0 2 Rgba32f
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVoid
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 2
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstantComposite %11 %13 %14
+%16 = OpTypeVector %4 4
+%17 = OpConstant %4 3
+%18 = OpConstant %4 4
+%19 = OpConstant %4 5
+%20 = OpConstant %4 6
+%21 = OpConstantComposite %16 %17 %18 %19 %20
+)",
+          R"(
+%10 = OpLoad %3 %1
+OpImageWrite %10 %15 %21
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 2D 0 1 0 2 Rgba32f
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVoid
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 3
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstant %12 3
+%16 = OpConstantComposite %11 %13 %14 %15
+%17 = OpTypeVector %4 4
+%18 = OpConstant %4 4
+%19 = OpConstant %4 5
+%20 = OpConstant %4 6
+%21 = OpConstant %4 7
+%22 = OpConstantComposite %17 %18 %19 %20 %21
+)",
+          R"(
+%10 = OpLoad %3 %1
+OpImageWrite %10 %16 %22
+)",
+          R"(
+)"};
+    case ValidTextureOverload::kStoreWO3dRgba32float:
+      return {
+          R"(
+%4 = OpTypeFloat 32
+%3 = OpTypeImage %4 3D 0 0 0 2 Rgba32f
+%2 = OpTypePointer UniformConstant %3
+%1 = OpVariable %2 UniformConstant
+%7 = OpTypeSampler
+%6 = OpTypePointer UniformConstant %7
+%5 = OpVariable %6 UniformConstant
+%9 = OpTypeVoid
+%12 = OpTypeInt 32 1
+%11 = OpTypeVector %12 3
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstant %12 3
+%16 = OpConstantComposite %11 %13 %14 %15
+%17 = OpTypeVector %4 4
+%18 = OpConstant %4 4
+%19 = OpConstant %4 5
+%20 = OpConstant %4 6
+%21 = OpConstant %4 7
+%22 = OpConstantComposite %17 %18 %19 %20 %21
+)",
+          R"(
+%10 = OpLoad %3 %1
+OpImageWrite %10 %16 %22
+)",
+          R"(
+)"};
+  }
+
+  return {"<unmatched texture overload>", "<unmatched texture overload>",
+          "<unmatched texture overload>"};
+}  // NOLINT - Ignore the length of this function
+
+using BuiltinTextureTest =
+    TestParamHelper<ast::builtin::test::TextureOverloadCase>;
+
+INSTANTIATE_TEST_SUITE_P(
+    BuiltinTextureTest,
+    BuiltinTextureTest,
+    testing::ValuesIn(ast::builtin::test::TextureOverloadCase::ValidCases()));
+
+TEST_P(BuiltinTextureTest, Call) {
+  auto param = GetParam();
+
+  auto* texture = param.BuildTextureVariable(this);
+  auto* sampler = param.BuildSamplerVariable(this);
+
+  auto* call = Call(param.function, param.args(this));
+  auto* stmt = CallStmt(call);
+  Func("func", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = Build();
+
+  b.push_function(Function{});
+  ASSERT_TRUE(b.GenerateGlobalVariable(texture)) << b.error();
+  ASSERT_TRUE(b.GenerateGlobalVariable(sampler)) << b.error();
+
+  EXPECT_EQ(b.GenerateExpression(call), 8u) << b.error();
+
+  auto expected = expected_texture_overload(param.overload);
+  EXPECT_EQ(expected.types, "\n" + DumpInstructions(b.types()));
+  EXPECT_EQ(expected.instructions,
+            "\n" + DumpInstructions(b.functions()[0].instructions()));
+  EXPECT_EQ(expected.capabilities, "\n" + DumpInstructions(b.capabilities()));
+}
+
+// Check the SPIRV generated passes validation
+TEST_P(BuiltinTextureTest, ValidateSPIRV) {
+  auto param = GetParam();
+
+  param.BuildTextureVariable(this);
+  param.BuildSamplerVariable(this);
+
+  auto* call = Call(param.function, param.args(this));
+
+  auto* stmt = CallStmt(call);
+  Func("main", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.Build()) << b.error();
+
+  Validate(b);
+}
+
+TEST_P(BuiltinTextureTest, OutsideFunction_IsError) {
+  auto param = GetParam();
+
+  // The point of this test is to try to generate the texture
+  // builtin call outside a function.
+
+  auto* texture = param.BuildTextureVariable(this);
+  auto* sampler = param.BuildSamplerVariable(this);
+
+  auto* call = Call(param.function, param.args(this));
+  auto* stmt = CallStmt(call);
+  Func("func", {}, ty.void_(), {stmt},
+       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
+
+  spirv::Builder& b = Build();
+
+  ASSERT_TRUE(b.GenerateGlobalVariable(texture)) << b.error();
+  ASSERT_TRUE(b.GenerateGlobalVariable(sampler)) << b.error();
+  EXPECT_EQ(b.GenerateExpression(call), 0u);
+  EXPECT_THAT(b.error(),
+              ::testing::StartsWith(
+                  "Internal error: trying to add SPIR-V instruction "));
+  EXPECT_THAT(b.error(), ::testing::EndsWith(" outside a function"));
+}
+
+}  // namespace
+}  // namespace spirv
+}  // namespace writer
+}  // namespace tint
diff --git a/src/writer/spirv/builder_intrinsic_test.cc b/src/writer/spirv/builder_intrinsic_test.cc
deleted file mode 100644
index 06b9f6d..0000000
--- a/src/writer/spirv/builder_intrinsic_test.cc
+++ /dev/null
@@ -1,2562 +0,0 @@
-// Copyright 2020 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/ast/call_statement.h"
-#include "src/ast/stage_attribute.h"
-#include "src/ast/struct_block_attribute.h"
-#include "src/sem/depth_texture_type.h"
-#include "src/utils/string.h"
-#include "src/writer/spirv/spv_dump.h"
-#include "src/writer/spirv/test_helper.h"
-
-namespace tint {
-namespace writer {
-namespace spirv {
-namespace {
-
-using IntrinsicBuilderTest = TestHelper;
-
-template <typename T>
-using IntrinsicBuilderTestWithParam = TestParamHelper<T>;
-
-struct IntrinsicData {
-  std::string name;
-  std::string op;
-};
-inline std::ostream& operator<<(std::ostream& out, IntrinsicData data) {
-  out << data.name;
-  return out;
-}
-
-using IntrinsicBoolTest = IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(IntrinsicBoolTest, Call_Bool_Scalar) {
-  auto param = GetParam();
-  auto* var = Global("v", ty.bool_(), ast::StorageClass::kPrivate);
-  auto* expr = Call(param.name, "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeBool
-%2 = OpTypePointer Private %3
-%4 = OpConstantNull %3
-%1 = OpVariable %2 Private %4
-%6 = OpTypeVoid
-%5 = OpTypeFunction %6
-)");
-
-  // both any and all are 'passthrough' for scalar booleans
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
-            "%10 = OpLoad %3 %1\nOpReturn\n");
-}
-
-TEST_P(IntrinsicBoolTest, Call_Bool_Vector) {
-  auto param = GetParam();
-  auto* var = Global("v", ty.vec3<bool>(), ast::StorageClass::kPrivate);
-  auto* expr = Call(param.name, "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeBool
-%3 = OpTypeVector %4 3
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-)");
-
-  auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
-%10 = ${op} %4 %11
-OpReturn
-)",
-                                    "${op}", param.op);
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
-}
-INSTANTIATE_TEST_SUITE_P(IntrinsicBuilderTest,
-                         IntrinsicBoolTest,
-                         testing::Values(IntrinsicData{"any", "OpAny"},
-                                         IntrinsicData{"all", "OpAll"}));
-
-using IntrinsicFloatTest = IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(IntrinsicFloatTest, Call_Float_Scalar) {
-  auto param = GetParam();
-  auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
-  auto* expr = Call(param.name, "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeFloat 32
-%2 = OpTypePointer Private %3
-%4 = OpConstantNull %3
-%1 = OpVariable %2 Private %4
-%6 = OpTypeVoid
-%5 = OpTypeFunction %6
-%10 = OpTypeBool
-)");
-
-  auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
-%9 = ${op} %10 %11
-OpReturn
-)",
-                                    "${op}", param.op);
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
-}
-
-TEST_P(IntrinsicFloatTest, Call_Float_Vector) {
-  auto param = GetParam();
-  auto* var = Global("v", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call(param.name, "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
-%3 = OpTypeVector %4 3
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%12 = OpTypeBool
-%11 = OpTypeVector %12 3
-)");
-
-  auto expected = utils::ReplaceAll(R"(%13 = OpLoad %3 %1
-%10 = ${op} %11 %13
-OpReturn
-)",
-                                    "${op}", param.op);
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
-}
-INSTANTIATE_TEST_SUITE_P(IntrinsicBuilderTest,
-                         IntrinsicFloatTest,
-                         testing::Values(IntrinsicData{"isNan", "OpIsNan"},
-                                         IntrinsicData{"isInf", "OpIsInf"}));
-
-TEST_F(IntrinsicBuilderTest, IsFinite_Scalar) {
-  auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
-  auto* expr = Call("isFinite", "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeFloat 32
-%2 = OpTypePointer Private %3
-%4 = OpConstantNull %3
-%1 = OpVariable %2 Private %4
-%6 = OpTypeVoid
-%5 = OpTypeFunction %6
-%10 = OpTypeBool
-)");
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
-            R"(%11 = OpLoad %3 %1
-%12 = OpIsInf %10 %11
-%13 = OpIsNan %10 %11
-%14 = OpLogicalOr %10 %12 %13
-%9 = OpLogicalNot %10 %14
-OpReturn
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, IsFinite_Vector) {
-  auto* var = Global("v", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call("isFinite", "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
-%3 = OpTypeVector %4 3
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%12 = OpTypeBool
-%11 = OpTypeVector %12 3
-)");
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
-            R"(%13 = OpLoad %3 %1
-%14 = OpIsInf %11 %13
-%15 = OpIsNan %11 %13
-%16 = OpLogicalOr %11 %14 %15
-%10 = OpLogicalNot %11 %16
-OpReturn
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, IsNormal_Scalar) {
-  auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
-  auto* expr = Call("isNormal", "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  auto got = DumpBuilder(b);
-  EXPECT_EQ(got, R"(%12 = OpExtInstImport "GLSL.std.450"
-OpName %1 "v"
-OpName %7 "a_func"
-%3 = OpTypeFloat 32
-%2 = OpTypePointer Private %3
-%4 = OpConstantNull %3
-%1 = OpVariable %2 Private %4
-%6 = OpTypeVoid
-%5 = OpTypeFunction %6
-%10 = OpTypeBool
-%13 = OpTypeInt 32 0
-%14 = OpConstant %13 133693440
-%15 = OpConstant %13 524288
-%16 = OpConstant %13 133169152
-%7 = OpFunction %6 None %5
-%8 = OpLabel
-%11 = OpLoad %3 %1
-%17 = OpBitcast %13 %11
-%18 = OpBitwiseAnd %13 %17 %14
-%19 = OpExtInst %13 %12 UClamp %18 %15 %16
-%9 = OpIEqual %10 %18 %19
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, IsNormal_Vector) {
-  auto* var = Global("v", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call("isNormal", "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  auto got = DumpBuilder(b);
-  EXPECT_EQ(got, R"(%14 = OpExtInstImport "GLSL.std.450"
-OpName %1 "v"
-OpName %8 "a_func"
-%4 = OpTypeFloat 32
-%3 = OpTypeVector %4 2
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%12 = OpTypeBool
-%11 = OpTypeVector %12 2
-%15 = OpTypeInt 32 0
-%16 = OpConstant %15 133693440
-%17 = OpConstant %15 524288
-%18 = OpConstant %15 133169152
-%19 = OpTypeVector %15 2
-%8 = OpFunction %7 None %6
-%9 = OpLabel
-%13 = OpLoad %3 %1
-%20 = OpCompositeConstruct %19 %16 %16
-%21 = OpCompositeConstruct %19 %17 %17
-%22 = OpCompositeConstruct %19 %18 %18
-%23 = OpBitcast %19 %13
-%24 = OpBitwiseAnd %19 %23 %20
-%25 = OpExtInst %19 %14 UClamp %24 %21 %22
-%10 = OpIEqual %11 %24 %25
-OpReturn
-OpFunctionEnd
-)");
-}
-
-using IntrinsicIntTest = IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(IntrinsicIntTest, Call_SInt_Scalar) {
-  auto param = GetParam();
-  auto* var = Global("v", ty.i32(), ast::StorageClass::kPrivate);
-  auto* expr = Call(param.name, "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeInt 32 1
-%2 = OpTypePointer Private %3
-%4 = OpConstantNull %3
-%1 = OpVariable %2 Private %4
-%6 = OpTypeVoid
-%5 = OpTypeFunction %6
-)");
-
-  auto expected = utils::ReplaceAll(R"(%10 = OpLoad %3 %1
-%9 = ${op} %3 %10
-OpReturn
-)",
-                                    "${op}", param.op);
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
-}
-
-TEST_P(IntrinsicIntTest, Call_SInt_Vector) {
-  auto param = GetParam();
-  auto* var = Global("v", ty.vec3<i32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call(param.name, "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeInt 32 1
-%3 = OpTypeVector %4 3
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-)");
-
-  auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
-%10 = ${op} %3 %11
-OpReturn
-)",
-                                    "${op}", param.op);
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
-}
-
-TEST_P(IntrinsicIntTest, Call_UInt_Scalar) {
-  auto param = GetParam();
-  auto* var = Global("v", ty.u32(), ast::StorageClass::kPrivate);
-  auto* expr = Call(param.name, "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeInt 32 0
-%2 = OpTypePointer Private %3
-%4 = OpConstantNull %3
-%1 = OpVariable %2 Private %4
-%6 = OpTypeVoid
-%5 = OpTypeFunction %6
-)");
-
-  auto expected = utils::ReplaceAll(R"(%10 = OpLoad %3 %1
-%9 = ${op} %3 %10
-OpReturn
-)",
-                                    "${op}", param.op);
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
-}
-
-TEST_P(IntrinsicIntTest, Call_UInt_Vector) {
-  auto param = GetParam();
-  auto* var = Global("v", ty.vec3<u32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call(param.name, "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeInt 32 0
-%3 = OpTypeVector %4 3
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-)");
-
-  auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
-%10 = ${op} %3 %11
-OpReturn
-)",
-                                    "${op}", param.op);
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
-}
-INSTANTIATE_TEST_SUITE_P(
-    IntrinsicBuilderTest,
-    IntrinsicIntTest,
-    testing::Values(IntrinsicData{"countOneBits", "OpBitCount"},
-                    IntrinsicData{"reverseBits", "OpBitReverse"}));
-
-TEST_F(IntrinsicBuilderTest, Call_Dot_F32) {
-  auto* var = Global("v", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call("dot", "v", "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
-%3 = OpTypeVector %4 3
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-)");
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
-            R"(%11 = OpLoad %3 %1
-%12 = OpLoad %3 %1
-%10 = OpDot %4 %11 %12
-OpReturn
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, Call_Dot_U32) {
-  auto* var = Global("v", ty.vec3<u32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call("dot", "v", "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeInt 32 0
-%3 = OpTypeVector %4 3
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-)");
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
-            R"(%11 = OpLoad %3 %1
-%12 = OpLoad %3 %1
-%13 = OpCompositeExtract %4 %11 0
-%14 = OpCompositeExtract %4 %12 0
-%15 = OpIMul %4 %13 %14
-%16 = OpCompositeExtract %4 %11 1
-%17 = OpCompositeExtract %4 %12 1
-%18 = OpIMul %4 %16 %17
-%19 = OpIAdd %4 %15 %18
-%20 = OpCompositeExtract %4 %11 2
-%21 = OpCompositeExtract %4 %12 2
-%22 = OpIMul %4 %20 %21
-%10 = OpIAdd %4 %19 %22
-OpReturn
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, Call_Dot_I32) {
-  auto* var = Global("v", ty.vec3<i32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call("dot", "v", "v");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeInt 32 1
-%3 = OpTypeVector %4 3
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-)");
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
-            R"(%11 = OpLoad %3 %1
-%12 = OpLoad %3 %1
-%13 = OpCompositeExtract %4 %11 0
-%14 = OpCompositeExtract %4 %12 0
-%15 = OpIMul %4 %13 %14
-%16 = OpCompositeExtract %4 %11 1
-%17 = OpCompositeExtract %4 %12 1
-%18 = OpIMul %4 %16 %17
-%19 = OpIAdd %4 %15 %18
-%20 = OpCompositeExtract %4 %11 2
-%21 = OpCompositeExtract %4 %12 2
-%22 = OpIMul %4 %20 %21
-%10 = OpIAdd %4 %19 %22
-OpReturn
-)");
-}
-
-using IntrinsicDeriveTest = IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(IntrinsicDeriveTest, Call_Derivative_Scalar) {
-  auto param = GetParam();
-  auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
-  auto* expr = Call(param.name, "v");
-  auto* func = Func("func", {}, ty.void_(), {CallStmt(expr)},
-                    {Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeFloat 32
-%2 = OpTypePointer Private %3
-%4 = OpConstantNull %3
-%1 = OpVariable %2 Private %4
-%6 = OpTypeVoid
-%5 = OpTypeFunction %6
-)");
-
-  auto expected = utils::ReplaceAll(R"(%10 = OpLoad %3 %1
-%9 = ${op} %3 %10
-OpReturn
-)",
-                                    "${op}", param.op);
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
-}
-
-TEST_P(IntrinsicDeriveTest, Call_Derivative_Vector) {
-  auto param = GetParam();
-  auto* var = Global("v", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call(param.name, "v");
-  auto* func = Func("func", {}, ty.void_(), {CallStmt(expr)},
-                    {Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  if (param.name != "dpdx" && param.name != "dpdy" && param.name != "fwidth") {
-    EXPECT_EQ(DumpInstructions(b.capabilities()),
-              R"(OpCapability DerivativeControl
-)");
-  }
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
-%3 = OpTypeVector %4 3
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-)");
-
-  auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
-%10 = ${op} %3 %11
-OpReturn
-)",
-                                    "${op}", param.op);
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
-}
-INSTANTIATE_TEST_SUITE_P(
-    IntrinsicBuilderTest,
-    IntrinsicDeriveTest,
-    testing::Values(IntrinsicData{"dpdx", "OpDPdx"},
-                    IntrinsicData{"dpdxFine", "OpDPdxFine"},
-                    IntrinsicData{"dpdxCoarse", "OpDPdxCoarse"},
-                    IntrinsicData{"dpdy", "OpDPdy"},
-                    IntrinsicData{"dpdyFine", "OpDPdyFine"},
-                    IntrinsicData{"dpdyCoarse", "OpDPdyCoarse"},
-                    IntrinsicData{"fwidth", "OpFwidth"},
-                    IntrinsicData{"fwidthFine", "OpFwidthFine"},
-                    IntrinsicData{"fwidthCoarse", "OpFwidthCoarse"}));
-
-TEST_F(IntrinsicBuilderTest, Call_Select) {
-  auto* v3 = Global("v3", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-
-  auto* bool_v3 =
-      Global("bool_v3", ty.vec3<bool>(), ast::StorageClass::kPrivate);
-  auto* expr = Call("select", "v3", "v3", "bool_v3");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(v3)) << b.error();
-  ASSERT_TRUE(b.GenerateGlobalVariable(bool_v3)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
-%3 = OpTypeVector %4 3
-%2 = OpTypePointer Private %3
-%5 = OpConstantNull %3
-%1 = OpVariable %2 Private %5
-%9 = OpTypeBool
-%8 = OpTypeVector %9 3
-%7 = OpTypePointer Private %8
-%10 = OpConstantNull %8
-%6 = OpVariable %7 Private %10
-%12 = OpTypeVoid
-%11 = OpTypeFunction %12
-)");
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
-            R"(%16 = OpLoad %8 %6
-%17 = OpLoad %3 %1
-%18 = OpLoad %3 %1
-%15 = OpSelect %3 %16 %17 %18
-OpReturn
-)");
-}
-
-// This tests that we do not push OpTypeSampledImage and float_0 type twice.
-TEST_F(IntrinsicBuilderTest, Call_TextureSampleCompare_Twice) {
-  auto* s = ty.sampler(ast::SamplerKind::kComparisonSampler);
-  auto* t = ty.depth_texture(ast::TextureDimension::k2d);
-
-  auto* tex = Global("texture", t,
-                     ast::AttributeList{
-                         create<ast::BindingAttribute>(0),
-                         create<ast::GroupAttribute>(0),
-                     });
-
-  auto* sampler = Global("sampler", s,
-                         ast::AttributeList{
-                             create<ast::BindingAttribute>(1),
-                             create<ast::GroupAttribute>(0),
-                         });
-
-  auto* expr1 = Call("textureSampleCompare", "texture", "sampler",
-                     vec2<f32>(1.0f, 2.0f), 2.0f);
-  auto* expr2 = Call("textureSampleCompare", "texture", "sampler",
-                     vec2<f32>(1.0f, 2.0f), 2.0f);
-
-  Func("f1", {}, ty.void_(), {CallStmt(expr1)}, {});
-  Func("f2", {}, ty.void_(), {CallStmt(expr2)}, {});
-
-  spirv::Builder& b = Build();
-
-  b.push_function(Function{});
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(tex)) << b.error();
-  ASSERT_TRUE(b.GenerateGlobalVariable(sampler)) << b.error();
-
-  EXPECT_EQ(b.GenerateExpression(expr1), 8u) << b.error();
-  EXPECT_EQ(b.GenerateExpression(expr2), 17u) << b.error();
-
-  EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 2
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstantComposite %13 %14 %15
-)");
-
-  EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
-            R"(%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%8 = OpImageSampleDrefImplicitLod %4 %12 %16 %15
-%18 = OpLoad %7 %5
-%19 = OpLoad %3 %1
-%20 = OpSampledImage %11 %19 %18
-%17 = OpImageSampleDrefImplicitLod %4 %20 %16 %15
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, Call_GLSLMethod_WithLoad) {
-  auto* var = Global("ident", ty.f32(), ast::StorageClass::kPrivate);
-  auto* expr = Call("round", "ident");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%10 = OpExtInstImport "GLSL.std.450"
-OpName %1 "ident"
-OpName %7 "a_func"
-%3 = OpTypeFloat 32
-%2 = OpTypePointer Private %3
-%4 = OpConstantNull %3
-%1 = OpVariable %2 Private %4
-%6 = OpTypeVoid
-%5 = OpTypeFunction %6
-%7 = OpFunction %6 None %5
-%8 = OpLabel
-%11 = OpLoad %3 %1
-%9 = OpExtInst %3 %10 RoundEven %11
-OpReturn
-OpFunctionEnd
-)");
-}
-
-using Intrinsic_Builtin_SingleParam_Float_Test =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_SingleParam_Float_Test, Call_Scalar) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, 1.0f);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeFloat 32
-%8 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 )" + param.op +
-                                R"( %8
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_P(Intrinsic_Builtin_SingleParam_Float_Test, Call_Vector) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, vec2<f32>(1.0f, 1.0f));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeFloat 32
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 )" + param.op +
-                                R"( %10
-OpReturn
-OpFunctionEnd
-)");
-}
-INSTANTIATE_TEST_SUITE_P(IntrinsicBuilderTest,
-                         Intrinsic_Builtin_SingleParam_Float_Test,
-                         testing::Values(IntrinsicData{"abs", "FAbs"},
-                                         IntrinsicData{"acos", "Acos"},
-                                         IntrinsicData{"asin", "Asin"},
-                                         IntrinsicData{"atan", "Atan"},
-                                         IntrinsicData{"ceil", "Ceil"},
-                                         IntrinsicData{"cos", "Cos"},
-                                         IntrinsicData{"cosh", "Cosh"},
-                                         IntrinsicData{"degrees", "Degrees"},
-                                         IntrinsicData{"exp", "Exp"},
-                                         IntrinsicData{"exp2", "Exp2"},
-                                         IntrinsicData{"floor", "Floor"},
-                                         IntrinsicData{"fract", "Fract"},
-                                         IntrinsicData{"inverseSqrt",
-                                                       "InverseSqrt"},
-                                         IntrinsicData{"log", "Log"},
-                                         IntrinsicData{"log2", "Log2"},
-                                         IntrinsicData{"radians", "Radians"},
-                                         IntrinsicData{"round", "RoundEven"},
-                                         IntrinsicData{"sign", "FSign"},
-                                         IntrinsicData{"sin", "Sin"},
-                                         IntrinsicData{"sinh", "Sinh"},
-                                         IntrinsicData{"sqrt", "Sqrt"},
-                                         IntrinsicData{"tan", "Tan"},
-                                         IntrinsicData{"tanh", "Tanh"},
-                                         IntrinsicData{"trunc", "Trunc"}));
-
-TEST_F(IntrinsicBuilderTest, Call_Length_Scalar) {
-  auto* expr = Call("length", 1.0f);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeFloat 32
-%8 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 Length %8
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, Call_Length_Vector) {
-  auto* expr = Call("length", vec2<f32>(1.0f, 1.0f));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeFloat 32
-%8 = OpTypeVector %6 2
-%9 = OpConstant %6 1
-%10 = OpConstantComposite %8 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 Length %10
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, Call_Normalize) {
-  auto* expr = Call("normalize", vec2<f32>(1.0f, 1.0f));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeFloat 32
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 Normalize %10
-OpReturn
-OpFunctionEnd
-)");
-}
-
-using Intrinsic_Builtin_DualParam_Float_Test =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_DualParam_Float_Test, Call_Scalar) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, 1.0f, 1.0f);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeFloat 32
-%8 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 )" + param.op +
-                                R"( %8 %8
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_P(Intrinsic_Builtin_DualParam_Float_Test, Call_Vector) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeFloat 32
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 )" + param.op +
-                                R"( %10 %10
-OpReturn
-OpFunctionEnd
-)");
-}
-INSTANTIATE_TEST_SUITE_P(IntrinsicBuilderTest,
-                         Intrinsic_Builtin_DualParam_Float_Test,
-                         testing::Values(IntrinsicData{"atan2", "Atan2"},
-                                         IntrinsicData{"max", "NMax"},
-                                         IntrinsicData{"min", "NMin"},
-                                         IntrinsicData{"pow", "Pow"},
-                                         IntrinsicData{"step", "Step"}));
-
-TEST_F(IntrinsicBuilderTest, Call_Reflect_Vector) {
-  auto* expr = Call("reflect", vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeFloat 32
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 Reflect %10 %10
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, Call_Distance_Scalar) {
-  auto* expr = Call("distance", 1.0f, 1.0f);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeFloat 32
-%8 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 Distance %8 %8
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, Call_Distance_Vector) {
-  auto* expr = Call("distance", vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeFloat 32
-%8 = OpTypeVector %6 2
-%9 = OpConstant %6 1
-%10 = OpConstantComposite %8 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 Distance %10 %10
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, Call_Cross) {
-  auto* expr =
-      Call("cross", vec3<f32>(1.0f, 1.0f, 1.0f), vec3<f32>(1.0f, 1.0f, 1.0f));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeFloat 32
-%6 = OpTypeVector %7 3
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 Cross %10 %10
-OpReturn
-OpFunctionEnd
-)");
-}
-
-using Intrinsic_Builtin_ThreeParam_Float_Test =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_ThreeParam_Float_Test, Call_Scalar) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, 1.0f, 1.0f, 1.0f);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeFloat 32
-%8 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 )" + param.op +
-                                R"( %8 %8 %8
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_P(Intrinsic_Builtin_ThreeParam_Float_Test, Call_Vector) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f),
-                    vec2<f32>(1.0f, 1.0f));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeFloat 32
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 )" + param.op +
-                                R"( %10 %10 %10
-OpReturn
-OpFunctionEnd
-)");
-}
-INSTANTIATE_TEST_SUITE_P(IntrinsicBuilderTest,
-                         Intrinsic_Builtin_ThreeParam_Float_Test,
-                         testing::Values(IntrinsicData{"clamp", "NClamp"},
-                                         IntrinsicData{"fma", "Fma"},
-                                         IntrinsicData{"mix", "FMix"},
-
-                                         IntrinsicData{"smoothStep",
-                                                       "SmoothStep"}));
-
-TEST_F(IntrinsicBuilderTest, Call_FaceForward_Vector) {
-  auto* expr = Call("faceForward", vec2<f32>(1.0f, 1.0f), vec2<f32>(1.0f, 1.0f),
-                    vec2<f32>(1.0f, 1.0f));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeFloat 32
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 FaceForward %10 %10 %10
-OpReturn
-OpFunctionEnd
-)");
-}
-
-using Intrinsic_Builtin_SingleParam_Sint_Test =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_SingleParam_Sint_Test, Call_Scalar) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, 1);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeInt 32 1
-%8 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 )" + param.op +
-                                R"( %8
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_P(Intrinsic_Builtin_SingleParam_Sint_Test, Call_Vector) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, vec2<i32>(1, 1));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeInt 32 1
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 )" + param.op +
-                                R"( %10
-OpReturn
-OpFunctionEnd
-)");
-}
-INSTANTIATE_TEST_SUITE_P(IntrinsicBuilderTest,
-                         Intrinsic_Builtin_SingleParam_Sint_Test,
-                         testing::Values(IntrinsicData{"abs", "SAbs"}));
-
-// Calling abs() on an unsigned integer scalar / vector is a no-op.
-using Intrinsic_Builtin_Abs_Uint_Test = IntrinsicBuilderTest;
-TEST_F(Intrinsic_Builtin_Abs_Uint_Test, Call_Scalar) {
-  auto* expr = Call("abs", 1u);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeInt 32 0
-%7 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_F(Intrinsic_Builtin_Abs_Uint_Test, Call_Vector) {
-  auto* expr = Call("abs", vec2<u32>(1u, 1u));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeInt 32 0
-%6 = OpTypeVector %7 2
-%8 = OpConstant %7 1
-%9 = OpConstantComposite %6 %8 %8
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-OpReturn
-OpFunctionEnd
-)");
-}
-
-using Intrinsic_Builtin_DualParam_SInt_Test =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_DualParam_SInt_Test, Call_Scalar) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, 1, 1);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeInt 32 1
-%8 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 )" + param.op +
-                                R"( %8 %8
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_P(Intrinsic_Builtin_DualParam_SInt_Test, Call_Vector) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, vec2<i32>(1, 1), vec2<i32>(1, 1));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeInt 32 1
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 )" + param.op +
-                                R"( %10 %10
-OpReturn
-OpFunctionEnd
-)");
-}
-INSTANTIATE_TEST_SUITE_P(IntrinsicBuilderTest,
-                         Intrinsic_Builtin_DualParam_SInt_Test,
-                         testing::Values(IntrinsicData{"max", "SMax"},
-                                         IntrinsicData{"min", "SMin"}));
-
-using Intrinsic_Builtin_DualParam_UInt_Test =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_DualParam_UInt_Test, Call_Scalar) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, 1u, 1u);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeInt 32 0
-%8 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 )" + param.op +
-                                R"( %8 %8
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_P(Intrinsic_Builtin_DualParam_UInt_Test, Call_Vector) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, vec2<u32>(1u, 1u), vec2<u32>(1u, 1u));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeInt 32 0
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 )" + param.op +
-                                R"( %10 %10
-OpReturn
-OpFunctionEnd
-)");
-}
-INSTANTIATE_TEST_SUITE_P(IntrinsicBuilderTest,
-                         Intrinsic_Builtin_DualParam_UInt_Test,
-                         testing::Values(IntrinsicData{"max", "UMax"},
-                                         IntrinsicData{"min", "UMin"}));
-
-using Intrinsic_Builtin_ThreeParam_Sint_Test =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_ThreeParam_Sint_Test, Call_Scalar) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, 1, 1, 1);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeInt 32 1
-%8 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 )" + param.op +
-                                R"( %8 %8 %8
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_P(Intrinsic_Builtin_ThreeParam_Sint_Test, Call_Vector) {
-  auto param = GetParam();
-  auto* expr =
-      Call(param.name, vec2<i32>(1, 1), vec2<i32>(1, 1), vec2<i32>(1, 1));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeInt 32 1
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 )" + param.op +
-                                R"( %10 %10 %10
-OpReturn
-OpFunctionEnd
-)");
-}
-INSTANTIATE_TEST_SUITE_P(IntrinsicBuilderTest,
-                         Intrinsic_Builtin_ThreeParam_Sint_Test,
-                         testing::Values(IntrinsicData{"clamp", "SClamp"}));
-
-using Intrinsic_Builtin_ThreeParam_Uint_Test =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_ThreeParam_Uint_Test, Call_Scalar) {
-  auto param = GetParam();
-  auto* expr = Call(param.name, 1u, 1u, 1u);
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeInt 32 0
-%8 = OpConstant %6 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 )" + param.op +
-                                R"( %8 %8 %8
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_P(Intrinsic_Builtin_ThreeParam_Uint_Test, Call_Vector) {
-  auto param = GetParam();
-  auto* expr =
-      Call(param.name, vec2<u32>(1u, 1u), vec2<u32>(1u, 1u), vec2<u32>(1u, 1u));
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeInt 32 0
-%6 = OpTypeVector %7 2
-%9 = OpConstant %7 1
-%10 = OpConstantComposite %6 %9 %9
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 )" + param.op +
-                                R"( %10 %10 %10
-OpReturn
-OpFunctionEnd
-)");
-}
-INSTANTIATE_TEST_SUITE_P(IntrinsicBuilderTest,
-                         Intrinsic_Builtin_ThreeParam_Uint_Test,
-                         testing::Values(IntrinsicData{"clamp", "UClamp"}));
-
-TEST_F(IntrinsicBuilderTest, Call_Modf) {
-  auto* expr = Call("modf", vec2<f32>(1.0f, 2.0f));
-  Func("a_func", {}, ty.void_(), {CallStmt(expr)},
-       {Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-  auto got = DumpBuilder(b);
-  auto* expect = R"(OpCapability Shader
-%9 = OpExtInstImport "GLSL.std.450"
-OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %3 "a_func"
-OpExecutionMode %3 OriginUpperLeft
-OpName %3 "a_func"
-OpName %6 "__modf_result_vec2"
-OpMemberName %6 0 "fract"
-OpMemberName %6 1 "whole"
-OpMemberDecorate %6 0 Offset 0
-OpMemberDecorate %6 1 Offset 8
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%8 = OpTypeFloat 32
-%7 = OpTypeVector %8 2
-%6 = OpTypeStruct %7 %7
-%10 = OpConstant %8 1
-%11 = OpConstant %8 2
-%12 = OpConstantComposite %7 %10 %11
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %9 ModfStruct %12
-OpReturn
-OpFunctionEnd
-)";
-  EXPECT_EQ(expect, got);
-
-  Validate(b);
-}
-
-TEST_F(IntrinsicBuilderTest, Call_Frexp) {
-  auto* expr = Call("frexp", vec2<f32>(1.0f, 2.0f));
-  Func("a_func", {}, ty.void_(), {CallStmt(expr)},
-       {Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-  auto got = DumpBuilder(b);
-  auto* expect = R"(OpCapability Shader
-%11 = OpExtInstImport "GLSL.std.450"
-OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %3 "a_func"
-OpExecutionMode %3 OriginUpperLeft
-OpName %3 "a_func"
-OpName %6 "__frexp_result_vec2"
-OpMemberName %6 0 "sig"
-OpMemberName %6 1 "exp"
-OpMemberDecorate %6 0 Offset 0
-OpMemberDecorate %6 1 Offset 8
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%8 = OpTypeFloat 32
-%7 = OpTypeVector %8 2
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%6 = OpTypeStruct %7 %9
-%12 = OpConstant %8 1
-%13 = OpConstant %8 2
-%14 = OpConstantComposite %7 %12 %13
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %11 FrexpStruct %14
-OpReturn
-OpFunctionEnd
-)";
-  EXPECT_EQ(expect, got);
-
-  Validate(b);
-}
-
-TEST_F(IntrinsicBuilderTest, Call_Determinant) {
-  auto* var = Global("var", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call("determinant", "var");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(%12 = OpExtInstImport "GLSL.std.450"
-OpName %1 "var"
-OpName %9 "a_func"
-%5 = OpTypeFloat 32
-%4 = OpTypeVector %5 3
-%3 = OpTypeMatrix %4 3
-%2 = OpTypePointer Private %3
-%6 = OpConstantNull %3
-%1 = OpVariable %2 Private %6
-%8 = OpTypeVoid
-%7 = OpTypeFunction %8
-%9 = OpFunction %8 None %7
-%10 = OpLabel
-%13 = OpLoad %3 %1
-%11 = OpExtInst %5 %12 Determinant %13
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, Call_Transpose) {
-  auto* var = Global("var", ty.mat2x3<f32>(), ast::StorageClass::kPrivate);
-  auto* expr = Call("transpose", "var");
-  auto* func = Func("a_func", {}, ty.void_(),
-                    {
-                        Assign(Phony(), expr),
-                    });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  EXPECT_EQ(DumpBuilder(b), R"(OpName %1 "var"
-OpName %9 "a_func"
-%5 = OpTypeFloat 32
-%4 = OpTypeVector %5 3
-%3 = OpTypeMatrix %4 2
-%2 = OpTypePointer Private %3
-%6 = OpConstantNull %3
-%1 = OpVariable %2 Private %6
-%8 = OpTypeVoid
-%7 = OpTypeFunction %8
-%13 = OpTypeVector %5 2
-%12 = OpTypeMatrix %13 3
-%9 = OpFunction %8 None %7
-%10 = OpLabel
-%14 = OpLoad %3 %1
-%11 = OpTranspose %12 %14
-OpReturn
-OpFunctionEnd
-)");
-}
-
-TEST_F(IntrinsicBuilderTest, Call_ArrayLength) {
-  auto* s = Structure("my_struct", {Member("a", ty.array<f32>(4))},
-                      {create<ast::StructBlockAttribute>()});
-  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(1),
-             create<ast::GroupAttribute>(2),
-         });
-  auto* expr = Call("arrayLength", AddressOf(MemberAccessor("b", "a")));
-
-  Func("a_func", {}, ty.void_(),
-       ast::StatementList{
-           CallStmt(expr),
-       },
-       ast::AttributeList{
-           Stage(ast::PipelineStage::kFragment),
-       });
-
-  spirv::Builder& b = SanitizeAndBuild();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  auto* expected_types = R"(%5 = OpTypeFloat 32
-%4 = OpTypeRuntimeArray %5
-%3 = OpTypeStruct %4
-%2 = OpTypePointer StorageBuffer %3
-%1 = OpVariable %2 StorageBuffer
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%11 = OpTypeInt 32 0
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  auto* expected_instructions = R"(%10 = OpArrayLength %11 %1 0
-OpReturn
-)";
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-
-TEST_F(IntrinsicBuilderTest, Call_ArrayLength_OtherMembersInStruct) {
-  auto* s = Structure("my_struct",
-                      {
-                          Member("z", ty.f32()),
-                          Member(4, "a", ty.array<f32>(4)),
-                      },
-                      {create<ast::StructBlockAttribute>()});
-  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(1),
-             create<ast::GroupAttribute>(2),
-         });
-  auto* expr = Call("arrayLength", AddressOf(MemberAccessor("b", "a")));
-
-  Func("a_func", {}, ty.void_(),
-       ast::StatementList{
-           CallStmt(expr),
-       },
-       ast::AttributeList{
-           Stage(ast::PipelineStage::kFragment),
-       });
-
-  spirv::Builder& b = SanitizeAndBuild();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  auto* expected_types = R"(%4 = OpTypeFloat 32
-%5 = OpTypeRuntimeArray %4
-%3 = OpTypeStruct %4 %5
-%2 = OpTypePointer StorageBuffer %3
-%1 = OpVariable %2 StorageBuffer
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%11 = OpTypeInt 32 0
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  auto* expected_instructions = R"(%10 = OpArrayLength %11 %1 1
-OpReturn
-)";
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-
-TEST_F(IntrinsicBuilderTest, Call_ArrayLength_ViaLets) {
-  auto* s = Structure("my_struct", {Member("a", ty.array<f32>(4))},
-                      {create<ast::StructBlockAttribute>()});
-  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(1),
-             create<ast::GroupAttribute>(2),
-         });
-
-  auto* p = Const("p", nullptr, AddressOf("b"));
-  auto* p2 = Const("p2", nullptr, AddressOf(MemberAccessor(Deref(p), "a")));
-  auto* expr = Call("arrayLength", p2);
-
-  Func("a_func", {}, ty.void_(),
-       ast::StatementList{
-           Decl(p),
-           Decl(p2),
-           CallStmt(expr),
-       },
-       ast::AttributeList{
-           Stage(ast::PipelineStage::kFragment),
-       });
-
-  spirv::Builder& b = SanitizeAndBuild();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  auto* expected_types = R"(%5 = OpTypeFloat 32
-%4 = OpTypeRuntimeArray %5
-%3 = OpTypeStruct %4
-%2 = OpTypePointer StorageBuffer %3
-%1 = OpVariable %2 StorageBuffer
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%11 = OpTypeInt 32 0
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  auto* expected_instructions = R"(%10 = OpArrayLength %11 %1 0
-OpReturn
-)";
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-
-TEST_F(IntrinsicBuilderTest, Call_ArrayLength_ViaLets_WithPtrNoise) {
-  // [[block]] struct my_struct {
-  //   a : @stride(4) array<f32>;
-  // };
-  // @binding(1) @group(2) var<storage, read> b : my_struct;
-  //
-  // fn a_func() {
-  //   let p = &*&b;
-  //   let p2 = &*p;
-  //   let p3 = &((*p).a);
-  //   arrayLength(&*p3);
-  // }
-  auto* s = Structure("my_struct", {Member("a", ty.array<f32>(4))},
-                      {create<ast::StructBlockAttribute>()});
-  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(1),
-             create<ast::GroupAttribute>(2),
-         });
-
-  auto* p = Const("p", nullptr, AddressOf(Deref(AddressOf("b"))));
-  auto* p2 = Const("p2", nullptr, AddressOf(Deref(p)));
-  auto* p3 = Const("p3", nullptr, AddressOf(MemberAccessor(Deref(p2), "a")));
-  auto* expr = Call("arrayLength", AddressOf(Deref(p3)));
-
-  Func("a_func", {}, ty.void_(),
-       ast::StatementList{
-           Decl(p),
-           Decl(p2),
-           Decl(p3),
-           CallStmt(expr),
-       },
-       ast::AttributeList{
-           Stage(ast::PipelineStage::kFragment),
-       });
-
-  spirv::Builder& b = SanitizeAndBuild();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  auto* expected_types = R"(%5 = OpTypeFloat 32
-%4 = OpTypeRuntimeArray %5
-%3 = OpTypeStruct %4
-%2 = OpTypePointer StorageBuffer %3
-%1 = OpVariable %2 StorageBuffer
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%11 = OpTypeInt 32 0
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  auto* expected_instructions = R"(%10 = OpArrayLength %11 %1 0
-OpReturn
-)";
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-
-TEST_F(IntrinsicBuilderTest, Call_AtomicLoad) {
-  // [[block]] struct S {
-  //   u : atomic<u32>;
-  //   i : atomic<i32>;
-  // }
-  //
-  // @binding(1) @group(2) var<storage, read_write> b : S;
-  //
-  // fn a_func() {
-  //   let u : u32 = atomicLoad(&b.u);
-  //   let i : i32 = atomicLoad(&b.i);
-  // }
-  auto* s = Structure("S",
-                      {
-                          Member("u", ty.atomic<u32>()),
-                          Member("i", ty.atomic<i32>()),
-                      },
-                      {create<ast::StructBlockAttribute>()});
-  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(1),
-             create<ast::GroupAttribute>(2),
-         });
-
-  Func("a_func", {}, ty.void_(),
-       ast::StatementList{
-           Decl(Const("u", ty.u32(),
-                      Call("atomicLoad", AddressOf(MemberAccessor("b", "u"))))),
-           Decl(Const("i", ty.i32(),
-                      Call("atomicLoad", AddressOf(MemberAccessor("b", "i"))))),
-       },
-       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = SanitizeAndBuild();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  auto* expected_types = R"(%4 = OpTypeInt 32 0
-%5 = OpTypeInt 32 1
-%3 = OpTypeStruct %4 %5
-%2 = OpTypePointer StorageBuffer %3
-%1 = OpVariable %2 StorageBuffer
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%11 = OpConstant %4 1
-%12 = OpConstant %4 0
-%14 = OpTypePointer StorageBuffer %4
-%18 = OpTypePointer StorageBuffer %5
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  auto* expected_instructions = R"(%15 = OpAccessChain %14 %1 %12
-%10 = OpAtomicLoad %4 %15 %11 %12
-%19 = OpAccessChain %18 %1 %11
-%16 = OpAtomicLoad %5 %19 %11 %12
-OpReturn
-)";
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-
-TEST_F(IntrinsicBuilderTest, Call_AtomicStore) {
-  // [[block]] struct S {
-  //   u : atomic<u32>;
-  //   i : atomic<i32>;
-  // }
-  //
-  // @binding(1) @group(2) var<storage, read_write> b : S;
-  //
-  // fn a_func() {
-  //   var u = 1u;
-  //   var i = 2;
-  //   atomicStore(&b.u, u);
-  //   atomicStore(&b.i, i);
-  // }
-  auto* s = Structure("S",
-                      {
-                          Member("u", ty.atomic<u32>()),
-                          Member("i", ty.atomic<i32>()),
-                      },
-                      {create<ast::StructBlockAttribute>()});
-  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(1),
-             create<ast::GroupAttribute>(2),
-         });
-
-  Func("a_func", {}, ty.void_(),
-       ast::StatementList{
-           Decl(Var("u", nullptr, Expr(1u))),
-           Decl(Var("i", nullptr, Expr(2))),
-           CallStmt(
-               Call("atomicStore", AddressOf(MemberAccessor("b", "u")), "u")),
-           CallStmt(
-               Call("atomicStore", AddressOf(MemberAccessor("b", "i")), "i")),
-       },
-       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = SanitizeAndBuild();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  auto* expected_types = R"(%4 = OpTypeInt 32 0
-%5 = OpTypeInt 32 1
-%3 = OpTypeStruct %4 %5
-%2 = OpTypePointer StorageBuffer %3
-%1 = OpVariable %2 StorageBuffer
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%10 = OpConstant %4 1
-%12 = OpTypePointer Function %4
-%13 = OpConstantNull %4
-%14 = OpConstant %5 2
-%16 = OpTypePointer Function %5
-%17 = OpConstantNull %5
-%19 = OpConstant %4 0
-%21 = OpTypePointer StorageBuffer %4
-%26 = OpTypePointer StorageBuffer %5
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  auto* expected_instructions = R"(OpStore %11 %10
-OpStore %15 %14
-%22 = OpAccessChain %21 %1 %19
-%23 = OpLoad %4 %11
-OpAtomicStore %22 %10 %19 %23
-%27 = OpAccessChain %26 %1 %10
-%28 = OpLoad %5 %15
-OpAtomicStore %27 %10 %19 %28
-OpReturn
-)";
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-
-using Intrinsic_Builtin_AtomicRMW_i32 =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_AtomicRMW_i32, Test) {
-  // [[block]] struct S {
-  //   v : atomic<i32>;
-  // }
-  //
-  // @binding(1) @group(2) var<storage, read_write> b : S;
-  //
-  // fn a_func() {
-  //   var v = 10;
-  //   let x : i32 = atomicOP(&b.v, v);
-  // }
-  auto* s = Structure("S",
-                      {
-                          Member("v", ty.atomic<i32>()),
-                      },
-                      {create<ast::StructBlockAttribute>()});
-  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(1),
-             create<ast::GroupAttribute>(2),
-         });
-
-  Func("a_func", {}, ty.void_(),
-       ast::StatementList{
-           Decl(Var("v", nullptr, Expr(10))),
-           Decl(Const("x", ty.i32(),
-                      Call(GetParam().name, AddressOf(MemberAccessor("b", "v")),
-                           "v"))),
-       },
-       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = SanitizeAndBuild();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  std::string expected_types = R"(%4 = OpTypeInt 32 1
-%3 = OpTypeStruct %4
-%2 = OpTypePointer StorageBuffer %3
-%1 = OpVariable %2 StorageBuffer
-%6 = OpTypeVoid
-%5 = OpTypeFunction %6
-%9 = OpConstant %4 10
-%11 = OpTypePointer Function %4
-%12 = OpConstantNull %4
-%14 = OpTypeInt 32 0
-%15 = OpConstant %14 1
-%16 = OpConstant %14 0
-%18 = OpTypePointer StorageBuffer %4
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  std::string expected_instructions = R"(OpStore %10 %9
-%19 = OpAccessChain %18 %1 %16
-%20 = OpLoad %4 %10
-)";
-  expected_instructions += "%13 = " + GetParam().op + " %4 %19 %15 %16 %20\n";
-  expected_instructions += "OpReturn\n";
-
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-INSTANTIATE_TEST_SUITE_P(
-    IntrinsicBuilderTest,
-    Intrinsic_Builtin_AtomicRMW_i32,
-    testing::Values(IntrinsicData{"atomicAdd", "OpAtomicIAdd"},
-                    IntrinsicData{"atomicMax", "OpAtomicSMax"},
-                    IntrinsicData{"atomicMin", "OpAtomicSMin"},
-                    IntrinsicData{"atomicAnd", "OpAtomicAnd"},
-                    IntrinsicData{"atomicOr", "OpAtomicOr"},
-                    IntrinsicData{"atomicXor", "OpAtomicXor"}));
-
-using Intrinsic_Builtin_AtomicRMW_u32 =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_AtomicRMW_u32, Test) {
-  // [[block]] struct S {
-  //   v : atomic<u32>;
-  // }
-  //
-  // @binding(1) @group(2) var<storage, read_write> b : S;
-  //
-  // fn a_func() {
-  //   var v = 10u;
-  //   let x : u32 = atomicOP(&b.v, v);
-  // }
-  auto* s = Structure("S",
-                      {
-                          Member("v", ty.atomic<u32>()),
-                      },
-                      {create<ast::StructBlockAttribute>()});
-  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(1),
-             create<ast::GroupAttribute>(2),
-         });
-
-  Func("a_func", {}, ty.void_(),
-       ast::StatementList{
-           Decl(Var("v", nullptr, Expr(10u))),
-           Decl(Const("x", ty.u32(),
-                      Call(GetParam().name, AddressOf(MemberAccessor("b", "v")),
-                           "v"))),
-       },
-       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = SanitizeAndBuild();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  std::string expected_types = R"(%4 = OpTypeInt 32 0
-%3 = OpTypeStruct %4
-%2 = OpTypePointer StorageBuffer %3
-%1 = OpVariable %2 StorageBuffer
-%6 = OpTypeVoid
-%5 = OpTypeFunction %6
-%9 = OpConstant %4 10
-%11 = OpTypePointer Function %4
-%12 = OpConstantNull %4
-%14 = OpConstant %4 1
-%15 = OpConstant %4 0
-%17 = OpTypePointer StorageBuffer %4
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  std::string expected_instructions = R"(OpStore %10 %9
-%18 = OpAccessChain %17 %1 %15
-%19 = OpLoad %4 %10
-)";
-  expected_instructions += "%13 = " + GetParam().op + " %4 %18 %14 %15 %19\n";
-  expected_instructions += "OpReturn\n";
-
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-INSTANTIATE_TEST_SUITE_P(
-    IntrinsicBuilderTest,
-    Intrinsic_Builtin_AtomicRMW_u32,
-    testing::Values(IntrinsicData{"atomicAdd", "OpAtomicIAdd"},
-                    IntrinsicData{"atomicMax", "OpAtomicUMax"},
-                    IntrinsicData{"atomicMin", "OpAtomicUMin"},
-                    IntrinsicData{"atomicAnd", "OpAtomicAnd"},
-                    IntrinsicData{"atomicOr", "OpAtomicOr"},
-                    IntrinsicData{"atomicXor", "OpAtomicXor"}));
-
-TEST_F(IntrinsicBuilderTest, Call_AtomicExchange) {
-  // [[block]] struct S {
-  //   u : atomic<u32>;
-  //   i : atomic<i32>;
-  // }
-  //
-  // @binding(1) @group(2) var<storage, read_write> b : S;
-  //
-  // fn a_func() {
-  //   var u = 10u;
-  //   var i = 10;
-  //   let r : u32 = atomicExchange(&b.u, u);
-  //   let s : i32 = atomicExchange(&b.i, i);
-  // }
-  auto* s = Structure("S",
-                      {
-                          Member("u", ty.atomic<u32>()),
-                          Member("i", ty.atomic<i32>()),
-                      },
-                      {create<ast::StructBlockAttribute>()});
-  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(1),
-             create<ast::GroupAttribute>(2),
-         });
-
-  Func("a_func", {}, ty.void_(),
-       ast::StatementList{
-           Decl(Var("u", nullptr, Expr(10u))),
-           Decl(Var("i", nullptr, Expr(10))),
-           Decl(Const("r", ty.u32(),
-                      Call("atomicExchange",
-                           AddressOf(MemberAccessor("b", "u")), "u"))),
-           Decl(Const("s", ty.i32(),
-                      Call("atomicExchange",
-                           AddressOf(MemberAccessor("b", "i")), "i"))),
-       },
-       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = SanitizeAndBuild();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  auto* expected_types = R"(%4 = OpTypeInt 32 0
-%5 = OpTypeInt 32 1
-%3 = OpTypeStruct %4 %5
-%2 = OpTypePointer StorageBuffer %3
-%1 = OpVariable %2 StorageBuffer
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%10 = OpConstant %4 10
-%12 = OpTypePointer Function %4
-%13 = OpConstantNull %4
-%14 = OpConstant %5 10
-%16 = OpTypePointer Function %5
-%17 = OpConstantNull %5
-%19 = OpConstant %4 1
-%20 = OpConstant %4 0
-%22 = OpTypePointer StorageBuffer %4
-%27 = OpTypePointer StorageBuffer %5
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  auto* expected_instructions = R"(OpStore %11 %10
-OpStore %15 %14
-%23 = OpAccessChain %22 %1 %20
-%24 = OpLoad %4 %11
-%18 = OpAtomicExchange %4 %23 %19 %20 %24
-%28 = OpAccessChain %27 %1 %19
-%29 = OpLoad %5 %15
-%25 = OpAtomicExchange %5 %28 %19 %20 %29
-OpReturn
-)";
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-
-TEST_F(IntrinsicBuilderTest, Call_AtomicCompareExchangeWeak) {
-  // [[block]] struct S {
-  //   u : atomic<u32>;
-  //   i : atomic<i32>;
-  // }
-  //
-  // @binding(1) @group(2) var<storage, read_write> b : S;
-  //
-  // fn a_func() {
-  //   let u : vec2<u32> = atomicCompareExchangeWeak(&b.u, 10u);
-  //   let i : vec2<i32> = atomicCompareExchangeWeak(&b.i, 10);
-  // }
-  auto* s = Structure("S",
-                      {
-                          Member("u", ty.atomic<u32>()),
-                          Member("i", ty.atomic<i32>()),
-                      },
-                      {create<ast::StructBlockAttribute>()});
-  Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-         ast::AttributeList{
-             create<ast::BindingAttribute>(1),
-             create<ast::GroupAttribute>(2),
-         });
-
-  Func("a_func", {}, ty.void_(),
-       ast::StatementList{
-           Decl(Const("u", ty.vec2<u32>(),
-                      Call("atomicCompareExchangeWeak",
-                           AddressOf(MemberAccessor("b", "u")), 10u, 20u))),
-           Decl(Const("i", ty.vec2<i32>(),
-                      Call("atomicCompareExchangeWeak",
-                           AddressOf(MemberAccessor("b", "i")), 10, 20))),
-       },
-       ast::AttributeList{Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = SanitizeAndBuild();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  auto* expected_types = R"(%4 = OpTypeInt 32 0
-%5 = OpTypeInt 32 1
-%3 = OpTypeStruct %4 %5
-%2 = OpTypePointer StorageBuffer %3
-%1 = OpVariable %2 StorageBuffer
-%7 = OpTypeVoid
-%6 = OpTypeFunction %7
-%11 = OpTypeVector %4 2
-%12 = OpConstant %4 1
-%13 = OpConstant %4 0
-%15 = OpTypePointer StorageBuffer %4
-%17 = OpConstant %4 20
-%18 = OpConstant %4 10
-%19 = OpTypeBool
-%24 = OpTypeVector %5 2
-%26 = OpTypePointer StorageBuffer %5
-%28 = OpConstant %5 20
-%29 = OpConstant %5 10
-%32 = OpConstant %5 0
-%33 = OpConstant %5 1
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  auto* expected_instructions = R"(%16 = OpAccessChain %15 %1 %13
-%20 = OpAtomicCompareExchange %4 %16 %12 %13 %13 %17 %18
-%21 = OpIEqual %19 %20 %17
-%22 = OpSelect %4 %21 %12 %13
-%10 = OpCompositeConstruct %11 %20 %22
-%27 = OpAccessChain %26 %1 %12
-%30 = OpAtomicCompareExchange %5 %27 %12 %13 %13 %28 %29
-%31 = OpIEqual %19 %30 %28
-%34 = OpSelect %5 %31 %33 %32
-%23 = OpCompositeConstruct %24 %30 %34
-OpReturn
-)";
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-
-using Intrinsic_Builtin_DataPacking_Test =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_DataPacking_Test, Binary) {
-  auto param = GetParam();
-
-  bool pack4 = param.name == "pack4x8snorm" || param.name == "pack4x8unorm";
-  auto* call = pack4 ? Call(param.name, vec4<float>(1.0f, 1.0f, 1.0f, 1.0f))
-                     : Call(param.name, vec2<float>(1.0f, 1.0f));
-  auto* func = Func("a_func", {}, ty.void_(), {CallStmt(call)});
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  if (pack4) {
-    EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeInt 32 0
-%9 = OpTypeFloat 32
-%8 = OpTypeVector %9 4
-%10 = OpConstant %9 1
-%11 = OpConstantComposite %8 %10 %10 %10 %10
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 )" + param.op +
-                                  R"( %11
-OpReturn
-OpFunctionEnd
-)");
-  } else {
-    EXPECT_EQ(DumpBuilder(b), R"(%7 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeInt 32 0
-%9 = OpTypeFloat 32
-%8 = OpTypeVector %9 2
-%10 = OpConstant %9 1
-%11 = OpConstantComposite %8 %10 %10
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %7 )" + param.op +
-                                  R"( %11
-OpReturn
-OpFunctionEnd
-)");
-  }
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    IntrinsicBuilderTest,
-    Intrinsic_Builtin_DataPacking_Test,
-    testing::Values(IntrinsicData{"pack4x8snorm", "PackSnorm4x8"},
-                    IntrinsicData{"pack4x8unorm", "PackUnorm4x8"},
-                    IntrinsicData{"pack2x16snorm", "PackSnorm2x16"},
-                    IntrinsicData{"pack2x16unorm", "PackUnorm2x16"},
-                    IntrinsicData{"pack2x16float", "PackHalf2x16"}));
-
-using Intrinsic_Builtin_DataUnpacking_Test =
-    IntrinsicBuilderTestWithParam<IntrinsicData>;
-TEST_P(Intrinsic_Builtin_DataUnpacking_Test, Binary) {
-  auto param = GetParam();
-
-  bool pack4 = param.name == "unpack4x8snorm" || param.name == "unpack4x8unorm";
-  auto* func = Func("a_func", {}, ty.void_(), {CallStmt(Call(param.name, 1u))});
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
-
-  if (pack4) {
-    EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeFloat 32
-%6 = OpTypeVector %7 4
-%9 = OpTypeInt 32 0
-%10 = OpConstant %9 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 )" + param.op +
-                                  R"( %10
-OpReturn
-OpFunctionEnd
-)");
-  } else {
-    EXPECT_EQ(DumpBuilder(b), R"(%8 = OpExtInstImport "GLSL.std.450"
-OpName %3 "a_func"
-%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%7 = OpTypeFloat 32
-%6 = OpTypeVector %7 2
-%9 = OpTypeInt 32 0
-%10 = OpConstant %9 1
-%3 = OpFunction %2 None %1
-%4 = OpLabel
-%5 = OpExtInst %6 %8 )" + param.op +
-                                  R"( %10
-OpReturn
-OpFunctionEnd
-)");
-  }
-}
-
-INSTANTIATE_TEST_SUITE_P(
-    IntrinsicBuilderTest,
-    Intrinsic_Builtin_DataUnpacking_Test,
-    testing::Values(IntrinsicData{"unpack4x8snorm", "UnpackSnorm4x8"},
-                    IntrinsicData{"unpack4x8unorm", "UnpackUnorm4x8"},
-                    IntrinsicData{"unpack2x16snorm", "UnpackSnorm2x16"},
-                    IntrinsicData{"unpack2x16unorm", "UnpackUnorm2x16"},
-                    IntrinsicData{"unpack2x16float", "UnpackHalf2x16"}));
-
-TEST_F(IntrinsicBuilderTest, Call_WorkgroupBarrier) {
-  Func("f", {}, ty.void_(),
-       ast::StatementList{
-           CallStmt(Call("workgroupBarrier")),
-       },
-       ast::AttributeList{
-           Stage(ast::PipelineStage::kCompute),
-           WorkgroupSize(1),
-       });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  auto* expected_types = R"(%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeInt 32 0
-%7 = OpConstant %6 2
-%8 = OpConstant %6 264
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  auto* expected_instructions = R"(OpControlBarrier %7 %7 %8
-OpReturn
-)";
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-
-TEST_F(IntrinsicBuilderTest, Call_StorageBarrier) {
-  Func("f", {}, ty.void_(),
-       ast::StatementList{
-           CallStmt(Call("storageBarrier")),
-       },
-       ast::AttributeList{
-           Stage(ast::PipelineStage::kCompute),
-           WorkgroupSize(1),
-       });
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  ASSERT_EQ(b.functions().size(), 1u);
-
-  auto* expected_types = R"(%2 = OpTypeVoid
-%1 = OpTypeFunction %2
-%6 = OpTypeInt 32 0
-%7 = OpConstant %6 2
-%8 = OpConstant %6 72
-)";
-  auto got_types = DumpInstructions(b.types());
-  EXPECT_EQ(expected_types, got_types);
-
-  auto* expected_instructions = R"(OpControlBarrier %7 %7 %8
-OpReturn
-)";
-  auto got_instructions = DumpInstructions(b.functions()[0].instructions());
-  EXPECT_EQ(expected_instructions, got_instructions);
-
-  Validate(b);
-}
-
-}  // namespace
-}  // namespace spirv
-}  // namespace writer
-}  // namespace tint
diff --git a/src/writer/spirv/builder_intrinsic_texture_test.cc b/src/writer/spirv/builder_intrinsic_texture_test.cc
deleted file mode 100644
index 1cffb02..0000000
--- a/src/writer/spirv/builder_intrinsic_texture_test.cc
+++ /dev/null
@@ -1,3755 +0,0 @@
-// Copyright 2020 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "gmock/gmock.h"
-#include "src/ast/call_statement.h"
-#include "src/ast/intrinsic_texture_helper_test.h"
-#include "src/ast/stage_attribute.h"
-#include "src/writer/spirv/spv_dump.h"
-#include "src/writer/spirv/test_helper.h"
-
-namespace tint {
-namespace writer {
-namespace spirv {
-namespace {
-
-struct expected_texture_overload_spirv {
-  std::string types;
-  std::string instructions;
-  std::string capabilities;
-};
-
-expected_texture_overload_spirv expected_texture_overload(
-    ast::intrinsic::test::ValidTextureOverload overload) {
-  using ValidTextureOverload = ast::intrinsic::test::ValidTextureOverload;
-  switch (overload) {
-    case ValidTextureOverload::kDimensions1d:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-%11 = OpConstant %9 0
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %10 %11
-)",
-          R"(
-OpCapability Sampled1D
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensions2d:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpConstant %10 0
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensions2dLevel:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpConstant %10 1
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensions2dArray:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpTypeVector %10 3
-%14 = OpConstant %10 0
-)",
-          R"(
-%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
-%8 = OpVectorShuffle %9 %11 %11 0 1
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensions2dArrayLevel:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpTypeVector %10 3
-%14 = OpConstant %10 1
-)",
-          R"(
-%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
-%8 = OpVectorShuffle %9 %11 %11 0 1
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensions3d:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 3
-%12 = OpConstant %10 0
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensions3dLevel:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 3
-%12 = OpConstant %10 1
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsCube:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpConstant %10 0
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsCubeLevel:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpConstant %10 1
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsCubeArray:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpTypeVector %10 3
-%14 = OpConstant %10 0
-)",
-          R"(
-%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
-%8 = OpVectorShuffle %9 %11 %11 0 1
-)",
-          R"(
-OpCapability SampledCubeArray
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsCubeArrayLevel:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpTypeVector %10 3
-%14 = OpConstant %10 1
-)",
-          R"(
-%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
-%8 = OpVectorShuffle %9 %11 %11 0 1
-)",
-          R"(
-OpCapability SampledCubeArray
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsMultisampled2d:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySize %9 %11
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsDepth2d:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpConstant %10 0
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsDepth2dLevel:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpConstant %10 1
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsDepth2dArray:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpTypeVector %10 3
-%14 = OpConstant %10 0
-)",
-          R"(
-%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
-%8 = OpVectorShuffle %9 %11 %11 0 1
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpTypeVector %10 3
-%14 = OpConstant %10 1
-)",
-          R"(
-%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
-%8 = OpVectorShuffle %9 %11 %11 0 1
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsDepthCube:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpConstant %10 0
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsDepthCubeLevel:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpConstant %10 1
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsDepthCubeArray:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpTypeVector %10 3
-%14 = OpConstant %10 0
-)",
-          R"(
-%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
-%8 = OpVectorShuffle %9 %11 %11 0 1
-)",
-          R"(
-OpCapability SampledCubeArray
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpTypeVector %10 3
-%14 = OpConstant %10 1
-)",
-          R"(
-%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
-%8 = OpVectorShuffle %9 %11 %11 0 1
-)",
-          R"(
-OpCapability SampledCubeArray
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsDepthMultisampled2d:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 1 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySize %9 %11
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsStorageWO1d:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 1D 0 0 0 2 Rgba32f
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQuerySize %9 %10
-)",
-          R"(
-OpCapability Image1D
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsStorageWO2d:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 2 Rgba32f
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySize %9 %11
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsStorageWO2dArray:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 2 Rgba32f
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 2
-%12 = OpTypeVector %10 3
-)",
-          R"(
-%13 = OpLoad %3 %1
-%11 = OpImageQuerySize %12 %13
-%8 = OpVectorShuffle %9 %11 %11 0 1
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kDimensionsStorageWO3d:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 2 Rgba32f
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
-%9 = OpTypeVector %10 3
-)",
-          R"(
-%11 = OpLoad %3 %1
-%8 = OpImageQuerySize %9 %11
-)",
-          R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kGather2dF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 0
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageGather %9 %13 %17 %19
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGather2dOffsetF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 0
-%20 = OpTypeVector %18 2
-%21 = OpConstant %18 3
-%22 = OpConstant %18 4
-%23 = OpConstantComposite %20 %21 %22
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageGather %9 %13 %17 %19 ConstOffset %23
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGather2dArrayF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpConstant %18 0
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageGather %9 %13 %20 %21
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGather2dArrayOffsetF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpConstant %18 0
-%22 = OpTypeVector %18 2
-%23 = OpConstant %18 4
-%24 = OpConstant %18 5
-%25 = OpConstantComposite %22 %23 %24
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageGather %9 %13 %20 %21 ConstOffset %25
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherCubeF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpTypeInt 32 1
-%20 = OpConstant %19 0
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageGather %9 %13 %18 %20
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherCubeArrayF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 4
-%21 = OpConstant %18 0
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %9 %14 %15 %16 %17
-%8 = OpImageGather %9 %13 %20 %21
-)",
-              R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kGatherDepth2dF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 0
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageGather %9 %13 %17 %19
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherDepth2dOffsetF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 0
-%20 = OpTypeVector %18 2
-%21 = OpConstant %18 3
-%22 = OpConstant %18 4
-%23 = OpConstantComposite %20 %21 %22
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageGather %9 %13 %17 %19 ConstOffset %23
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherDepth2dArrayF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpConstant %18 0
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageGather %9 %13 %20 %21
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpConstant %18 0
-%22 = OpTypeVector %18 2
-%23 = OpConstant %18 4
-%24 = OpConstant %18 5
-%25 = OpConstantComposite %22 %23 %24
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageGather %9 %13 %20 %21 ConstOffset %25
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherDepthCubeF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpTypeInt 32 1
-%20 = OpConstant %19 0
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageGather %9 %13 %18 %20
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherDepthCubeArrayF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 4
-%21 = OpConstant %18 0
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %9 %14 %15 %16 %17
-%8 = OpImageGather %9 %13 %20 %21
-)",
-              R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kGatherCompareDepth2dF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpConstant %4 3
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageDrefGather %9 %13 %17 %18
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpConstant %4 3
-%20 = OpTypeInt 32 1
-%19 = OpTypeVector %20 2
-%21 = OpConstant %20 4
-%22 = OpConstant %20 5
-%23 = OpConstantComposite %19 %21 %22
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageDrefGather %9 %13 %17 %18 ConstOffset %23
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherCompareDepth2dArrayF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpConstant %4 4
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageDrefGather %9 %13 %20 %21
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherCompareDepth2dArrayOffsetF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpConstant %4 4
-%22 = OpTypeVector %18 2
-%23 = OpConstant %18 5
-%24 = OpConstant %18 6
-%25 = OpConstantComposite %22 %23 %24
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageDrefGather %9 %13 %20 %21 ConstOffset %25
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherCompareDepthCubeF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpConstant %4 4
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageDrefGather %9 %13 %18 %19
-)",
-              R"(
-)"};
-    case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 4
-%21 = OpConstant %4 5
-)",
-              R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %9 %14 %15 %16 %17
-%8 = OpImageDrefGather %9 %13 %20 %21
-)",
-              R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kNumLayers2dArray:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-%11 = OpTypeVector %9 3
-%13 = OpConstant %9 0
-)",
-              R"(
-%12 = OpLoad %3 %1
-%10 = OpImageQuerySizeLod %11 %12 %13
-%8 = OpCompositeExtract %9 %10 2
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLayersCubeArray:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-%11 = OpTypeVector %9 3
-%13 = OpConstant %9 0
-)",
-              R"(
-%12 = OpLoad %3 %1
-%10 = OpImageQuerySizeLod %11 %12 %13
-%8 = OpCompositeExtract %9 %10 2
-)",
-              R"(
-OpCapability SampledCubeArray
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLayersDepth2dArray:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-%11 = OpTypeVector %9 3
-%13 = OpConstant %9 0
-)",
-              R"(
-%12 = OpLoad %3 %1
-%10 = OpImageQuerySizeLod %11 %12 %13
-%8 = OpCompositeExtract %9 %10 2
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLayersDepthCubeArray:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-%11 = OpTypeVector %9 3
-%13 = OpConstant %9 0
-)",
-              R"(
-%12 = OpLoad %3 %1
-%10 = OpImageQuerySizeLod %11 %12 %13
-%8 = OpCompositeExtract %9 %10 2
-)",
-              R"(
-OpCapability SampledCubeArray
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLayersStorageWO2dArray:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 2 Rgba32f
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-%11 = OpTypeVector %9 3
-)",
-              R"(
-%12 = OpLoad %3 %1
-%10 = OpImageQuerySize %11 %12
-%8 = OpCompositeExtract %9 %10 2
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLevels2d:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQueryLevels %9 %10
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLevels2dArray:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQueryLevels %9 %10
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLevels3d:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQueryLevels %9 %10
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLevelsCube:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQueryLevels %9 %10
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLevelsCubeArray:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQueryLevels %9 %10
-)",
-              R"(
-OpCapability SampledCubeArray
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLevelsDepth2d:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQueryLevels %9 %10
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLevelsDepth2dArray:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQueryLevels %9 %10
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLevelsDepthCube:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQueryLevels %9 %10
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumLevelsDepthCubeArray:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQueryLevels %9 %10
-)",
-              R"(
-OpCapability SampledCubeArray
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumSamplesMultisampled2d:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQuerySamples %9 %10
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
-      return {R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 1 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-)",
-              R"(
-%10 = OpLoad %3 %1
-%8 = OpImageQuerySamples %9 %10
-)",
-              R"(
-OpCapability ImageQuery
-)"};
-    case ValidTextureOverload::kSample1dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpConstant %4 1
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %14
-)",
-          R"(
-OpCapability Sampled1D
-)"};
-    case ValidTextureOverload::kSample2dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %17
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSample2dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%19 = OpTypeInt 32 1
-%18 = OpTypeVector %19 2
-%20 = OpConstant %19 3
-%21 = OpConstant %19 4
-%22 = OpConstantComposite %18 %20 %21
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %17 ConstOffset %22
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSample2dArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageSampleImplicitLod %9 %13 %20
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSample2dArrayOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpTypeVector %18 2
-%22 = OpConstant %18 4
-%23 = OpConstant %18 5
-%24 = OpConstantComposite %21 %22 %23
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageSampleImplicitLod %9 %13 %20 ConstOffset %24
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSample3dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %18
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSample3dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%20 = OpTypeInt 32 1
-%19 = OpTypeVector %20 3
-%21 = OpConstant %20 4
-%22 = OpConstant %20 5
-%23 = OpConstant %20 6
-%24 = OpConstantComposite %19 %21 %22 %23
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %18 ConstOffset %24
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCubeF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %18
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCubeArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 4
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %9 %14 %15 %16 %17
-%8 = OpImageSampleImplicitLod %9 %13 %20
-)",
-          R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kSampleDepth2dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpTypeVector %4 2
-%16 = OpConstant %4 1
-%17 = OpConstant %4 2
-%18 = OpConstantComposite %15 %16 %17
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%9 = OpImageSampleImplicitLod %10 %14 %18
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleDepth2dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpTypeVector %4 2
-%16 = OpConstant %4 1
-%17 = OpConstant %4 2
-%18 = OpConstantComposite %15 %16 %17
-%20 = OpTypeInt 32 1
-%19 = OpTypeVector %20 2
-%21 = OpConstant %20 3
-%22 = OpConstant %20 4
-%23 = OpConstantComposite %19 %21 %22
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%9 = OpImageSampleImplicitLod %10 %14 %18 ConstOffset %23
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleDepth2dArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpTypeVector %4 3
-%16 = OpConstant %4 1
-%17 = OpConstant %4 2
-%19 = OpTypeInt 32 1
-%20 = OpConstant %19 3
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%18 = OpConvertSToF %4 %20
-%21 = OpCompositeConstruct %15 %16 %17 %18
-%9 = OpImageSampleImplicitLod %10 %14 %21
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpTypeVector %4 3
-%16 = OpConstant %4 1
-%17 = OpConstant %4 2
-%19 = OpTypeInt 32 1
-%20 = OpConstant %19 3
-%22 = OpTypeVector %19 2
-%23 = OpConstant %19 4
-%24 = OpConstant %19 5
-%25 = OpConstantComposite %22 %23 %24
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%18 = OpConvertSToF %4 %20
-%21 = OpCompositeConstruct %15 %16 %17 %18
-%9 = OpImageSampleImplicitLod %10 %14 %21 ConstOffset %25
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleDepthCubeF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpTypeVector %4 3
-%16 = OpConstant %4 1
-%17 = OpConstant %4 2
-%18 = OpConstant %4 3
-%19 = OpConstantComposite %15 %16 %17 %18
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%9 = OpImageSampleImplicitLod %10 %14 %19
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleDepthCubeArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%19 = OpTypeInt 32 1
-%20 = OpConstant %19 4
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%18 = OpConvertSToF %4 %20
-%21 = OpCompositeConstruct %10 %15 %16 %17 %18
-%9 = OpImageSampleImplicitLod %10 %14 %21
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kSampleBias2dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpConstant %4 3
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %17 Bias %18
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleBias2dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpConstant %4 3
-%20 = OpTypeInt 32 1
-%19 = OpTypeVector %20 2
-%21 = OpConstant %20 4
-%22 = OpConstant %20 5
-%23 = OpConstantComposite %19 %21 %22
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %17 Bias|ConstOffset %18 %23
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleBias2dArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 4
-%21 = OpConstant %4 3
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageSampleImplicitLod %9 %13 %20 Bias %21
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpConstant %4 4
-%22 = OpTypeVector %18 2
-%23 = OpConstant %18 5
-%24 = OpConstant %18 6
-%25 = OpConstantComposite %22 %23 %24
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageSampleImplicitLod %9 %13 %20 Bias|ConstOffset %21 %25
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleBias3dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpConstant %4 4
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %18 Bias %19
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleBias3dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpConstant %4 4
-%21 = OpTypeInt 32 1
-%20 = OpTypeVector %21 3
-%22 = OpConstant %21 5
-%23 = OpConstant %21 6
-%24 = OpConstant %21 7
-%25 = OpConstantComposite %20 %22 %23 %24
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %18 Bias|ConstOffset %19 %25
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleBiasCubeF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpConstant %4 4
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleImplicitLod %9 %13 %18 Bias %19
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleBiasCubeArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpConstant %4 4
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %9 %14 %15 %16 %17
-%8 = OpImageSampleImplicitLod %9 %13 %20 Bias %21
-)",
-          R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kSampleLevel2dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpConstant %4 3
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleExplicitLod %9 %13 %17 Lod %18
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevel2dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpConstant %4 3
-%20 = OpTypeInt 32 1
-%19 = OpTypeVector %20 2
-%21 = OpConstant %20 4
-%22 = OpConstant %20 5
-%23 = OpConstantComposite %19 %21 %22
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleExplicitLod %9 %13 %17 Lod|ConstOffset %18 %23
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevel2dArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpConstant %4 4
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageSampleExplicitLod %9 %13 %20 Lod %21
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpConstant %4 4
-%22 = OpTypeVector %18 2
-%23 = OpConstant %18 5
-%24 = OpConstant %18 6
-%25 = OpConstantComposite %22 %23 %24
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageSampleExplicitLod %9 %13 %20 Lod|ConstOffset %21 %25
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevel3dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpConstant %4 4
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleExplicitLod %9 %13 %18 Lod %19
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevel3dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpConstant %4 4
-%21 = OpTypeInt 32 1
-%20 = OpTypeVector %21 3
-%22 = OpConstant %21 5
-%23 = OpConstant %21 6
-%24 = OpConstant %21 7
-%25 = OpConstantComposite %20 %22 %23 %24
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleExplicitLod %9 %13 %18 Lod|ConstOffset %19 %25
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevelCubeF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpConstant %4 4
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleExplicitLod %9 %13 %18 Lod %19
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevelCubeArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 4
-%21 = OpConstant %4 5
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %9 %14 %15 %16 %17
-%8 = OpImageSampleExplicitLod %9 %13 %20 Lod %21
-)",
-          R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kSampleLevelDepth2dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpTypeVector %4 2
-%16 = OpConstant %4 1
-%17 = OpConstant %4 2
-%18 = OpConstantComposite %15 %16 %17
-%20 = OpTypeInt 32 1
-%21 = OpConstant %20 3
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%19 = OpConvertSToF %4 %21
-%9 = OpImageSampleExplicitLod %10 %14 %18 Lod %19
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpTypeVector %4 2
-%16 = OpConstant %4 1
-%17 = OpConstant %4 2
-%18 = OpConstantComposite %15 %16 %17
-%20 = OpTypeInt 32 1
-%21 = OpConstant %20 3
-%22 = OpTypeVector %20 2
-%23 = OpConstant %20 4
-%24 = OpConstant %20 5
-%25 = OpConstantComposite %22 %23 %24
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%19 = OpConvertSToF %4 %21
-%9 = OpImageSampleExplicitLod %10 %14 %18 Lod|ConstOffset %19 %25
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpTypeVector %4 3
-%16 = OpConstant %4 1
-%17 = OpConstant %4 2
-%19 = OpTypeInt 32 1
-%20 = OpConstant %19 3
-%23 = OpConstant %19 4
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%18 = OpConvertSToF %4 %20
-%21 = OpCompositeConstruct %15 %16 %17 %18
-%22 = OpConvertSToF %4 %23
-%9 = OpImageSampleExplicitLod %10 %14 %21 Lod %22
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpTypeVector %4 3
-%16 = OpConstant %4 1
-%17 = OpConstant %4 2
-%19 = OpTypeInt 32 1
-%20 = OpConstant %19 3
-%23 = OpConstant %19 4
-%24 = OpTypeVector %19 2
-%25 = OpConstant %19 5
-%26 = OpConstant %19 6
-%27 = OpConstantComposite %24 %25 %26
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%18 = OpConvertSToF %4 %20
-%21 = OpCompositeConstruct %15 %16 %17 %18
-%22 = OpConvertSToF %4 %23
-%9 = OpImageSampleExplicitLod %10 %14 %21 Lod|ConstOffset %22 %27
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevelDepthCubeF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpTypeVector %4 3
-%16 = OpConstant %4 1
-%17 = OpConstant %4 2
-%18 = OpConstant %4 3
-%19 = OpConstantComposite %15 %16 %17 %18
-%21 = OpTypeInt 32 1
-%22 = OpConstant %21 4
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%20 = OpConvertSToF %4 %22
-%9 = OpImageSampleExplicitLod %10 %14 %19 Lod %20
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeSampledImage %3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%19 = OpTypeInt 32 1
-%20 = OpConstant %19 4
-%23 = OpConstant %19 5
-)",
-          R"(
-%11 = OpLoad %7 %5
-%12 = OpLoad %3 %1
-%14 = OpSampledImage %13 %12 %11
-%18 = OpConvertSToF %4 %20
-%21 = OpCompositeConstruct %10 %15 %16 %17 %18
-%22 = OpConvertSToF %4 %23
-%9 = OpImageSampleExplicitLod %10 %14 %21 Lod %22
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kSampleGrad2dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpConstant %4 3
-%19 = OpConstant %4 4
-%20 = OpConstantComposite %14 %18 %19
-%21 = OpConstant %4 5
-%22 = OpConstant %4 6
-%23 = OpConstantComposite %14 %21 %22
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleExplicitLod %9 %13 %17 Grad %20 %23
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleGrad2dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 2
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstantComposite %14 %15 %16
-%18 = OpConstant %4 3
-%19 = OpConstant %4 4
-%20 = OpConstantComposite %14 %18 %19
-%21 = OpConstant %4 5
-%22 = OpConstant %4 6
-%23 = OpConstantComposite %14 %21 %22
-%25 = OpTypeInt 32 1
-%24 = OpTypeVector %25 2
-%26 = OpConstant %25 7
-%27 = OpConstantComposite %24 %26 %26
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleExplicitLod %9 %13 %17 Grad|ConstOffset %20 %23 %27
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleGrad2dArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpTypeVector %4 2
-%22 = OpConstant %4 4
-%23 = OpConstant %4 5
-%24 = OpConstantComposite %21 %22 %23
-%25 = OpConstant %4 6
-%26 = OpConstant %4 7
-%27 = OpConstantComposite %21 %25 %26
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageSampleExplicitLod %9 %13 %20 Grad %24 %27
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 3
-%21 = OpTypeVector %4 2
-%22 = OpConstant %4 4
-%23 = OpConstant %4 5
-%24 = OpConstantComposite %21 %22 %23
-%25 = OpConstant %4 6
-%26 = OpConstant %4 7
-%27 = OpConstantComposite %21 %25 %26
-%28 = OpTypeVector %18 2
-%29 = OpConstant %18 6
-%30 = OpConstant %18 7
-%31 = OpConstantComposite %28 %29 %30
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageSampleExplicitLod %9 %13 %20 Grad|ConstOffset %24 %27 %31
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleGrad3dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpConstant %4 4
-%20 = OpConstant %4 5
-%21 = OpConstant %4 6
-%22 = OpConstantComposite %14 %19 %20 %21
-%23 = OpConstant %4 7
-%24 = OpConstant %4 8
-%25 = OpConstant %4 9
-%26 = OpConstantComposite %14 %23 %24 %25
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleExplicitLod %9 %13 %18 Grad %22 %26
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleGrad3dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpConstant %4 4
-%20 = OpConstant %4 5
-%21 = OpConstant %4 6
-%22 = OpConstantComposite %14 %19 %20 %21
-%23 = OpConstant %4 7
-%24 = OpConstant %4 8
-%25 = OpConstant %4 9
-%26 = OpConstantComposite %14 %23 %24 %25
-%28 = OpTypeInt 32 1
-%27 = OpTypeVector %28 3
-%29 = OpConstant %28 0
-%30 = OpConstant %28 1
-%31 = OpConstant %28 2
-%32 = OpConstantComposite %27 %29 %30 %31
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleExplicitLod %9 %13 %18 Grad|ConstOffset %22 %26 %32
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleGradCubeF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpTypeVector %4 3
-%15 = OpConstant %4 1
-%16 = OpConstant %4 2
-%17 = OpConstant %4 3
-%18 = OpConstantComposite %14 %15 %16 %17
-%19 = OpConstant %4 4
-%20 = OpConstant %4 5
-%21 = OpConstant %4 6
-%22 = OpConstantComposite %14 %19 %20 %21
-%23 = OpConstant %4 7
-%24 = OpConstant %4 8
-%25 = OpConstant %4 9
-%26 = OpConstantComposite %14 %23 %24 %25
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%8 = OpImageSampleExplicitLod %9 %13 %18 Grad %22 %26
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleGradCubeArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeSampledImage %3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 4
-%21 = OpTypeVector %4 3
-%22 = OpConstant %4 5
-%23 = OpConstant %4 6
-%24 = OpConstant %4 7
-%25 = OpConstantComposite %21 %22 %23 %24
-%26 = OpConstant %4 8
-%27 = OpConstant %4 9
-%28 = OpConstant %4 10
-%29 = OpConstantComposite %21 %26 %27 %28
-)",
-          R"(
-%10 = OpLoad %7 %5
-%11 = OpLoad %3 %1
-%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %9 %14 %15 %16 %17
-%8 = OpImageSampleExplicitLod %9 %13 %20 Grad %25 %29
-)",
-          R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kSampleCompareDepth2dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 2
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstantComposite %13 %14 %15
-%17 = OpConstant %4 3
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%8 = OpImageSampleDrefImplicitLod %4 %12 %16 %17
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 2
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstantComposite %13 %14 %15
-%17 = OpConstant %4 3
-%19 = OpTypeInt 32 1
-%18 = OpTypeVector %19 2
-%20 = OpConstant %19 4
-%21 = OpConstant %19 5
-%22 = OpConstantComposite %18 %20 %21
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%8 = OpImageSampleDrefImplicitLod %4 %12 %16 %17 ConstOffset %22
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%17 = OpTypeInt 32 1
-%18 = OpConstant %17 4
-%20 = OpConstant %4 3
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%16 = OpConvertSToF %4 %18
-%19 = OpCompositeConstruct %13 %14 %15 %16
-%8 = OpImageSampleDrefImplicitLod %4 %12 %19 %20
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%17 = OpTypeInt 32 1
-%18 = OpConstant %17 4
-%20 = OpConstant %4 3
-%21 = OpTypeVector %17 2
-%22 = OpConstant %17 5
-%23 = OpConstant %17 6
-%24 = OpConstantComposite %21 %22 %23
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%16 = OpConvertSToF %4 %18
-%19 = OpCompositeConstruct %13 %14 %15 %16
-%8 = OpImageSampleDrefImplicitLod %4 %12 %19 %20 ConstOffset %24
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCompareDepthCubeF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%17 = OpConstantComposite %13 %14 %15 %16
-%18 = OpConstant %4 4
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%8 = OpImageSampleDrefImplicitLod %4 %12 %17 %18
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 4
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 4
-%21 = OpConstant %4 5
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %13 %14 %15 %16 %17
-%8 = OpImageSampleDrefImplicitLod %4 %12 %20 %21
-)",
-          R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 2
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstantComposite %13 %14 %15
-%17 = OpConstant %4 3
-%18 = OpConstant %4 0
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%8 = OpImageSampleDrefExplicitLod %4 %12 %16 %17 Lod %18
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 2
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstantComposite %13 %14 %15
-%17 = OpConstant %4 3
-%18 = OpConstant %4 0
-%20 = OpTypeInt 32 1
-%19 = OpTypeVector %20 2
-%21 = OpConstant %20 4
-%22 = OpConstant %20 5
-%23 = OpConstantComposite %19 %21 %22
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%8 = OpImageSampleDrefExplicitLod %4 %12 %16 %17 Lod|ConstOffset %18 %23
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%17 = OpTypeInt 32 1
-%18 = OpConstant %17 4
-%20 = OpConstant %4 3
-%21 = OpConstant %4 0
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%16 = OpConvertSToF %4 %18
-%19 = OpCompositeConstruct %13 %14 %15 %16
-%8 = OpImageSampleDrefExplicitLod %4 %12 %19 %20 Lod %21
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%17 = OpTypeInt 32 1
-%18 = OpConstant %17 4
-%20 = OpConstant %4 3
-%21 = OpConstant %4 0
-%22 = OpTypeVector %17 2
-%23 = OpConstant %17 5
-%24 = OpConstant %17 6
-%25 = OpConstantComposite %22 %23 %24
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%16 = OpConvertSToF %4 %18
-%19 = OpCompositeConstruct %13 %14 %15 %16
-%8 = OpImageSampleDrefExplicitLod %4 %12 %19 %20 Lod|ConstOffset %21 %25
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 3
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%17 = OpConstantComposite %13 %14 %15 %16
-%18 = OpConstant %4 4
-%19 = OpConstant %4 0
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%8 = OpImageSampleDrefExplicitLod %4 %12 %17 %18 Lod %19
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%11 = OpTypeSampledImage %3
-%13 = OpTypeVector %4 4
-%14 = OpConstant %4 1
-%15 = OpConstant %4 2
-%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
-%19 = OpConstant %18 4
-%21 = OpConstant %4 5
-%22 = OpConstant %4 0
-)",
-          R"(
-%9 = OpLoad %7 %5
-%10 = OpLoad %3 %1
-%12 = OpSampledImage %11 %10 %9
-%17 = OpConvertSToF %4 %19
-%20 = OpCompositeConstruct %13 %14 %15 %16 %17
-%8 = OpImageSampleDrefExplicitLod %4 %12 %20 %21 Lod %22
-)",
-          R"(
-OpCapability SampledCubeArray
-)"};
-    case ValidTextureOverload::kLoad1dLevelF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%11 = OpTypeInt 32 1
-%12 = OpConstant %11 1
-%13 = OpConstant %11 3
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %12 Lod %13
-)",
-          R"(
-OpCapability Sampled1D
-)"};
-    case ValidTextureOverload::kLoad1dLevelU32:
-      return {
-          R"(
-%4 = OpTypeInt 32 0
-%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%11 = OpTypeInt 32 1
-%12 = OpConstant %11 1
-%13 = OpConstant %11 3
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %12 Lod %13
-)",
-          R"(
-OpCapability Sampled1D
-)"};
-    case ValidTextureOverload::kLoad1dLevelI32:
-      return {
-          R"(
-%4 = OpTypeInt 32 1
-%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%11 = OpConstant %4 1
-%12 = OpConstant %4 3
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %11 Lod %12
-)",
-          R"(
-OpCapability Sampled1D
-)"};
-    case ValidTextureOverload::kLoad2dLevelF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 2
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstantComposite %11 %13 %14
-%16 = OpConstant %12 3
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %15 Lod %16
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoad2dLevelU32:
-      return {
-          R"(
-%4 = OpTypeInt 32 0
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 2
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstantComposite %11 %13 %14
-%16 = OpConstant %12 3
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %15 Lod %16
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoad2dLevelI32:
-      return {
-          R"(
-%4 = OpTypeInt 32 1
-%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%11 = OpTypeVector %4 2
-%12 = OpConstant %4 1
-%13 = OpConstant %4 2
-%14 = OpConstantComposite %11 %12 %13
-%15 = OpConstant %4 3
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %14 Lod %15
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoad2dArrayLevelF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 3
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstant %12 3
-%16 = OpConstantComposite %11 %13 %14 %15
-%17 = OpConstant %12 4
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %16 Lod %17
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoad2dArrayLevelU32:
-      return {
-          R"(
-%4 = OpTypeInt 32 0
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 3
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstant %12 3
-%16 = OpConstantComposite %11 %13 %14 %15
-%17 = OpConstant %12 4
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %16 Lod %17
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoad2dArrayLevelI32:
-      return {
-          R"(
-%4 = OpTypeInt 32 1
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%11 = OpTypeVector %4 3
-%12 = OpConstant %4 1
-%13 = OpConstant %4 2
-%14 = OpConstant %4 3
-%15 = OpConstantComposite %11 %12 %13 %14
-%16 = OpConstant %4 4
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %15 Lod %16
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoad3dLevelF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 3
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstant %12 3
-%16 = OpConstantComposite %11 %13 %14 %15
-%17 = OpConstant %12 4
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %16 Lod %17
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoad3dLevelU32:
-      return {
-          R"(
-%4 = OpTypeInt 32 0
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 3
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstant %12 3
-%16 = OpConstantComposite %11 %13 %14 %15
-%17 = OpConstant %12 4
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %16 Lod %17
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoad3dLevelI32:
-      return {
-          R"(
-%4 = OpTypeInt 32 1
-%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%11 = OpTypeVector %4 3
-%12 = OpConstant %4 1
-%13 = OpConstant %4 2
-%14 = OpConstant %4 3
-%15 = OpConstantComposite %11 %12 %13 %14
-%16 = OpConstant %4 4
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %15 Lod %16
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoadMultisampled2dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 2
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstantComposite %11 %13 %14
-%16 = OpConstant %12 3
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %15 Sample %16
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoadMultisampled2dU32:
-      return {
-          R"(
-%4 = OpTypeInt 32 0
-%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 2
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstantComposite %11 %13 %14
-%16 = OpConstant %12 3
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %15 Sample %16
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoadMultisampled2dI32:
-      return {
-          R"(
-%4 = OpTypeInt 32 1
-%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVector %4 4
-%11 = OpTypeVector %4 2
-%12 = OpConstant %4 1
-%13 = OpConstant %4 2
-%14 = OpConstantComposite %11 %12 %13
-%15 = OpConstant %4 3
-)",
-          R"(
-%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %14 Sample %15
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoadDepth2dLevelF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeInt 32 1
-%12 = OpTypeVector %13 2
-%14 = OpConstant %13 1
-%15 = OpConstant %13 2
-%16 = OpConstantComposite %12 %14 %15
-%17 = OpConstant %13 3
-)",
-          R"(
-%11 = OpLoad %3 %1
-%9 = OpImageFetch %10 %11 %16 Lod %17
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeInt 32 1
-%12 = OpTypeVector %13 3
-%14 = OpConstant %13 1
-%15 = OpConstant %13 2
-%16 = OpConstant %13 3
-%17 = OpConstantComposite %12 %14 %15 %16
-%18 = OpConstant %13 4
-)",
-          R"(
-%11 = OpLoad %3 %1
-%9 = OpImageFetch %10 %11 %17 Lod %18
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kLoadDepthMultisampled2dF32:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%10 = OpTypeVector %4 4
-%13 = OpTypeInt 32 1
-%12 = OpTypeVector %13 3
-%14 = OpConstant %13 1
-%15 = OpConstant %13 2
-%16 = OpConstant %13 3
-%17 = OpConstantComposite %12 %14 %15 %16
-%18 = OpConstant %13 4
-)",
-          R"(
-%11 = OpLoad %3 %1
-%9 = OpImageFetch %10 %11 %17 Sample %18
-%8 = OpCompositeExtract %4 %9 0
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kStoreWO1dRgba32float:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 1D 0 0 0 2 Rgba32f
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVoid
-%11 = OpTypeInt 32 1
-%12 = OpConstant %11 1
-%13 = OpTypeVector %4 4
-%14 = OpConstant %4 2
-%15 = OpConstant %4 3
-%16 = OpConstant %4 4
-%17 = OpConstant %4 5
-%18 = OpConstantComposite %13 %14 %15 %16 %17
-)",
-          R"(
-%10 = OpLoad %3 %1
-OpImageWrite %10 %12 %18
-)",
-          R"(
-OpCapability Image1D
-)"};
-    case ValidTextureOverload::kStoreWO2dRgba32float:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 0 0 2 Rgba32f
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVoid
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 2
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstantComposite %11 %13 %14
-%16 = OpTypeVector %4 4
-%17 = OpConstant %4 3
-%18 = OpConstant %4 4
-%19 = OpConstant %4 5
-%20 = OpConstant %4 6
-%21 = OpConstantComposite %16 %17 %18 %19 %20
-)",
-          R"(
-%10 = OpLoad %3 %1
-OpImageWrite %10 %15 %21
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kStoreWO2dArrayRgba32float:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 2 Rgba32f
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVoid
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 3
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstant %12 3
-%16 = OpConstantComposite %11 %13 %14 %15
-%17 = OpTypeVector %4 4
-%18 = OpConstant %4 4
-%19 = OpConstant %4 5
-%20 = OpConstant %4 6
-%21 = OpConstant %4 7
-%22 = OpConstantComposite %17 %18 %19 %20 %21
-)",
-          R"(
-%10 = OpLoad %3 %1
-OpImageWrite %10 %16 %22
-)",
-          R"(
-)"};
-    case ValidTextureOverload::kStoreWO3dRgba32float:
-      return {
-          R"(
-%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 3D 0 0 0 2 Rgba32f
-%2 = OpTypePointer UniformConstant %3
-%1 = OpVariable %2 UniformConstant
-%7 = OpTypeSampler
-%6 = OpTypePointer UniformConstant %7
-%5 = OpVariable %6 UniformConstant
-%9 = OpTypeVoid
-%12 = OpTypeInt 32 1
-%11 = OpTypeVector %12 3
-%13 = OpConstant %12 1
-%14 = OpConstant %12 2
-%15 = OpConstant %12 3
-%16 = OpConstantComposite %11 %13 %14 %15
-%17 = OpTypeVector %4 4
-%18 = OpConstant %4 4
-%19 = OpConstant %4 5
-%20 = OpConstant %4 6
-%21 = OpConstant %4 7
-%22 = OpConstantComposite %17 %18 %19 %20 %21
-)",
-          R"(
-%10 = OpLoad %3 %1
-OpImageWrite %10 %16 %22
-)",
-          R"(
-)"};
-  }
-
-  return {"<unmatched texture overload>", "<unmatched texture overload>",
-          "<unmatched texture overload>"};
-}  // NOLINT - Ignore the length of this function
-
-using IntrinsicTextureTest =
-    TestParamHelper<ast::intrinsic::test::TextureOverloadCase>;
-
-INSTANTIATE_TEST_SUITE_P(
-    IntrinsicTextureTest,
-    IntrinsicTextureTest,
-    testing::ValuesIn(ast::intrinsic::test::TextureOverloadCase::ValidCases()));
-
-TEST_P(IntrinsicTextureTest, Call) {
-  auto param = GetParam();
-
-  auto* texture = param.BuildTextureVariable(this);
-  auto* sampler = param.BuildSamplerVariable(this);
-
-  auto* call = Call(param.function, param.args(this));
-  auto* stmt = CallStmt(call);
-  Func("func", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = Build();
-
-  b.push_function(Function{});
-  ASSERT_TRUE(b.GenerateGlobalVariable(texture)) << b.error();
-  ASSERT_TRUE(b.GenerateGlobalVariable(sampler)) << b.error();
-
-  EXPECT_EQ(b.GenerateExpression(call), 8u) << b.error();
-
-  auto expected = expected_texture_overload(param.overload);
-  EXPECT_EQ(expected.types, "\n" + DumpInstructions(b.types()));
-  EXPECT_EQ(expected.instructions,
-            "\n" + DumpInstructions(b.functions()[0].instructions()));
-  EXPECT_EQ(expected.capabilities, "\n" + DumpInstructions(b.capabilities()));
-}
-
-// Check the SPIRV generated passes validation
-TEST_P(IntrinsicTextureTest, ValidateSPIRV) {
-  auto param = GetParam();
-
-  param.BuildTextureVariable(this);
-  param.BuildSamplerVariable(this);
-
-  auto* call = Call(param.function, param.args(this));
-
-  auto* stmt = CallStmt(call);
-  Func("main", {}, ty.void_(), {stmt}, {Stage(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.Build()) << b.error();
-
-  Validate(b);
-}
-
-TEST_P(IntrinsicTextureTest, OutsideFunction_IsError) {
-  auto param = GetParam();
-
-  // The point of this test is to try to generate the texture
-  // intrinsic call outside a function.
-
-  auto* texture = param.BuildTextureVariable(this);
-  auto* sampler = param.BuildSamplerVariable(this);
-
-  auto* call = Call(param.function, param.args(this));
-  auto* stmt = CallStmt(call);
-  Func("func", {}, ty.void_(), {stmt},
-       {create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
-
-  spirv::Builder& b = Build();
-
-  ASSERT_TRUE(b.GenerateGlobalVariable(texture)) << b.error();
-  ASSERT_TRUE(b.GenerateGlobalVariable(sampler)) << b.error();
-  EXPECT_EQ(b.GenerateExpression(call), 0u);
-  EXPECT_THAT(b.error(),
-              ::testing::StartsWith(
-                  "Internal error: trying to add SPIR-V instruction "));
-  EXPECT_THAT(b.error(), ::testing::EndsWith(" outside a function"));
-}
-
-}  // namespace
-}  // namespace spirv
-}  // namespace writer
-}  // namespace tint
diff --git a/test/BUILD.gn b/test/BUILD.gn
index 75fa189..538c4a9 100644
--- a/test/BUILD.gn
+++ b/test/BUILD.gn
@@ -153,6 +153,8 @@
     "../src/ast/bool_test.cc",
     "../src/ast/break_statement_test.cc",
     "../src/ast/builtin_attribute_test.cc",
+    "../src/ast/builtin_texture_helper_test.cc",
+    "../src/ast/builtin_texture_helper_test.h",
     "../src/ast/call_expression_test.cc",
     "../src/ast/call_statement_test.cc",
     "../src/ast/case_statement_test.cc",
@@ -174,8 +176,6 @@
     "../src/ast/index_accessor_expression_test.cc",
     "../src/ast/int_literal_expression_test.cc",
     "../src/ast/interpolate_attribute_test.cc",
-    "../src/ast/intrinsic_texture_helper_test.cc",
-    "../src/ast/intrinsic_texture_helper_test.h",
     "../src/ast/invariant_attribute_test.cc",
     "../src/ast/location_attribute_test.cc",
     "../src/ast/loop_statement_test.cc",
@@ -239,6 +239,8 @@
     "../src/resolver/atomics_validation_test.cc",
     "../src/resolver/bitcast_validation_test.cc",
     "../src/resolver/builtins_validation_test.cc",
+    "../src/resolver/builtin_test.cc",
+    "../src/resolver/builtin_validation_test.cc",
     "../src/resolver/call_test.cc",
     "../src/resolver/call_validation_test.cc",
     "../src/resolver/compound_statement_test.cc",
@@ -248,8 +250,6 @@
     "../src/resolver/entry_point_validation_test.cc",
     "../src/resolver/function_validation_test.cc",
     "../src/resolver/host_shareable_validation_test.cc",
-    "../src/resolver/intrinsic_test.cc",
-    "../src/resolver/intrinsic_validation_test.cc",
     "../src/resolver/is_host_shareable_test.cc",
     "../src/resolver/is_storeable_test.cc",
     "../src/resolver/pipeline_overridable_constant_test.cc",
@@ -278,12 +278,12 @@
   sources = [
     "../src/sem/atomic_type_test.cc",
     "../src/sem/bool_type_test.cc",
+    "../src/sem/builtin_test.cc",
     "../src/sem/depth_multisampled_texture_type_test.cc",
     "../src/sem/depth_texture_type_test.cc",
     "../src/sem/external_texture_type_test.cc",
     "../src/sem/f32_type_test.cc",
     "../src/sem/i32_type_test.cc",
-    "../src/sem/intrinsic_test.cc",
     "../src/sem/matrix_type_test.cc",
     "../src/sem/multisampled_texture_type_test.cc",
     "../src/sem/pointer_type_test.cc",
@@ -413,6 +413,8 @@
     "../src/writer/spirv/builder_binary_expression_test.cc",
     "../src/writer/spirv/builder_bitcast_expression_test.cc",
     "../src/writer/spirv/builder_block_test.cc",
+    "../src/writer/spirv/builder_builtin_test.cc",
+    "../src/writer/spirv/builder_builtin_texture_test.cc",
     "../src/writer/spirv/builder_call_test.cc",
     "../src/writer/spirv/builder_constructor_expression_test.cc",
     "../src/writer/spirv/builder_discard_test.cc",
@@ -424,8 +426,6 @@
     "../src/writer/spirv/builder_global_variable_test.cc",
     "../src/writer/spirv/builder_ident_expression_test.cc",
     "../src/writer/spirv/builder_if_test.cc",
-    "../src/writer/spirv/builder_intrinsic_test.cc",
-    "../src/writer/spirv/builder_intrinsic_texture_test.cc",
     "../src/writer/spirv/builder_literal_test.cc",
     "../src/writer/spirv/builder_loop_test.cc",
     "../src/writer/spirv/builder_return_test.cc",
@@ -576,6 +576,8 @@
     "../src/writer/msl/generator_impl_bitcast_test.cc",
     "../src/writer/msl/generator_impl_block_test.cc",
     "../src/writer/msl/generator_impl_break_test.cc",
+    "../src/writer/msl/generator_impl_builtin_test.cc",
+    "../src/writer/msl/generator_impl_builtin_texture_test.cc",
     "../src/writer/msl/generator_impl_call_test.cc",
     "../src/writer/msl/generator_impl_case_test.cc",
     "../src/writer/msl/generator_impl_cast_test.cc",
@@ -586,8 +588,6 @@
     "../src/writer/msl/generator_impl_identifier_test.cc",
     "../src/writer/msl/generator_impl_if_test.cc",
     "../src/writer/msl/generator_impl_import_test.cc",
-    "../src/writer/msl/generator_impl_intrinsic_test.cc",
-    "../src/writer/msl/generator_impl_intrinsic_texture_test.cc",
     "../src/writer/msl/generator_impl_loop_test.cc",
     "../src/writer/msl/generator_impl_member_accessor_test.cc",
     "../src/writer/msl/generator_impl_module_constant_test.cc",
@@ -615,6 +615,8 @@
     "../src/writer/hlsl/generator_impl_bitcast_test.cc",
     "../src/writer/hlsl/generator_impl_block_test.cc",
     "../src/writer/hlsl/generator_impl_break_test.cc",
+    "../src/writer/hlsl/generator_impl_builtin_test.cc",
+    "../src/writer/hlsl/generator_impl_builtin_texture_test.cc",
     "../src/writer/hlsl/generator_impl_call_test.cc",
     "../src/writer/hlsl/generator_impl_case_test.cc",
     "../src/writer/hlsl/generator_impl_cast_test.cc",
@@ -625,8 +627,6 @@
     "../src/writer/hlsl/generator_impl_identifier_test.cc",
     "../src/writer/hlsl/generator_impl_if_test.cc",
     "../src/writer/hlsl/generator_impl_import_test.cc",
-    "../src/writer/hlsl/generator_impl_intrinsic_test.cc",
-    "../src/writer/hlsl/generator_impl_intrinsic_texture_test.cc",
     "../src/writer/hlsl/generator_impl_loop_test.cc",
     "../src/writer/hlsl/generator_impl_member_accessor_test.cc",
     "../src/writer/hlsl/generator_impl_module_constant_test.cc",
@@ -656,6 +656,8 @@
     "../src/writer/glsl/generator_impl_bitcast_test.cc",
     "../src/writer/glsl/generator_impl_block_test.cc",
     "../src/writer/glsl/generator_impl_break_test.cc",
+    "../src/writer/glsl/generator_impl_builtin_test.cc",
+    "../src/writer/glsl/generator_impl_builtin_texture_test.cc",
     "../src/writer/glsl/generator_impl_call_test.cc",
     "../src/writer/glsl/generator_impl_case_test.cc",
     "../src/writer/glsl/generator_impl_cast_test.cc",
@@ -666,8 +668,6 @@
     "../src/writer/glsl/generator_impl_identifier_test.cc",
     "../src/writer/glsl/generator_impl_if_test.cc",
     "../src/writer/glsl/generator_impl_import_test.cc",
-    "../src/writer/glsl/generator_impl_intrinsic_test.cc",
-    "../src/writer/glsl/generator_impl_intrinsic_texture_test.cc",
     "../src/writer/glsl/generator_impl_loop_test.cc",
     "../src/writer/glsl/generator_impl_member_accessor_test.cc",
     "../src/writer/glsl/generator_impl_module_constant_test.cc",
@@ -692,11 +692,11 @@
 tint_unittests_source_set("tint_unittests_core_src") {
   sources = [
     "../src/block_allocator_test.cc",
+    "../src/builtin_table_test.cc",
     "../src/castable_test.cc",
     "../src/clone_context_test.cc",
     "../src/debug_test.cc",
     "../src/demangler_test.cc",
-    "../src/intrinsic_table_test.cc",
     "../src/program_builder_test.cc",
     "../src/program_test.cc",
     "../src/scope_stack_test.cc",
diff --git a/test/bug/chromium/1273230.wgsl.expected.glsl b/test/bug/chromium/1273230.wgsl.expected.glsl
index b3db713..bfc20ad 100644
--- a/test/bug/chromium/1273230.wgsl.expected.glsl
+++ b/test/bug/chromium/1273230.wgsl.expected.glsl
@@ -1,20 +1,20 @@
-bug/chromium/1273230.wgsl:4:7 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:4:7 warning: use of deprecated builtin
   _ = isNormal(4.);
       ^^^^^^^^
 
-bug/chromium/1273230.wgsl:7:3 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:7:3 warning: use of deprecated builtin
   isNormal(vec4<f32>());
   ^^^^^^^^
 
-bug/chromium/1273230.wgsl:10:6 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:10:6 warning: use of deprecated builtin
      isNormal(0.);
      ^^^^^^^^
 
-bug/chromium/1273230.wgsl:11:9 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:11:9 warning: use of deprecated builtin
     _ = isNormal(4.);
         ^^^^^^^^
 
-bug/chromium/1273230.wgsl:12:9 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
     _ = isNormal(2.);
         ^^^^^^^^
 
diff --git a/test/bug/chromium/1273230.wgsl.expected.hlsl b/test/bug/chromium/1273230.wgsl.expected.hlsl
index eb84f1a..b1b9cf0 100644
--- a/test/bug/chromium/1273230.wgsl.expected.hlsl
+++ b/test/bug/chromium/1273230.wgsl.expected.hlsl
@@ -1,20 +1,20 @@
-bug/chromium/1273230.wgsl:4:7 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:4:7 warning: use of deprecated builtin
   _ = isNormal(4.);
       ^^^^^^^^
 
-bug/chromium/1273230.wgsl:7:3 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:7:3 warning: use of deprecated builtin
   isNormal(vec4<f32>());
   ^^^^^^^^
 
-bug/chromium/1273230.wgsl:10:6 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:10:6 warning: use of deprecated builtin
      isNormal(0.);
      ^^^^^^^^
 
-bug/chromium/1273230.wgsl:11:9 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:11:9 warning: use of deprecated builtin
     _ = isNormal(4.);
         ^^^^^^^^
 
-bug/chromium/1273230.wgsl:12:9 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
     _ = isNormal(2.);
         ^^^^^^^^
 
diff --git a/test/bug/chromium/1273230.wgsl.expected.msl b/test/bug/chromium/1273230.wgsl.expected.msl
index c8e38ab..a6f5aab 100644
--- a/test/bug/chromium/1273230.wgsl.expected.msl
+++ b/test/bug/chromium/1273230.wgsl.expected.msl
@@ -1,20 +1,20 @@
-bug/chromium/1273230.wgsl:4:7 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:4:7 warning: use of deprecated builtin
   _ = isNormal(4.);
       ^^^^^^^^
 
-bug/chromium/1273230.wgsl:7:3 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:7:3 warning: use of deprecated builtin
   isNormal(vec4<f32>());
   ^^^^^^^^
 
-bug/chromium/1273230.wgsl:10:6 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:10:6 warning: use of deprecated builtin
      isNormal(0.);
      ^^^^^^^^
 
-bug/chromium/1273230.wgsl:11:9 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:11:9 warning: use of deprecated builtin
     _ = isNormal(4.);
         ^^^^^^^^
 
-bug/chromium/1273230.wgsl:12:9 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
     _ = isNormal(2.);
         ^^^^^^^^
 
diff --git a/test/bug/chromium/1273230.wgsl.expected.spvasm b/test/bug/chromium/1273230.wgsl.expected.spvasm
index 6719df2..a2c9d8c 100644
--- a/test/bug/chromium/1273230.wgsl.expected.spvasm
+++ b/test/bug/chromium/1273230.wgsl.expected.spvasm
@@ -1,20 +1,20 @@
-bug/chromium/1273230.wgsl:4:7 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:4:7 warning: use of deprecated builtin
   _ = isNormal(4.);
       ^^^^^^^^
 
-bug/chromium/1273230.wgsl:7:3 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:7:3 warning: use of deprecated builtin
   isNormal(vec4<f32>());
   ^^^^^^^^
 
-bug/chromium/1273230.wgsl:10:6 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:10:6 warning: use of deprecated builtin
      isNormal(0.);
      ^^^^^^^^
 
-bug/chromium/1273230.wgsl:11:9 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:11:9 warning: use of deprecated builtin
     _ = isNormal(4.);
         ^^^^^^^^
 
-bug/chromium/1273230.wgsl:12:9 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
     _ = isNormal(2.);
         ^^^^^^^^
 
diff --git a/test/bug/chromium/1273230.wgsl.expected.wgsl b/test/bug/chromium/1273230.wgsl.expected.wgsl
index 2d9a271..3e387da 100644
--- a/test/bug/chromium/1273230.wgsl.expected.wgsl
+++ b/test/bug/chromium/1273230.wgsl.expected.wgsl
@@ -1,20 +1,20 @@
-bug/chromium/1273230.wgsl:4:7 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:4:7 warning: use of deprecated builtin
   _ = isNormal(4.);
       ^^^^^^^^
 
-bug/chromium/1273230.wgsl:7:3 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:7:3 warning: use of deprecated builtin
   isNormal(vec4<f32>());
   ^^^^^^^^
 
-bug/chromium/1273230.wgsl:10:6 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:10:6 warning: use of deprecated builtin
      isNormal(0.);
      ^^^^^^^^
 
-bug/chromium/1273230.wgsl:11:9 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:11:9 warning: use of deprecated builtin
     _ = isNormal(4.);
         ^^^^^^^^
 
-bug/chromium/1273230.wgsl:12:9 warning: use of deprecated intrinsic
+bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
     _ = isNormal(2.);
         ^^^^^^^^
 
diff --git a/test/intrinsics/arrayLength/complex_via_let.wgsl b/test/builtins/arrayLength/complex_via_let.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let.wgsl
rename to test/builtins/arrayLength/complex_via_let.wgsl
diff --git a/test/intrinsics/arrayLength/complex_via_let.wgsl.expected.glsl b/test/builtins/arrayLength/complex_via_let.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let.wgsl.expected.glsl
rename to test/builtins/arrayLength/complex_via_let.wgsl.expected.glsl
diff --git a/test/intrinsics/arrayLength/complex_via_let.wgsl.expected.hlsl b/test/builtins/arrayLength/complex_via_let.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let.wgsl.expected.hlsl
rename to test/builtins/arrayLength/complex_via_let.wgsl.expected.hlsl
diff --git a/test/intrinsics/arrayLength/complex_via_let.wgsl.expected.msl b/test/builtins/arrayLength/complex_via_let.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let.wgsl.expected.msl
rename to test/builtins/arrayLength/complex_via_let.wgsl.expected.msl
diff --git a/test/intrinsics/arrayLength/complex_via_let.wgsl.expected.spvasm b/test/builtins/arrayLength/complex_via_let.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let.wgsl.expected.spvasm
rename to test/builtins/arrayLength/complex_via_let.wgsl.expected.spvasm
diff --git a/test/intrinsics/arrayLength/complex_via_let.wgsl.expected.wgsl b/test/builtins/arrayLength/complex_via_let.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let.wgsl.expected.wgsl
rename to test/builtins/arrayLength/complex_via_let.wgsl.expected.wgsl
diff --git a/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl b/test/builtins/arrayLength/complex_via_let_no_struct.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl
rename to test/builtins/arrayLength/complex_via_let_no_struct.wgsl
diff --git a/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.glsl b/test/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.glsl
rename to test/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.glsl
diff --git a/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.hlsl b/test/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.hlsl
rename to test/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.hlsl
diff --git a/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.msl b/test/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.msl
rename to test/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.msl
diff --git a/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.spvasm b/test/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.spvasm
rename to test/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.spvasm
diff --git a/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.wgsl b/test/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.wgsl
rename to test/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.wgsl
diff --git a/test/intrinsics/arrayLength/deprecated.wgsl b/test/builtins/arrayLength/deprecated.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/deprecated.wgsl
rename to test/builtins/arrayLength/deprecated.wgsl
diff --git a/test/intrinsics/arrayLength/deprecated.wgsl.expected.glsl b/test/builtins/arrayLength/deprecated.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/arrayLength/deprecated.wgsl.expected.glsl
rename to test/builtins/arrayLength/deprecated.wgsl.expected.glsl
diff --git a/test/intrinsics/arrayLength/deprecated.wgsl.expected.hlsl b/test/builtins/arrayLength/deprecated.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/arrayLength/deprecated.wgsl.expected.hlsl
rename to test/builtins/arrayLength/deprecated.wgsl.expected.hlsl
diff --git a/test/intrinsics/arrayLength/deprecated.wgsl.expected.msl b/test/builtins/arrayLength/deprecated.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/arrayLength/deprecated.wgsl.expected.msl
rename to test/builtins/arrayLength/deprecated.wgsl.expected.msl
diff --git a/test/intrinsics/arrayLength/deprecated.wgsl.expected.spvasm b/test/builtins/arrayLength/deprecated.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/arrayLength/deprecated.wgsl.expected.spvasm
rename to test/builtins/arrayLength/deprecated.wgsl.expected.spvasm
diff --git a/test/intrinsics/arrayLength/deprecated.wgsl.expected.wgsl b/test/builtins/arrayLength/deprecated.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/deprecated.wgsl.expected.wgsl
rename to test/builtins/arrayLength/deprecated.wgsl.expected.wgsl
diff --git a/test/intrinsics/arrayLength/simple.wgsl b/test/builtins/arrayLength/simple.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/simple.wgsl
rename to test/builtins/arrayLength/simple.wgsl
diff --git a/test/intrinsics/arrayLength/simple.wgsl.expected.glsl b/test/builtins/arrayLength/simple.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/arrayLength/simple.wgsl.expected.glsl
rename to test/builtins/arrayLength/simple.wgsl.expected.glsl
diff --git a/test/intrinsics/arrayLength/simple.wgsl.expected.hlsl b/test/builtins/arrayLength/simple.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/arrayLength/simple.wgsl.expected.hlsl
rename to test/builtins/arrayLength/simple.wgsl.expected.hlsl
diff --git a/test/intrinsics/arrayLength/simple.wgsl.expected.msl b/test/builtins/arrayLength/simple.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/arrayLength/simple.wgsl.expected.msl
rename to test/builtins/arrayLength/simple.wgsl.expected.msl
diff --git a/test/intrinsics/arrayLength/simple.wgsl.expected.spvasm b/test/builtins/arrayLength/simple.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/arrayLength/simple.wgsl.expected.spvasm
rename to test/builtins/arrayLength/simple.wgsl.expected.spvasm
diff --git a/test/intrinsics/arrayLength/simple.wgsl.expected.wgsl b/test/builtins/arrayLength/simple.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/simple.wgsl.expected.wgsl
rename to test/builtins/arrayLength/simple.wgsl.expected.wgsl
diff --git a/test/intrinsics/arrayLength/simple_no_struct.wgsl b/test/builtins/arrayLength/simple_no_struct.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/simple_no_struct.wgsl
rename to test/builtins/arrayLength/simple_no_struct.wgsl
diff --git a/test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.glsl b/test/builtins/arrayLength/simple_no_struct.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.glsl
rename to test/builtins/arrayLength/simple_no_struct.wgsl.expected.glsl
diff --git a/test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.hlsl b/test/builtins/arrayLength/simple_no_struct.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.hlsl
rename to test/builtins/arrayLength/simple_no_struct.wgsl.expected.hlsl
diff --git a/test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.msl b/test/builtins/arrayLength/simple_no_struct.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.msl
rename to test/builtins/arrayLength/simple_no_struct.wgsl.expected.msl
diff --git a/test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.spvasm b/test/builtins/arrayLength/simple_no_struct.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.spvasm
rename to test/builtins/arrayLength/simple_no_struct.wgsl.expected.spvasm
diff --git a/test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.wgsl b/test/builtins/arrayLength/simple_no_struct.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.wgsl
rename to test/builtins/arrayLength/simple_no_struct.wgsl.expected.wgsl
diff --git a/test/intrinsics/arrayLength/via_let.wgsl b/test/builtins/arrayLength/via_let.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let.wgsl
rename to test/builtins/arrayLength/via_let.wgsl
diff --git a/test/intrinsics/arrayLength/via_let.wgsl.expected.glsl b/test/builtins/arrayLength/via_let.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let.wgsl.expected.glsl
rename to test/builtins/arrayLength/via_let.wgsl.expected.glsl
diff --git a/test/intrinsics/arrayLength/via_let.wgsl.expected.hlsl b/test/builtins/arrayLength/via_let.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let.wgsl.expected.hlsl
rename to test/builtins/arrayLength/via_let.wgsl.expected.hlsl
diff --git a/test/intrinsics/arrayLength/via_let.wgsl.expected.msl b/test/builtins/arrayLength/via_let.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let.wgsl.expected.msl
rename to test/builtins/arrayLength/via_let.wgsl.expected.msl
diff --git a/test/intrinsics/arrayLength/via_let.wgsl.expected.spvasm b/test/builtins/arrayLength/via_let.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/arrayLength/via_let.wgsl.expected.spvasm
rename to test/builtins/arrayLength/via_let.wgsl.expected.spvasm
diff --git a/test/intrinsics/arrayLength/via_let.wgsl.expected.wgsl b/test/builtins/arrayLength/via_let.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let.wgsl.expected.wgsl
rename to test/builtins/arrayLength/via_let.wgsl.expected.wgsl
diff --git a/test/intrinsics/arrayLength/via_let_complex.wgsl b/test/builtins/arrayLength/via_let_complex.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex.wgsl
rename to test/builtins/arrayLength/via_let_complex.wgsl
diff --git a/test/intrinsics/arrayLength/via_let_complex.wgsl.expected.glsl b/test/builtins/arrayLength/via_let_complex.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex.wgsl.expected.glsl
rename to test/builtins/arrayLength/via_let_complex.wgsl.expected.glsl
diff --git a/test/intrinsics/arrayLength/via_let_complex.wgsl.expected.hlsl b/test/builtins/arrayLength/via_let_complex.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex.wgsl.expected.hlsl
rename to test/builtins/arrayLength/via_let_complex.wgsl.expected.hlsl
diff --git a/test/intrinsics/arrayLength/via_let_complex.wgsl.expected.msl b/test/builtins/arrayLength/via_let_complex.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex.wgsl.expected.msl
rename to test/builtins/arrayLength/via_let_complex.wgsl.expected.msl
diff --git a/test/intrinsics/arrayLength/via_let_complex.wgsl.expected.spvasm b/test/builtins/arrayLength/via_let_complex.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex.wgsl.expected.spvasm
rename to test/builtins/arrayLength/via_let_complex.wgsl.expected.spvasm
diff --git a/test/intrinsics/arrayLength/via_let_complex.wgsl.expected.wgsl b/test/builtins/arrayLength/via_let_complex.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex.wgsl.expected.wgsl
rename to test/builtins/arrayLength/via_let_complex.wgsl.expected.wgsl
diff --git a/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl b/test/builtins/arrayLength/via_let_complex_no_struct.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl
rename to test/builtins/arrayLength/via_let_complex_no_struct.wgsl
diff --git a/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.glsl b/test/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.glsl
rename to test/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.glsl
diff --git a/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.hlsl b/test/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.hlsl
rename to test/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.hlsl
diff --git a/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.msl b/test/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.msl
rename to test/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.msl
diff --git a/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.spvasm b/test/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.spvasm
rename to test/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.spvasm
diff --git a/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.wgsl b/test/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.wgsl
rename to test/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.wgsl
diff --git a/test/intrinsics/arrayLength/via_let_no_struct.wgsl b/test/builtins/arrayLength/via_let_no_struct.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_no_struct.wgsl
rename to test/builtins/arrayLength/via_let_no_struct.wgsl
diff --git a/test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.glsl b/test/builtins/arrayLength/via_let_no_struct.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.glsl
rename to test/builtins/arrayLength/via_let_no_struct.wgsl.expected.glsl
diff --git a/test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.hlsl b/test/builtins/arrayLength/via_let_no_struct.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.hlsl
rename to test/builtins/arrayLength/via_let_no_struct.wgsl.expected.hlsl
diff --git a/test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.msl b/test/builtins/arrayLength/via_let_no_struct.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.msl
rename to test/builtins/arrayLength/via_let_no_struct.wgsl.expected.msl
diff --git a/test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.spvasm b/test/builtins/arrayLength/via_let_no_struct.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.spvasm
rename to test/builtins/arrayLength/via_let_no_struct.wgsl.expected.spvasm
diff --git a/test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.wgsl b/test/builtins/arrayLength/via_let_no_struct.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.wgsl
rename to test/builtins/arrayLength/via_let_no_struct.wgsl.expected.wgsl
diff --git a/test/builtins/builtins.wgsl.tmpl b/test/builtins/builtins.wgsl.tmpl
new file mode 100644
index 0000000..c7e2265
--- /dev/null
+++ b/test/builtins/builtins.wgsl.tmpl
@@ -0,0 +1,273 @@
+{{- /*
+--------------------------------------------------------------------------------
+Template file for use with tools/builtin-gen to generate the wgsl files in the
+./gen/... subdirectories
+
+See:
+* tools/cmd/builtin-gen/gen for structures used by this template
+* https://golang.org/pkg/text/template/ for documentation on the template syntax
+--------------------------------------------------------------------------------
+*/ -}}
+
+{{- /* For each permutation of each overload of each function... */ -}}
+{{- range .Sem.Functions -}}
+{{-   range .Overloads  -}}
+{{-     range Permute . -}}
+{{- /*    Generate a ./gen/<function>/<permuataion-hash>.wgsl file using
+          the Permutation macro defined below                             */ -}}
+{{-       $file := printf "./gen/%v/%v.wgsl" .Function.Name .Hash -}}
+{{-       $content := Eval "Permutation" . -}}
+{{-       WriteFile $file $content -}}
+{{-     end  }}
+{{-   end  }}
+{{- end  }}
+
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                          define "Permutation"                            -}}
+{{- /* Emits the body of the intrinsic permuation .wgsl file              */ -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   $function    := .Function.Name -}}
+{{-   $permutation := printf "%v_%v" $function .Hash -}}
+{{-   $args        := Map -}}
+
+{{- /* Generate RW storage buffer parameters */ -}}
+{{-   $sb_rw_fields := Eval "EmitBufferFields" "overload"    .
+                                               "var_name"    "sb_rw"
+                                               "storage"     "storage"
+                                               "access"      "read_write"
+                                               "args"        $args -}}
+{{-   if $sb_rw_fields -}}
+struct SB_RW {
+{{- $sb_rw_fields -}}
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+{{    end -}}
+
+{{- /* Generate RO storage buffer parameters */ -}}
+{{-   $sb_ro_fields := Eval "EmitBufferFields" "overload"    .
+                                               "var_name"    "sb_ro"
+                                               "storage"     "storage"
+                                               "access"      "read"
+                                               "args"        $args -}}
+{{-   if $sb_ro_fields -}}
+struct SB_RO {
+{{- $sb_ro_fields -}}
+};
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+{{    end -}}
+
+{{- /* Generate uniform buffer parameters */ -}}
+{{-   $ub_fields := Eval "EmitBufferFields" "overload"    .
+                                            "var_name"    "ub"
+                                            "storage"     "uniform"
+                                            "access"      "read"
+                                            "args"        $args -}}
+{{-   if $ub_fields -}}
+struct UB {
+{{- $ub_fields -}}
+};
+@group(0) @binding(1) var<uniform> ub : UB;
+{{    end -}}
+
+{{- /* Generate module-scoped handle variables */ -}}
+{{-   range $i, $p := .Parameters  }}
+{{-     $class := Eval "StorageClass" $p.Type -}}
+{{-     if eq "ptr" $p.Type.Target.Name -}}
+{{-       $el_type := Eval "Type" (index $p.Type.TemplateArguments 1)}}
+{{-       if eq "handle" $class -}}
+            @group(1) @binding({{$i}}) var arg_{{$i}}: {{$el_type}};
+{{          $args.Put $i (printf "&arg_%v" $i) -}}
+{{-       else if eq "workgroup" $class -}}
+            var<workgroup> arg_{{$i}}: {{$el_type}};
+{{          $args.Put $i (printf "&arg_%v" $i) -}}
+{{-       else if eq "private" $class -}}
+            var<private> arg_{{$i}}: {{$el_type}};
+{{          $args.Put $i (printf "&arg_%v" $i) -}}
+{{-       end -}}
+{{-     else -}}
+{{-       $type := Eval "Type" $p.Type}}
+{{-       if eq "handle" $class -}}
+            @group(1) @binding({{$i}}) var arg_{{$i}}: {{$type}};
+{{          $args.Put $i (printf "arg_%v" $i) -}}
+{{-       else if eq "workgroup" $class -}}
+            var<workgroup> arg_{{$i}}: {{$type}};
+{{          $args.Put $i (printf "arg_%v" $i) -}}
+{{-       else if eq "private" $class -}}
+            var<private> arg_{{$i}}: {{$type}};
+{{          $args.Put $i (printf "arg_%v" $i) -}}
+{{-       end -}}
+{{-     end -}}
+{{-   end -}}
+
+{{- /* Generate the function that calls the intrinsic */ -}}
+{{- /*newline*/}}
+// {{$.Overload}}
+fn {{$permutation}}() {
+{{/* Build the parameters either as 'var' or inline values */ -}}
+{{-   range $i, $p := .Parameters -}}
+{{-     $class := Eval "StorageClass" $p.Type -}}
+{{-     if eq "function" $class -}}
+{{-       if eq "ptr" $p.Type.Target.Name -}}
+{{- /*indent*/}}  var arg_{{$i}}: {{template "Type" index $p.Type.TemplateArguments 1}};
+{{          $args.Put $i (printf "&arg_%v" $i) -}}
+{{-       else -}}
+{{-         $args.Put $i (Eval "ArgumentValue" $p) -}}
+{{-       end -}}
+{{-     end -}}
+{{-   end -}}
+
+{{- /* Make the call to the intrinsic */ -}}
+{{- /*indent*/}}  {{/*indent*/ -}}
+{{-   if .ReturnType -}}
+  var res{{if IsDeclarable .ReturnType}}: {{template "Type" .ReturnType}}{{end}} = {{/* preserve space after = */ -}}
+{{-   end -}}
+  {{$function}}(
+{{-   range $i, $p := .Parameters -}}
+{{-     if $i -}}, {{end}}{{$args.Get $i -}}
+{{-   end -}}
+  );
+}
+{{/*new line*/ -}}
+
+{{- if .CanBeUsedInStage.Vertex }}
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  {{$permutation}}();
+  return vec4<f32>();
+}
+{{ end -}}
+
+{{- if .CanBeUsedInStage.Fragment }}
+@stage(fragment)
+fn fragment_main() {
+  {{$permutation}}();
+}
+{{ end -}}
+
+{{- if .CanBeUsedInStage.Compute }}
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  {{$permutation}}();
+}
+{{ end -}}
+
+{{- end -}}
+
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                       define "EmitBufferFields"                          -}}
+{{- /* Emits a struct with the fields that match the given storage class  */ -}}
+{{- /* and access.                                                        */ -}}
+{{- /* Argument is a map with the following expected keys:                */ -}}
+{{- /*  'overload' - the current overload                                 */ -}}
+{{- /*  'var_name' - name of the variable of the structure type           */ -}}
+{{- /*  'storage'  - filtered storage class                               */ -}}
+{{- /*  'access'   - filtered access                                      */ -}}
+{{- /*  'args'     - argument map that's populated with the fields        */ -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{- $overload       := .Get "overload" -}}
+{{- $var_name       := .Get "var_name" -}}
+{{- $filter_storage := .Get "storage"  -}}
+{{- $filter_access  := .Get "access"   -}}
+{{- $args           := .Get "args"     -}}
+{{-   range $i, $p := $overload.Parameters  }}
+{{-     $storage := Eval "StorageClass" $p.Type -}}
+{{-     $access  := Eval "Access"       $p.Type -}}
+{{-     if and (eq $filter_storage $storage) (eq $filter_access $access) }}
+{{-       if eq "ptr" $p.Type.Target.Name  }}
+  arg_{{$i}}: {{template "Type" (index $p.Type.TemplateArguments 1)}};
+{{          $args.Put $i (printf "&%v.arg_%v" $var_name $i) -}}
+{{-       else  }}
+  arg_{{$i}}: {{template "Type" $p.Type}};
+{{          $args.Put $i (printf "%v.arg_%v" $var_name $i) -}}
+{{-       end -}}
+{{-     end -}}
+{{-   end -}}
+{{ end -}}
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                           define "StorageClass"                          -}}
+{{- /* Returns the storage class for the given Fully Qualified Name       */ -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   $name := .Target.Name -}}
+{{-   if             eq $name "array"   -}}storage
+{{-   else if HasPrefix $name "texture" -}}handle
+{{-   else if HasPrefix $name "sampler" -}}handle
+{{-   else if        eq $name "ptr"     -}}{{(index .TemplateArguments 0).Target.Name}}
+{{-   else                              -}}function
+{{-   end -}}
+{{- end -}}
+
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                           define "Access"                                -}}
+{{- /* Returns the access for the given Fully Qualified Name              */ -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   $name := .Target.Name -}}
+{{-   if eq $name "ptr"     -}}{{(index .TemplateArguments 2).Target.Name}}
+{{-   else -}}
+{{- /*  Emit the default for the storage class */ -}}
+{{- /*  https://gpuweb.github.io/gpuweb/wgsl/#storage-class */ -}}
+{{-     $storage := Eval "StorageClass" . -}}
+{{-          if eq $storage "function" -}}read_write
+{{-     else if eq $storage "private" -}}read_write
+{{-     else if eq $storage "workgroup" -}}read_write
+{{-     else if eq $storage "uniform" -}}read
+{{-     else if eq $storage "storage" -}}read
+{{-     else if eq $storage "handle" -}}read
+{{-     end -}}
+{{-   end -}}
+{{- end -}}
+
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                          define "ArgumentValue"                          -}}
+{{- /* Returns a value that can be used for the parameter argument        */ -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   $ty := .Type -}}
+{{-   if      eq $ty.Target.Name "i32" -}}
+{{- /* If the parameter has the name 'level', then use '0' as the value.  */ -}}
+{{- /* Some texture arguments require the level parameter to be 0, and    */ -}}
+{{- /* constraint is not described in the definition file.                */ -}}
+{{-     if   eq .Name "level"            -}}0
+{{-     else                             -}}1
+{{-     end                              -}}
+{{-   else if eq $ty.Target.Name "u32" -}}1u
+{{-   else if eq $ty.Target.Name "f32" -}}1.0
+{{-   else                             -}}{{template "Type" $ty}}()
+{{-   end                              -}}
+{{- end -}}
+
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                                define "Type"                             -}}
+{{- /* Emits the WGSL for the Fully Qualified Name argument               */ -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   if IsType .Target -}}
+{{-     if      eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}}<{{template "Type" index .TemplateArguments 1}}>
+{{-     else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}}<{{template "Type" index .TemplateArguments 2}}>
+{{-     else                          -}}{{.Target.Name}}{{template "TemplateArguments" .TemplateArguments}}
+{{-     end                           -}}
+{{-   else if IsEnumEntry   .Target   -}}{{.Target.Name}}
+{{-   else if IsEnumMatcher .Target   -}}{{(index .Target.Options 0).Name}}
+{{-   else                            -}}<unhandled-fully-qualified-name-target={{- printf "%T" .Target -}}>
+{{-   end                             -}}
+{{- end -}}
+
+
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-                          define "TemplateArguments"                      -}}
+{{- /* Emits the WGSL for the template argument list                      */ -}}
+{{- /* ------------------------------------------------------------------ */ -}}
+{{-   if . -}}
+<
+{{-    range $i, $a := . -}}
+{{-      if $i -}}, {{  end -}}
+{{-      if IsInt $a -}}{{- . -}}
+{{-      else        -}}{{- template "Type" $a -}}
+{{-      end -}}
+{{-    end -}}
+>
+{{-   end -}}
+{{- end -}}
diff --git a/test/intrinsics/degrees.spvasm b/test/builtins/degrees.spvasm
similarity index 100%
rename from test/intrinsics/degrees.spvasm
rename to test/builtins/degrees.spvasm
diff --git a/test/intrinsics/degrees.spvasm.expected.glsl b/test/builtins/degrees.spvasm.expected.glsl
similarity index 100%
rename from test/intrinsics/degrees.spvasm.expected.glsl
rename to test/builtins/degrees.spvasm.expected.glsl
diff --git a/test/intrinsics/degrees.spvasm.expected.hlsl b/test/builtins/degrees.spvasm.expected.hlsl
similarity index 100%
rename from test/intrinsics/degrees.spvasm.expected.hlsl
rename to test/builtins/degrees.spvasm.expected.hlsl
diff --git a/test/intrinsics/degrees.spvasm.expected.msl b/test/builtins/degrees.spvasm.expected.msl
similarity index 100%
rename from test/intrinsics/degrees.spvasm.expected.msl
rename to test/builtins/degrees.spvasm.expected.msl
diff --git a/test/intrinsics/degrees.spvasm.expected.spvasm b/test/builtins/degrees.spvasm.expected.spvasm
similarity index 100%
rename from test/intrinsics/degrees.spvasm.expected.spvasm
rename to test/builtins/degrees.spvasm.expected.spvasm
diff --git a/test/intrinsics/degrees.spvasm.expected.wgsl b/test/builtins/degrees.spvasm.expected.wgsl
similarity index 100%
rename from test/intrinsics/degrees.spvasm.expected.wgsl
rename to test/builtins/degrees.spvasm.expected.wgsl
diff --git a/test/intrinsics/frexp.wgsl b/test/builtins/frexp.wgsl
similarity index 100%
rename from test/intrinsics/frexp.wgsl
rename to test/builtins/frexp.wgsl
diff --git a/test/intrinsics/frexp.wgsl.expected.glsl b/test/builtins/frexp.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/frexp.wgsl.expected.glsl
rename to test/builtins/frexp.wgsl.expected.glsl
diff --git a/test/intrinsics/frexp.wgsl.expected.hlsl b/test/builtins/frexp.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/frexp.wgsl.expected.hlsl
rename to test/builtins/frexp.wgsl.expected.hlsl
diff --git a/test/intrinsics/frexp.wgsl.expected.msl b/test/builtins/frexp.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/frexp.wgsl.expected.msl
rename to test/builtins/frexp.wgsl.expected.msl
diff --git a/test/intrinsics/frexp.wgsl.expected.spvasm b/test/builtins/frexp.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/frexp.wgsl.expected.spvasm
rename to test/builtins/frexp.wgsl.expected.spvasm
diff --git a/test/intrinsics/frexp.wgsl.expected.wgsl b/test/builtins/frexp.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/frexp.wgsl.expected.wgsl
rename to test/builtins/frexp.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/002533.wgsl b/test/builtins/gen/abs/002533.wgsl
new file mode 100644
index 0000000..0a476d3
--- /dev/null
+++ b/test/builtins/gen/abs/002533.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(vec<4, f32>) -> vec<4, f32>
+fn abs_002533() {
+  var res: vec4<f32> = abs(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_002533();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_002533();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_002533();
+}
diff --git a/test/intrinsics/gen/abs/002533.wgsl.expected.glsl b/test/builtins/gen/abs/002533.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/002533.wgsl.expected.glsl
rename to test/builtins/gen/abs/002533.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/002533.wgsl.expected.hlsl b/test/builtins/gen/abs/002533.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/002533.wgsl.expected.hlsl
rename to test/builtins/gen/abs/002533.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/002533.wgsl.expected.msl b/test/builtins/gen/abs/002533.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/002533.wgsl.expected.msl
rename to test/builtins/gen/abs/002533.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/002533.wgsl.expected.spvasm b/test/builtins/gen/abs/002533.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/002533.wgsl.expected.spvasm
rename to test/builtins/gen/abs/002533.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/002533.wgsl.expected.wgsl b/test/builtins/gen/abs/002533.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/002533.wgsl.expected.wgsl
rename to test/builtins/gen/abs/002533.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/005174.wgsl b/test/builtins/gen/abs/005174.wgsl
new file mode 100644
index 0000000..25a250a
--- /dev/null
+++ b/test/builtins/gen/abs/005174.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(vec<3, f32>) -> vec<3, f32>
+fn abs_005174() {
+  var res: vec3<f32> = abs(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_005174();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_005174();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_005174();
+}
diff --git a/test/intrinsics/gen/abs/005174.wgsl.expected.glsl b/test/builtins/gen/abs/005174.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/005174.wgsl.expected.glsl
rename to test/builtins/gen/abs/005174.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/005174.wgsl.expected.hlsl b/test/builtins/gen/abs/005174.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/005174.wgsl.expected.hlsl
rename to test/builtins/gen/abs/005174.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/005174.wgsl.expected.msl b/test/builtins/gen/abs/005174.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/005174.wgsl.expected.msl
rename to test/builtins/gen/abs/005174.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/005174.wgsl.expected.spvasm b/test/builtins/gen/abs/005174.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/005174.wgsl.expected.spvasm
rename to test/builtins/gen/abs/005174.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/005174.wgsl.expected.wgsl b/test/builtins/gen/abs/005174.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/005174.wgsl.expected.wgsl
rename to test/builtins/gen/abs/005174.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/1ce782.wgsl b/test/builtins/gen/abs/1ce782.wgsl
new file mode 100644
index 0000000..a9903ca
--- /dev/null
+++ b/test/builtins/gen/abs/1ce782.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(vec<4, u32>) -> vec<4, u32>
+fn abs_1ce782() {
+  var res: vec4<u32> = abs(vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_1ce782();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_1ce782();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_1ce782();
+}
diff --git a/test/intrinsics/gen/abs/1ce782.wgsl.expected.glsl b/test/builtins/gen/abs/1ce782.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/1ce782.wgsl.expected.glsl
rename to test/builtins/gen/abs/1ce782.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/1ce782.wgsl.expected.hlsl b/test/builtins/gen/abs/1ce782.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/1ce782.wgsl.expected.hlsl
rename to test/builtins/gen/abs/1ce782.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/1ce782.wgsl.expected.msl b/test/builtins/gen/abs/1ce782.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/1ce782.wgsl.expected.msl
rename to test/builtins/gen/abs/1ce782.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/1ce782.wgsl.expected.spvasm b/test/builtins/gen/abs/1ce782.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/1ce782.wgsl.expected.spvasm
rename to test/builtins/gen/abs/1ce782.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/1ce782.wgsl.expected.wgsl b/test/builtins/gen/abs/1ce782.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/1ce782.wgsl.expected.wgsl
rename to test/builtins/gen/abs/1ce782.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/1e9d53.wgsl b/test/builtins/gen/abs/1e9d53.wgsl
new file mode 100644
index 0000000..ea898e9
--- /dev/null
+++ b/test/builtins/gen/abs/1e9d53.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(vec<2, f32>) -> vec<2, f32>
+fn abs_1e9d53() {
+  var res: vec2<f32> = abs(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_1e9d53();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_1e9d53();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_1e9d53();
+}
diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.glsl b/test/builtins/gen/abs/1e9d53.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/1e9d53.wgsl.expected.glsl
rename to test/builtins/gen/abs/1e9d53.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.hlsl b/test/builtins/gen/abs/1e9d53.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/1e9d53.wgsl.expected.hlsl
rename to test/builtins/gen/abs/1e9d53.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.msl b/test/builtins/gen/abs/1e9d53.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/1e9d53.wgsl.expected.msl
rename to test/builtins/gen/abs/1e9d53.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.spvasm b/test/builtins/gen/abs/1e9d53.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/1e9d53.wgsl.expected.spvasm
rename to test/builtins/gen/abs/1e9d53.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.wgsl b/test/builtins/gen/abs/1e9d53.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/1e9d53.wgsl.expected.wgsl
rename to test/builtins/gen/abs/1e9d53.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/467cd1.wgsl b/test/builtins/gen/abs/467cd1.wgsl
new file mode 100644
index 0000000..e136df2
--- /dev/null
+++ b/test/builtins/gen/abs/467cd1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(u32) -> u32
+fn abs_467cd1() {
+  var res: u32 = abs(1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_467cd1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_467cd1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_467cd1();
+}
diff --git a/test/intrinsics/gen/abs/467cd1.wgsl.expected.glsl b/test/builtins/gen/abs/467cd1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/467cd1.wgsl.expected.glsl
rename to test/builtins/gen/abs/467cd1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/467cd1.wgsl.expected.hlsl b/test/builtins/gen/abs/467cd1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/467cd1.wgsl.expected.hlsl
rename to test/builtins/gen/abs/467cd1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/467cd1.wgsl.expected.msl b/test/builtins/gen/abs/467cd1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/467cd1.wgsl.expected.msl
rename to test/builtins/gen/abs/467cd1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/467cd1.wgsl.expected.spvasm b/test/builtins/gen/abs/467cd1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/467cd1.wgsl.expected.spvasm
rename to test/builtins/gen/abs/467cd1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/467cd1.wgsl.expected.wgsl b/test/builtins/gen/abs/467cd1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/467cd1.wgsl.expected.wgsl
rename to test/builtins/gen/abs/467cd1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/4ad288.wgsl b/test/builtins/gen/abs/4ad288.wgsl
new file mode 100644
index 0000000..b33ffaa
--- /dev/null
+++ b/test/builtins/gen/abs/4ad288.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(i32) -> i32
+fn abs_4ad288() {
+  var res: i32 = abs(1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_4ad288();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_4ad288();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_4ad288();
+}
diff --git a/test/intrinsics/gen/abs/4ad288.wgsl.expected.glsl b/test/builtins/gen/abs/4ad288.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/4ad288.wgsl.expected.glsl
rename to test/builtins/gen/abs/4ad288.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/4ad288.wgsl.expected.hlsl b/test/builtins/gen/abs/4ad288.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/4ad288.wgsl.expected.hlsl
rename to test/builtins/gen/abs/4ad288.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/4ad288.wgsl.expected.msl b/test/builtins/gen/abs/4ad288.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/4ad288.wgsl.expected.msl
rename to test/builtins/gen/abs/4ad288.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/4ad288.wgsl.expected.spvasm b/test/builtins/gen/abs/4ad288.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/4ad288.wgsl.expected.spvasm
rename to test/builtins/gen/abs/4ad288.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/4ad288.wgsl.expected.wgsl b/test/builtins/gen/abs/4ad288.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/4ad288.wgsl.expected.wgsl
rename to test/builtins/gen/abs/4ad288.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/5ad50a.wgsl b/test/builtins/gen/abs/5ad50a.wgsl
new file mode 100644
index 0000000..6f40a4b
--- /dev/null
+++ b/test/builtins/gen/abs/5ad50a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(vec<3, i32>) -> vec<3, i32>
+fn abs_5ad50a() {
+  var res: vec3<i32> = abs(vec3<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_5ad50a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_5ad50a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_5ad50a();
+}
diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.glsl b/test/builtins/gen/abs/5ad50a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/5ad50a.wgsl.expected.glsl
rename to test/builtins/gen/abs/5ad50a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.hlsl b/test/builtins/gen/abs/5ad50a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/5ad50a.wgsl.expected.hlsl
rename to test/builtins/gen/abs/5ad50a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.msl b/test/builtins/gen/abs/5ad50a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/5ad50a.wgsl.expected.msl
rename to test/builtins/gen/abs/5ad50a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.spvasm b/test/builtins/gen/abs/5ad50a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/5ad50a.wgsl.expected.spvasm
rename to test/builtins/gen/abs/5ad50a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.wgsl b/test/builtins/gen/abs/5ad50a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/5ad50a.wgsl.expected.wgsl
rename to test/builtins/gen/abs/5ad50a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/7326de.wgsl b/test/builtins/gen/abs/7326de.wgsl
new file mode 100644
index 0000000..b06e0c3
--- /dev/null
+++ b/test/builtins/gen/abs/7326de.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(vec<3, u32>) -> vec<3, u32>
+fn abs_7326de() {
+  var res: vec3<u32> = abs(vec3<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_7326de();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_7326de();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_7326de();
+}
diff --git a/test/intrinsics/gen/abs/7326de.wgsl.expected.glsl b/test/builtins/gen/abs/7326de.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/7326de.wgsl.expected.glsl
rename to test/builtins/gen/abs/7326de.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/7326de.wgsl.expected.hlsl b/test/builtins/gen/abs/7326de.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/7326de.wgsl.expected.hlsl
rename to test/builtins/gen/abs/7326de.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/7326de.wgsl.expected.msl b/test/builtins/gen/abs/7326de.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/7326de.wgsl.expected.msl
rename to test/builtins/gen/abs/7326de.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/7326de.wgsl.expected.spvasm b/test/builtins/gen/abs/7326de.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/7326de.wgsl.expected.spvasm
rename to test/builtins/gen/abs/7326de.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/7326de.wgsl.expected.wgsl b/test/builtins/gen/abs/7326de.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/7326de.wgsl.expected.wgsl
rename to test/builtins/gen/abs/7326de.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/7f28e6.wgsl b/test/builtins/gen/abs/7f28e6.wgsl
new file mode 100644
index 0000000..51d137c
--- /dev/null
+++ b/test/builtins/gen/abs/7f28e6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(vec<2, u32>) -> vec<2, u32>
+fn abs_7f28e6() {
+  var res: vec2<u32> = abs(vec2<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_7f28e6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_7f28e6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_7f28e6();
+}
diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.glsl b/test/builtins/gen/abs/7f28e6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/7f28e6.wgsl.expected.glsl
rename to test/builtins/gen/abs/7f28e6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.hlsl b/test/builtins/gen/abs/7f28e6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/7f28e6.wgsl.expected.hlsl
rename to test/builtins/gen/abs/7f28e6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.msl b/test/builtins/gen/abs/7f28e6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/7f28e6.wgsl.expected.msl
rename to test/builtins/gen/abs/7f28e6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.spvasm b/test/builtins/gen/abs/7f28e6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/7f28e6.wgsl.expected.spvasm
rename to test/builtins/gen/abs/7f28e6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.wgsl b/test/builtins/gen/abs/7f28e6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/7f28e6.wgsl.expected.wgsl
rename to test/builtins/gen/abs/7f28e6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/7faa9e.wgsl b/test/builtins/gen/abs/7faa9e.wgsl
new file mode 100644
index 0000000..5136e6f
--- /dev/null
+++ b/test/builtins/gen/abs/7faa9e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(vec<2, i32>) -> vec<2, i32>
+fn abs_7faa9e() {
+  var res: vec2<i32> = abs(vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_7faa9e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_7faa9e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_7faa9e();
+}
diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.glsl b/test/builtins/gen/abs/7faa9e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/7faa9e.wgsl.expected.glsl
rename to test/builtins/gen/abs/7faa9e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.hlsl b/test/builtins/gen/abs/7faa9e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/7faa9e.wgsl.expected.hlsl
rename to test/builtins/gen/abs/7faa9e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.msl b/test/builtins/gen/abs/7faa9e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/7faa9e.wgsl.expected.msl
rename to test/builtins/gen/abs/7faa9e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.spvasm b/test/builtins/gen/abs/7faa9e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/7faa9e.wgsl.expected.spvasm
rename to test/builtins/gen/abs/7faa9e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.wgsl b/test/builtins/gen/abs/7faa9e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/7faa9e.wgsl.expected.wgsl
rename to test/builtins/gen/abs/7faa9e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/9c80a6.wgsl b/test/builtins/gen/abs/9c80a6.wgsl
new file mode 100644
index 0000000..7df8995
--- /dev/null
+++ b/test/builtins/gen/abs/9c80a6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(vec<4, i32>) -> vec<4, i32>
+fn abs_9c80a6() {
+  var res: vec4<i32> = abs(vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_9c80a6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_9c80a6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_9c80a6();
+}
diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.glsl b/test/builtins/gen/abs/9c80a6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/9c80a6.wgsl.expected.glsl
rename to test/builtins/gen/abs/9c80a6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.hlsl b/test/builtins/gen/abs/9c80a6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/9c80a6.wgsl.expected.hlsl
rename to test/builtins/gen/abs/9c80a6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.msl b/test/builtins/gen/abs/9c80a6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/9c80a6.wgsl.expected.msl
rename to test/builtins/gen/abs/9c80a6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.spvasm b/test/builtins/gen/abs/9c80a6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/9c80a6.wgsl.expected.spvasm
rename to test/builtins/gen/abs/9c80a6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.wgsl b/test/builtins/gen/abs/9c80a6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/9c80a6.wgsl.expected.wgsl
rename to test/builtins/gen/abs/9c80a6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/abs/b96037.wgsl b/test/builtins/gen/abs/b96037.wgsl
new file mode 100644
index 0000000..f3a6385
--- /dev/null
+++ b/test/builtins/gen/abs/b96037.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn abs(f32) -> f32
+fn abs_b96037() {
+  var res: f32 = abs(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_b96037();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  abs_b96037();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  abs_b96037();
+}
diff --git a/test/intrinsics/gen/abs/b96037.wgsl.expected.glsl b/test/builtins/gen/abs/b96037.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/abs/b96037.wgsl.expected.glsl
rename to test/builtins/gen/abs/b96037.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/abs/b96037.wgsl.expected.hlsl b/test/builtins/gen/abs/b96037.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/abs/b96037.wgsl.expected.hlsl
rename to test/builtins/gen/abs/b96037.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/abs/b96037.wgsl.expected.msl b/test/builtins/gen/abs/b96037.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/abs/b96037.wgsl.expected.msl
rename to test/builtins/gen/abs/b96037.wgsl.expected.msl
diff --git a/test/intrinsics/gen/abs/b96037.wgsl.expected.spvasm b/test/builtins/gen/abs/b96037.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/abs/b96037.wgsl.expected.spvasm
rename to test/builtins/gen/abs/b96037.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/abs/b96037.wgsl.expected.wgsl b/test/builtins/gen/abs/b96037.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/abs/b96037.wgsl.expected.wgsl
rename to test/builtins/gen/abs/b96037.wgsl.expected.wgsl
diff --git a/test/builtins/gen/acos/489247.wgsl b/test/builtins/gen/acos/489247.wgsl
new file mode 100644
index 0000000..5f6b124
--- /dev/null
+++ b/test/builtins/gen/acos/489247.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn acos(f32) -> f32
+fn acos_489247() {
+  var res: f32 = acos(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_489247();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  acos_489247();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  acos_489247();
+}
diff --git a/test/intrinsics/gen/acos/489247.wgsl.expected.glsl b/test/builtins/gen/acos/489247.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/acos/489247.wgsl.expected.glsl
rename to test/builtins/gen/acos/489247.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/acos/489247.wgsl.expected.hlsl b/test/builtins/gen/acos/489247.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/acos/489247.wgsl.expected.hlsl
rename to test/builtins/gen/acos/489247.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/acos/489247.wgsl.expected.msl b/test/builtins/gen/acos/489247.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/acos/489247.wgsl.expected.msl
rename to test/builtins/gen/acos/489247.wgsl.expected.msl
diff --git a/test/intrinsics/gen/acos/489247.wgsl.expected.spvasm b/test/builtins/gen/acos/489247.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/acos/489247.wgsl.expected.spvasm
rename to test/builtins/gen/acos/489247.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/acos/489247.wgsl.expected.wgsl b/test/builtins/gen/acos/489247.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/acos/489247.wgsl.expected.wgsl
rename to test/builtins/gen/acos/489247.wgsl.expected.wgsl
diff --git a/test/builtins/gen/acos/8e2acf.wgsl b/test/builtins/gen/acos/8e2acf.wgsl
new file mode 100644
index 0000000..5e18348
--- /dev/null
+++ b/test/builtins/gen/acos/8e2acf.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn acos(vec<4, f32>) -> vec<4, f32>
+fn acos_8e2acf() {
+  var res: vec4<f32> = acos(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_8e2acf();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  acos_8e2acf();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  acos_8e2acf();
+}
diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.glsl b/test/builtins/gen/acos/8e2acf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/acos/8e2acf.wgsl.expected.glsl
rename to test/builtins/gen/acos/8e2acf.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.hlsl b/test/builtins/gen/acos/8e2acf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/acos/8e2acf.wgsl.expected.hlsl
rename to test/builtins/gen/acos/8e2acf.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.msl b/test/builtins/gen/acos/8e2acf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/acos/8e2acf.wgsl.expected.msl
rename to test/builtins/gen/acos/8e2acf.wgsl.expected.msl
diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.spvasm b/test/builtins/gen/acos/8e2acf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/acos/8e2acf.wgsl.expected.spvasm
rename to test/builtins/gen/acos/8e2acf.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.wgsl b/test/builtins/gen/acos/8e2acf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/acos/8e2acf.wgsl.expected.wgsl
rename to test/builtins/gen/acos/8e2acf.wgsl.expected.wgsl
diff --git a/test/builtins/gen/acos/a610c4.wgsl b/test/builtins/gen/acos/a610c4.wgsl
new file mode 100644
index 0000000..88d8cc2
--- /dev/null
+++ b/test/builtins/gen/acos/a610c4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn acos(vec<3, f32>) -> vec<3, f32>
+fn acos_a610c4() {
+  var res: vec3<f32> = acos(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_a610c4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  acos_a610c4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  acos_a610c4();
+}
diff --git a/test/intrinsics/gen/acos/a610c4.wgsl.expected.glsl b/test/builtins/gen/acos/a610c4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/acos/a610c4.wgsl.expected.glsl
rename to test/builtins/gen/acos/a610c4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/acos/a610c4.wgsl.expected.hlsl b/test/builtins/gen/acos/a610c4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/acos/a610c4.wgsl.expected.hlsl
rename to test/builtins/gen/acos/a610c4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/acos/a610c4.wgsl.expected.msl b/test/builtins/gen/acos/a610c4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/acos/a610c4.wgsl.expected.msl
rename to test/builtins/gen/acos/a610c4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/acos/a610c4.wgsl.expected.spvasm b/test/builtins/gen/acos/a610c4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/acos/a610c4.wgsl.expected.spvasm
rename to test/builtins/gen/acos/a610c4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/acos/a610c4.wgsl.expected.wgsl b/test/builtins/gen/acos/a610c4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/acos/a610c4.wgsl.expected.wgsl
rename to test/builtins/gen/acos/a610c4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/acos/dfc915.wgsl b/test/builtins/gen/acos/dfc915.wgsl
new file mode 100644
index 0000000..aa36605
--- /dev/null
+++ b/test/builtins/gen/acos/dfc915.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn acos(vec<2, f32>) -> vec<2, f32>
+fn acos_dfc915() {
+  var res: vec2<f32> = acos(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_dfc915();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  acos_dfc915();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  acos_dfc915();
+}
diff --git a/test/intrinsics/gen/acos/dfc915.wgsl.expected.glsl b/test/builtins/gen/acos/dfc915.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/acos/dfc915.wgsl.expected.glsl
rename to test/builtins/gen/acos/dfc915.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/acos/dfc915.wgsl.expected.hlsl b/test/builtins/gen/acos/dfc915.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/acos/dfc915.wgsl.expected.hlsl
rename to test/builtins/gen/acos/dfc915.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/acos/dfc915.wgsl.expected.msl b/test/builtins/gen/acos/dfc915.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/acos/dfc915.wgsl.expected.msl
rename to test/builtins/gen/acos/dfc915.wgsl.expected.msl
diff --git a/test/intrinsics/gen/acos/dfc915.wgsl.expected.spvasm b/test/builtins/gen/acos/dfc915.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/acos/dfc915.wgsl.expected.spvasm
rename to test/builtins/gen/acos/dfc915.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/acos/dfc915.wgsl.expected.wgsl b/test/builtins/gen/acos/dfc915.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/acos/dfc915.wgsl.expected.wgsl
rename to test/builtins/gen/acos/dfc915.wgsl.expected.wgsl
diff --git a/test/builtins/gen/all/353d6a.wgsl b/test/builtins/gen/all/353d6a.wgsl
new file mode 100644
index 0000000..985d068
--- /dev/null
+++ b/test/builtins/gen/all/353d6a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn all(bool) -> bool
+fn all_353d6a() {
+  var res: bool = all(bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  all_353d6a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  all_353d6a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  all_353d6a();
+}
diff --git a/test/intrinsics/gen/all/353d6a.wgsl.expected.glsl b/test/builtins/gen/all/353d6a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/all/353d6a.wgsl.expected.glsl
rename to test/builtins/gen/all/353d6a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/all/353d6a.wgsl.expected.hlsl b/test/builtins/gen/all/353d6a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/all/353d6a.wgsl.expected.hlsl
rename to test/builtins/gen/all/353d6a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/all/353d6a.wgsl.expected.msl b/test/builtins/gen/all/353d6a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/all/353d6a.wgsl.expected.msl
rename to test/builtins/gen/all/353d6a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/all/353d6a.wgsl.expected.spvasm b/test/builtins/gen/all/353d6a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/all/353d6a.wgsl.expected.spvasm
rename to test/builtins/gen/all/353d6a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/all/353d6a.wgsl.expected.wgsl b/test/builtins/gen/all/353d6a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/all/353d6a.wgsl.expected.wgsl
rename to test/builtins/gen/all/353d6a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/all/986c7b.wgsl b/test/builtins/gen/all/986c7b.wgsl
new file mode 100644
index 0000000..7f58c25
--- /dev/null
+++ b/test/builtins/gen/all/986c7b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn all(vec<4, bool>) -> bool
+fn all_986c7b() {
+  var res: bool = all(vec4<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  all_986c7b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  all_986c7b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  all_986c7b();
+}
diff --git a/test/intrinsics/gen/all/986c7b.wgsl.expected.glsl b/test/builtins/gen/all/986c7b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/all/986c7b.wgsl.expected.glsl
rename to test/builtins/gen/all/986c7b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/all/986c7b.wgsl.expected.hlsl b/test/builtins/gen/all/986c7b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/all/986c7b.wgsl.expected.hlsl
rename to test/builtins/gen/all/986c7b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/all/986c7b.wgsl.expected.msl b/test/builtins/gen/all/986c7b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/all/986c7b.wgsl.expected.msl
rename to test/builtins/gen/all/986c7b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/all/986c7b.wgsl.expected.spvasm b/test/builtins/gen/all/986c7b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/all/986c7b.wgsl.expected.spvasm
rename to test/builtins/gen/all/986c7b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/all/986c7b.wgsl.expected.wgsl b/test/builtins/gen/all/986c7b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/all/986c7b.wgsl.expected.wgsl
rename to test/builtins/gen/all/986c7b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/all/bd2dba.wgsl b/test/builtins/gen/all/bd2dba.wgsl
new file mode 100644
index 0000000..f36e3f7
--- /dev/null
+++ b/test/builtins/gen/all/bd2dba.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn all(vec<3, bool>) -> bool
+fn all_bd2dba() {
+  var res: bool = all(vec3<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  all_bd2dba();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  all_bd2dba();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  all_bd2dba();
+}
diff --git a/test/intrinsics/gen/all/bd2dba.wgsl.expected.glsl b/test/builtins/gen/all/bd2dba.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/all/bd2dba.wgsl.expected.glsl
rename to test/builtins/gen/all/bd2dba.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/all/bd2dba.wgsl.expected.hlsl b/test/builtins/gen/all/bd2dba.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/all/bd2dba.wgsl.expected.hlsl
rename to test/builtins/gen/all/bd2dba.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/all/bd2dba.wgsl.expected.msl b/test/builtins/gen/all/bd2dba.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/all/bd2dba.wgsl.expected.msl
rename to test/builtins/gen/all/bd2dba.wgsl.expected.msl
diff --git a/test/intrinsics/gen/all/bd2dba.wgsl.expected.spvasm b/test/builtins/gen/all/bd2dba.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/all/bd2dba.wgsl.expected.spvasm
rename to test/builtins/gen/all/bd2dba.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/all/bd2dba.wgsl.expected.wgsl b/test/builtins/gen/all/bd2dba.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/all/bd2dba.wgsl.expected.wgsl
rename to test/builtins/gen/all/bd2dba.wgsl.expected.wgsl
diff --git a/test/builtins/gen/all/f46790.wgsl b/test/builtins/gen/all/f46790.wgsl
new file mode 100644
index 0000000..e3e3f72
--- /dev/null
+++ b/test/builtins/gen/all/f46790.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn all(vec<2, bool>) -> bool
+fn all_f46790() {
+  var res: bool = all(vec2<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  all_f46790();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  all_f46790();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  all_f46790();
+}
diff --git a/test/intrinsics/gen/all/f46790.wgsl.expected.glsl b/test/builtins/gen/all/f46790.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/all/f46790.wgsl.expected.glsl
rename to test/builtins/gen/all/f46790.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/all/f46790.wgsl.expected.hlsl b/test/builtins/gen/all/f46790.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/all/f46790.wgsl.expected.hlsl
rename to test/builtins/gen/all/f46790.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/all/f46790.wgsl.expected.msl b/test/builtins/gen/all/f46790.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/all/f46790.wgsl.expected.msl
rename to test/builtins/gen/all/f46790.wgsl.expected.msl
diff --git a/test/intrinsics/gen/all/f46790.wgsl.expected.spvasm b/test/builtins/gen/all/f46790.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/all/f46790.wgsl.expected.spvasm
rename to test/builtins/gen/all/f46790.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/all/f46790.wgsl.expected.wgsl b/test/builtins/gen/all/f46790.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/all/f46790.wgsl.expected.wgsl
rename to test/builtins/gen/all/f46790.wgsl.expected.wgsl
diff --git a/test/builtins/gen/any/083428.wgsl b/test/builtins/gen/any/083428.wgsl
new file mode 100644
index 0000000..542fbcd
--- /dev/null
+++ b/test/builtins/gen/any/083428.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn any(vec<4, bool>) -> bool
+fn any_083428() {
+  var res: bool = any(vec4<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  any_083428();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  any_083428();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  any_083428();
+}
diff --git a/test/intrinsics/gen/any/083428.wgsl.expected.glsl b/test/builtins/gen/any/083428.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/any/083428.wgsl.expected.glsl
rename to test/builtins/gen/any/083428.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/any/083428.wgsl.expected.hlsl b/test/builtins/gen/any/083428.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/any/083428.wgsl.expected.hlsl
rename to test/builtins/gen/any/083428.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/any/083428.wgsl.expected.msl b/test/builtins/gen/any/083428.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/any/083428.wgsl.expected.msl
rename to test/builtins/gen/any/083428.wgsl.expected.msl
diff --git a/test/intrinsics/gen/any/083428.wgsl.expected.spvasm b/test/builtins/gen/any/083428.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/any/083428.wgsl.expected.spvasm
rename to test/builtins/gen/any/083428.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/any/083428.wgsl.expected.wgsl b/test/builtins/gen/any/083428.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/any/083428.wgsl.expected.wgsl
rename to test/builtins/gen/any/083428.wgsl.expected.wgsl
diff --git a/test/builtins/gen/any/0e3e58.wgsl b/test/builtins/gen/any/0e3e58.wgsl
new file mode 100644
index 0000000..506de4c
--- /dev/null
+++ b/test/builtins/gen/any/0e3e58.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn any(vec<2, bool>) -> bool
+fn any_0e3e58() {
+  var res: bool = any(vec2<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  any_0e3e58();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  any_0e3e58();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  any_0e3e58();
+}
diff --git a/test/intrinsics/gen/any/0e3e58.wgsl.expected.glsl b/test/builtins/gen/any/0e3e58.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/any/0e3e58.wgsl.expected.glsl
rename to test/builtins/gen/any/0e3e58.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/any/0e3e58.wgsl.expected.hlsl b/test/builtins/gen/any/0e3e58.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/any/0e3e58.wgsl.expected.hlsl
rename to test/builtins/gen/any/0e3e58.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/any/0e3e58.wgsl.expected.msl b/test/builtins/gen/any/0e3e58.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/any/0e3e58.wgsl.expected.msl
rename to test/builtins/gen/any/0e3e58.wgsl.expected.msl
diff --git a/test/intrinsics/gen/any/0e3e58.wgsl.expected.spvasm b/test/builtins/gen/any/0e3e58.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/any/0e3e58.wgsl.expected.spvasm
rename to test/builtins/gen/any/0e3e58.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/any/0e3e58.wgsl.expected.wgsl b/test/builtins/gen/any/0e3e58.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/any/0e3e58.wgsl.expected.wgsl
rename to test/builtins/gen/any/0e3e58.wgsl.expected.wgsl
diff --git a/test/builtins/gen/any/2ab91a.wgsl b/test/builtins/gen/any/2ab91a.wgsl
new file mode 100644
index 0000000..7e32b80
--- /dev/null
+++ b/test/builtins/gen/any/2ab91a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn any(bool) -> bool
+fn any_2ab91a() {
+  var res: bool = any(bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  any_2ab91a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  any_2ab91a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  any_2ab91a();
+}
diff --git a/test/intrinsics/gen/any/2ab91a.wgsl.expected.glsl b/test/builtins/gen/any/2ab91a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/any/2ab91a.wgsl.expected.glsl
rename to test/builtins/gen/any/2ab91a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/any/2ab91a.wgsl.expected.hlsl b/test/builtins/gen/any/2ab91a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/any/2ab91a.wgsl.expected.hlsl
rename to test/builtins/gen/any/2ab91a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/any/2ab91a.wgsl.expected.msl b/test/builtins/gen/any/2ab91a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/any/2ab91a.wgsl.expected.msl
rename to test/builtins/gen/any/2ab91a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/any/2ab91a.wgsl.expected.spvasm b/test/builtins/gen/any/2ab91a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/any/2ab91a.wgsl.expected.spvasm
rename to test/builtins/gen/any/2ab91a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/any/2ab91a.wgsl.expected.wgsl b/test/builtins/gen/any/2ab91a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/any/2ab91a.wgsl.expected.wgsl
rename to test/builtins/gen/any/2ab91a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/any/e755c1.wgsl b/test/builtins/gen/any/e755c1.wgsl
new file mode 100644
index 0000000..6362a68
--- /dev/null
+++ b/test/builtins/gen/any/e755c1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn any(vec<3, bool>) -> bool
+fn any_e755c1() {
+  var res: bool = any(vec3<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  any_e755c1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  any_e755c1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  any_e755c1();
+}
diff --git a/test/intrinsics/gen/any/e755c1.wgsl.expected.glsl b/test/builtins/gen/any/e755c1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/any/e755c1.wgsl.expected.glsl
rename to test/builtins/gen/any/e755c1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/any/e755c1.wgsl.expected.hlsl b/test/builtins/gen/any/e755c1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/any/e755c1.wgsl.expected.hlsl
rename to test/builtins/gen/any/e755c1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/any/e755c1.wgsl.expected.msl b/test/builtins/gen/any/e755c1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/any/e755c1.wgsl.expected.msl
rename to test/builtins/gen/any/e755c1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/any/e755c1.wgsl.expected.spvasm b/test/builtins/gen/any/e755c1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/any/e755c1.wgsl.expected.spvasm
rename to test/builtins/gen/any/e755c1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/any/e755c1.wgsl.expected.wgsl b/test/builtins/gen/any/e755c1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/any/e755c1.wgsl.expected.wgsl
rename to test/builtins/gen/any/e755c1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/arrayLength/1588cd.wgsl b/test/builtins/gen/arrayLength/1588cd.wgsl
new file mode 100644
index 0000000..25f05b2
--- /dev/null
+++ b/test/builtins/gen/arrayLength/1588cd.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RO {
+  arg_0: array<i32>;
+};
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+
+// fn arrayLength(ptr<storage, array<i32>, read>) -> u32
+fn arrayLength_1588cd() {
+  var res: u32 = arrayLength(&sb_ro.arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  arrayLength_1588cd();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  arrayLength_1588cd();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  arrayLength_1588cd();
+}
diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.glsl b/test/builtins/gen/arrayLength/1588cd.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.glsl
rename to test/builtins/gen/arrayLength/1588cd.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.hlsl b/test/builtins/gen/arrayLength/1588cd.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.hlsl
rename to test/builtins/gen/arrayLength/1588cd.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl b/test/builtins/gen/arrayLength/1588cd.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl
rename to test/builtins/gen/arrayLength/1588cd.wgsl.expected.msl
diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.spvasm b/test/builtins/gen/arrayLength/1588cd.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.spvasm
rename to test/builtins/gen/arrayLength/1588cd.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.wgsl b/test/builtins/gen/arrayLength/1588cd.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.wgsl
rename to test/builtins/gen/arrayLength/1588cd.wgsl.expected.wgsl
diff --git a/test/builtins/gen/arrayLength/61b1c7.wgsl b/test/builtins/gen/arrayLength/61b1c7.wgsl
new file mode 100644
index 0000000..1bac505
--- /dev/null
+++ b/test/builtins/gen/arrayLength/61b1c7.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: array<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn arrayLength(ptr<storage, array<i32>, read_write>) -> u32
+fn arrayLength_61b1c7() {
+  var res: u32 = arrayLength(&sb_rw.arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  arrayLength_61b1c7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  arrayLength_61b1c7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  arrayLength_61b1c7();
+}
diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.glsl b/test/builtins/gen/arrayLength/61b1c7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.glsl
rename to test/builtins/gen/arrayLength/61b1c7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.hlsl b/test/builtins/gen/arrayLength/61b1c7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.hlsl
rename to test/builtins/gen/arrayLength/61b1c7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.msl b/test/builtins/gen/arrayLength/61b1c7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.msl
rename to test/builtins/gen/arrayLength/61b1c7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.spvasm b/test/builtins/gen/arrayLength/61b1c7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.spvasm
rename to test/builtins/gen/arrayLength/61b1c7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.wgsl b/test/builtins/gen/arrayLength/61b1c7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.wgsl
rename to test/builtins/gen/arrayLength/61b1c7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/arrayLength/a0f5ca.wgsl b/test/builtins/gen/arrayLength/a0f5ca.wgsl
new file mode 100644
index 0000000..b313858
--- /dev/null
+++ b/test/builtins/gen/arrayLength/a0f5ca.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RO {
+  arg_0: array<f32>;
+};
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+
+// fn arrayLength(ptr<storage, array<f32>, read>) -> u32
+fn arrayLength_a0f5ca() {
+  var res: u32 = arrayLength(&sb_ro.arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  arrayLength_a0f5ca();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  arrayLength_a0f5ca();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  arrayLength_a0f5ca();
+}
diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.glsl b/test/builtins/gen/arrayLength/a0f5ca.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.glsl
rename to test/builtins/gen/arrayLength/a0f5ca.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.hlsl b/test/builtins/gen/arrayLength/a0f5ca.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.hlsl
rename to test/builtins/gen/arrayLength/a0f5ca.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl b/test/builtins/gen/arrayLength/a0f5ca.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl
rename to test/builtins/gen/arrayLength/a0f5ca.wgsl.expected.msl
diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.spvasm b/test/builtins/gen/arrayLength/a0f5ca.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.spvasm
rename to test/builtins/gen/arrayLength/a0f5ca.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.wgsl b/test/builtins/gen/arrayLength/a0f5ca.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.wgsl
rename to test/builtins/gen/arrayLength/a0f5ca.wgsl.expected.wgsl
diff --git a/test/builtins/gen/arrayLength/cdd123.wgsl b/test/builtins/gen/arrayLength/cdd123.wgsl
new file mode 100644
index 0000000..0589da2
--- /dev/null
+++ b/test/builtins/gen/arrayLength/cdd123.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: array<f32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn arrayLength(ptr<storage, array<f32>, read_write>) -> u32
+fn arrayLength_cdd123() {
+  var res: u32 = arrayLength(&sb_rw.arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  arrayLength_cdd123();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  arrayLength_cdd123();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  arrayLength_cdd123();
+}
diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.glsl b/test/builtins/gen/arrayLength/cdd123.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.glsl
rename to test/builtins/gen/arrayLength/cdd123.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.hlsl b/test/builtins/gen/arrayLength/cdd123.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.hlsl
rename to test/builtins/gen/arrayLength/cdd123.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.msl b/test/builtins/gen/arrayLength/cdd123.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.msl
rename to test/builtins/gen/arrayLength/cdd123.wgsl.expected.msl
diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.spvasm b/test/builtins/gen/arrayLength/cdd123.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.spvasm
rename to test/builtins/gen/arrayLength/cdd123.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.wgsl b/test/builtins/gen/arrayLength/cdd123.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.wgsl
rename to test/builtins/gen/arrayLength/cdd123.wgsl.expected.wgsl
diff --git a/test/builtins/gen/arrayLength/cfca0a.wgsl b/test/builtins/gen/arrayLength/cfca0a.wgsl
new file mode 100644
index 0000000..51f628b
--- /dev/null
+++ b/test/builtins/gen/arrayLength/cfca0a.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RO {
+  arg_0: array<u32>;
+};
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+
+// fn arrayLength(ptr<storage, array<u32>, read>) -> u32
+fn arrayLength_cfca0a() {
+  var res: u32 = arrayLength(&sb_ro.arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  arrayLength_cfca0a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  arrayLength_cfca0a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  arrayLength_cfca0a();
+}
diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.glsl b/test/builtins/gen/arrayLength/cfca0a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.glsl
rename to test/builtins/gen/arrayLength/cfca0a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.hlsl b/test/builtins/gen/arrayLength/cfca0a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.hlsl
rename to test/builtins/gen/arrayLength/cfca0a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl b/test/builtins/gen/arrayLength/cfca0a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl
rename to test/builtins/gen/arrayLength/cfca0a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.spvasm b/test/builtins/gen/arrayLength/cfca0a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.spvasm
rename to test/builtins/gen/arrayLength/cfca0a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.wgsl b/test/builtins/gen/arrayLength/cfca0a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.wgsl
rename to test/builtins/gen/arrayLength/cfca0a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/arrayLength/eb510f.wgsl b/test/builtins/gen/arrayLength/eb510f.wgsl
new file mode 100644
index 0000000..44ade8b
--- /dev/null
+++ b/test/builtins/gen/arrayLength/eb510f.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: array<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn arrayLength(ptr<storage, array<u32>, read_write>) -> u32
+fn arrayLength_eb510f() {
+  var res: u32 = arrayLength(&sb_rw.arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  arrayLength_eb510f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  arrayLength_eb510f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  arrayLength_eb510f();
+}
diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.glsl b/test/builtins/gen/arrayLength/eb510f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.glsl
rename to test/builtins/gen/arrayLength/eb510f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.hlsl b/test/builtins/gen/arrayLength/eb510f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.hlsl
rename to test/builtins/gen/arrayLength/eb510f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.msl b/test/builtins/gen/arrayLength/eb510f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.msl
rename to test/builtins/gen/arrayLength/eb510f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.spvasm b/test/builtins/gen/arrayLength/eb510f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.spvasm
rename to test/builtins/gen/arrayLength/eb510f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.wgsl b/test/builtins/gen/arrayLength/eb510f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.wgsl
rename to test/builtins/gen/arrayLength/eb510f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/asin/064953.wgsl b/test/builtins/gen/asin/064953.wgsl
new file mode 100644
index 0000000..5a08a25
--- /dev/null
+++ b/test/builtins/gen/asin/064953.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn asin(vec<4, f32>) -> vec<4, f32>
+fn asin_064953() {
+  var res: vec4<f32> = asin(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_064953();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  asin_064953();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  asin_064953();
+}
diff --git a/test/intrinsics/gen/asin/064953.wgsl.expected.glsl b/test/builtins/gen/asin/064953.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/asin/064953.wgsl.expected.glsl
rename to test/builtins/gen/asin/064953.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/asin/064953.wgsl.expected.hlsl b/test/builtins/gen/asin/064953.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/asin/064953.wgsl.expected.hlsl
rename to test/builtins/gen/asin/064953.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/asin/064953.wgsl.expected.msl b/test/builtins/gen/asin/064953.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/asin/064953.wgsl.expected.msl
rename to test/builtins/gen/asin/064953.wgsl.expected.msl
diff --git a/test/intrinsics/gen/asin/064953.wgsl.expected.spvasm b/test/builtins/gen/asin/064953.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/asin/064953.wgsl.expected.spvasm
rename to test/builtins/gen/asin/064953.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/asin/064953.wgsl.expected.wgsl b/test/builtins/gen/asin/064953.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/asin/064953.wgsl.expected.wgsl
rename to test/builtins/gen/asin/064953.wgsl.expected.wgsl
diff --git a/test/builtins/gen/asin/7b6a44.wgsl b/test/builtins/gen/asin/7b6a44.wgsl
new file mode 100644
index 0000000..22ddf8b
--- /dev/null
+++ b/test/builtins/gen/asin/7b6a44.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn asin(vec<2, f32>) -> vec<2, f32>
+fn asin_7b6a44() {
+  var res: vec2<f32> = asin(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_7b6a44();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  asin_7b6a44();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  asin_7b6a44();
+}
diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.glsl b/test/builtins/gen/asin/7b6a44.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/asin/7b6a44.wgsl.expected.glsl
rename to test/builtins/gen/asin/7b6a44.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.hlsl b/test/builtins/gen/asin/7b6a44.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/asin/7b6a44.wgsl.expected.hlsl
rename to test/builtins/gen/asin/7b6a44.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.msl b/test/builtins/gen/asin/7b6a44.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/asin/7b6a44.wgsl.expected.msl
rename to test/builtins/gen/asin/7b6a44.wgsl.expected.msl
diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.spvasm b/test/builtins/gen/asin/7b6a44.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/asin/7b6a44.wgsl.expected.spvasm
rename to test/builtins/gen/asin/7b6a44.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.wgsl b/test/builtins/gen/asin/7b6a44.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/asin/7b6a44.wgsl.expected.wgsl
rename to test/builtins/gen/asin/7b6a44.wgsl.expected.wgsl
diff --git a/test/builtins/gen/asin/8cd9c9.wgsl b/test/builtins/gen/asin/8cd9c9.wgsl
new file mode 100644
index 0000000..f5a9266
--- /dev/null
+++ b/test/builtins/gen/asin/8cd9c9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn asin(vec<3, f32>) -> vec<3, f32>
+fn asin_8cd9c9() {
+  var res: vec3<f32> = asin(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_8cd9c9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  asin_8cd9c9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  asin_8cd9c9();
+}
diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.glsl b/test/builtins/gen/asin/8cd9c9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/asin/8cd9c9.wgsl.expected.glsl
rename to test/builtins/gen/asin/8cd9c9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.hlsl b/test/builtins/gen/asin/8cd9c9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/asin/8cd9c9.wgsl.expected.hlsl
rename to test/builtins/gen/asin/8cd9c9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.msl b/test/builtins/gen/asin/8cd9c9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/asin/8cd9c9.wgsl.expected.msl
rename to test/builtins/gen/asin/8cd9c9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.spvasm b/test/builtins/gen/asin/8cd9c9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/asin/8cd9c9.wgsl.expected.spvasm
rename to test/builtins/gen/asin/8cd9c9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.wgsl b/test/builtins/gen/asin/8cd9c9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/asin/8cd9c9.wgsl.expected.wgsl
rename to test/builtins/gen/asin/8cd9c9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/asin/c0c272.wgsl b/test/builtins/gen/asin/c0c272.wgsl
new file mode 100644
index 0000000..133657e
--- /dev/null
+++ b/test/builtins/gen/asin/c0c272.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn asin(f32) -> f32
+fn asin_c0c272() {
+  var res: f32 = asin(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_c0c272();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  asin_c0c272();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  asin_c0c272();
+}
diff --git a/test/intrinsics/gen/asin/c0c272.wgsl.expected.glsl b/test/builtins/gen/asin/c0c272.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/asin/c0c272.wgsl.expected.glsl
rename to test/builtins/gen/asin/c0c272.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/asin/c0c272.wgsl.expected.hlsl b/test/builtins/gen/asin/c0c272.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/asin/c0c272.wgsl.expected.hlsl
rename to test/builtins/gen/asin/c0c272.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/asin/c0c272.wgsl.expected.msl b/test/builtins/gen/asin/c0c272.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/asin/c0c272.wgsl.expected.msl
rename to test/builtins/gen/asin/c0c272.wgsl.expected.msl
diff --git a/test/intrinsics/gen/asin/c0c272.wgsl.expected.spvasm b/test/builtins/gen/asin/c0c272.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/asin/c0c272.wgsl.expected.spvasm
rename to test/builtins/gen/asin/c0c272.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/asin/c0c272.wgsl.expected.wgsl b/test/builtins/gen/asin/c0c272.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/asin/c0c272.wgsl.expected.wgsl
rename to test/builtins/gen/asin/c0c272.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atan/02979a.wgsl b/test/builtins/gen/atan/02979a.wgsl
new file mode 100644
index 0000000..4624dbc
--- /dev/null
+++ b/test/builtins/gen/atan/02979a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn atan(f32) -> f32
+fn atan_02979a() {
+  var res: f32 = atan(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_02979a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atan_02979a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atan_02979a();
+}
diff --git a/test/intrinsics/gen/atan/02979a.wgsl.expected.glsl b/test/builtins/gen/atan/02979a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atan/02979a.wgsl.expected.glsl
rename to test/builtins/gen/atan/02979a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atan/02979a.wgsl.expected.hlsl b/test/builtins/gen/atan/02979a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atan/02979a.wgsl.expected.hlsl
rename to test/builtins/gen/atan/02979a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atan/02979a.wgsl.expected.msl b/test/builtins/gen/atan/02979a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atan/02979a.wgsl.expected.msl
rename to test/builtins/gen/atan/02979a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atan/02979a.wgsl.expected.spvasm b/test/builtins/gen/atan/02979a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atan/02979a.wgsl.expected.spvasm
rename to test/builtins/gen/atan/02979a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atan/02979a.wgsl.expected.wgsl b/test/builtins/gen/atan/02979a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atan/02979a.wgsl.expected.wgsl
rename to test/builtins/gen/atan/02979a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atan/331e6d.wgsl b/test/builtins/gen/atan/331e6d.wgsl
new file mode 100644
index 0000000..43d3be6
--- /dev/null
+++ b/test/builtins/gen/atan/331e6d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn atan(vec<3, f32>) -> vec<3, f32>
+fn atan_331e6d() {
+  var res: vec3<f32> = atan(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_331e6d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atan_331e6d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atan_331e6d();
+}
diff --git a/test/intrinsics/gen/atan/331e6d.wgsl.expected.glsl b/test/builtins/gen/atan/331e6d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atan/331e6d.wgsl.expected.glsl
rename to test/builtins/gen/atan/331e6d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atan/331e6d.wgsl.expected.hlsl b/test/builtins/gen/atan/331e6d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atan/331e6d.wgsl.expected.hlsl
rename to test/builtins/gen/atan/331e6d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atan/331e6d.wgsl.expected.msl b/test/builtins/gen/atan/331e6d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atan/331e6d.wgsl.expected.msl
rename to test/builtins/gen/atan/331e6d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atan/331e6d.wgsl.expected.spvasm b/test/builtins/gen/atan/331e6d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atan/331e6d.wgsl.expected.spvasm
rename to test/builtins/gen/atan/331e6d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atan/331e6d.wgsl.expected.wgsl b/test/builtins/gen/atan/331e6d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atan/331e6d.wgsl.expected.wgsl
rename to test/builtins/gen/atan/331e6d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atan/a8b696.wgsl b/test/builtins/gen/atan/a8b696.wgsl
new file mode 100644
index 0000000..4d946e6
--- /dev/null
+++ b/test/builtins/gen/atan/a8b696.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn atan(vec<4, f32>) -> vec<4, f32>
+fn atan_a8b696() {
+  var res: vec4<f32> = atan(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_a8b696();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atan_a8b696();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atan_a8b696();
+}
diff --git a/test/intrinsics/gen/atan/a8b696.wgsl.expected.glsl b/test/builtins/gen/atan/a8b696.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atan/a8b696.wgsl.expected.glsl
rename to test/builtins/gen/atan/a8b696.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atan/a8b696.wgsl.expected.hlsl b/test/builtins/gen/atan/a8b696.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atan/a8b696.wgsl.expected.hlsl
rename to test/builtins/gen/atan/a8b696.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atan/a8b696.wgsl.expected.msl b/test/builtins/gen/atan/a8b696.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atan/a8b696.wgsl.expected.msl
rename to test/builtins/gen/atan/a8b696.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atan/a8b696.wgsl.expected.spvasm b/test/builtins/gen/atan/a8b696.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atan/a8b696.wgsl.expected.spvasm
rename to test/builtins/gen/atan/a8b696.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atan/a8b696.wgsl.expected.wgsl b/test/builtins/gen/atan/a8b696.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atan/a8b696.wgsl.expected.wgsl
rename to test/builtins/gen/atan/a8b696.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atan/ad96e4.wgsl b/test/builtins/gen/atan/ad96e4.wgsl
new file mode 100644
index 0000000..f0d71ed
--- /dev/null
+++ b/test/builtins/gen/atan/ad96e4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn atan(vec<2, f32>) -> vec<2, f32>
+fn atan_ad96e4() {
+  var res: vec2<f32> = atan(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_ad96e4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atan_ad96e4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atan_ad96e4();
+}
diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.glsl b/test/builtins/gen/atan/ad96e4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atan/ad96e4.wgsl.expected.glsl
rename to test/builtins/gen/atan/ad96e4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.hlsl b/test/builtins/gen/atan/ad96e4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atan/ad96e4.wgsl.expected.hlsl
rename to test/builtins/gen/atan/ad96e4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.msl b/test/builtins/gen/atan/ad96e4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atan/ad96e4.wgsl.expected.msl
rename to test/builtins/gen/atan/ad96e4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.spvasm b/test/builtins/gen/atan/ad96e4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atan/ad96e4.wgsl.expected.spvasm
rename to test/builtins/gen/atan/ad96e4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.wgsl b/test/builtins/gen/atan/ad96e4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atan/ad96e4.wgsl.expected.wgsl
rename to test/builtins/gen/atan/ad96e4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atan2/57fb13.wgsl b/test/builtins/gen/atan2/57fb13.wgsl
new file mode 100644
index 0000000..0362c9d
--- /dev/null
+++ b/test/builtins/gen/atan2/57fb13.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn atan2(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn atan2_57fb13() {
+  var res: vec2<f32> = atan2(vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_57fb13();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atan2_57fb13();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atan2_57fb13();
+}
diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.glsl b/test/builtins/gen/atan2/57fb13.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atan2/57fb13.wgsl.expected.glsl
rename to test/builtins/gen/atan2/57fb13.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.hlsl b/test/builtins/gen/atan2/57fb13.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atan2/57fb13.wgsl.expected.hlsl
rename to test/builtins/gen/atan2/57fb13.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.msl b/test/builtins/gen/atan2/57fb13.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atan2/57fb13.wgsl.expected.msl
rename to test/builtins/gen/atan2/57fb13.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.spvasm b/test/builtins/gen/atan2/57fb13.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atan2/57fb13.wgsl.expected.spvasm
rename to test/builtins/gen/atan2/57fb13.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.wgsl b/test/builtins/gen/atan2/57fb13.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atan2/57fb13.wgsl.expected.wgsl
rename to test/builtins/gen/atan2/57fb13.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atan2/96057c.wgsl b/test/builtins/gen/atan2/96057c.wgsl
new file mode 100644
index 0000000..a3bad62
--- /dev/null
+++ b/test/builtins/gen/atan2/96057c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn atan2(f32, f32) -> f32
+fn atan2_96057c() {
+  var res: f32 = atan2(1.0, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_96057c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atan2_96057c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atan2_96057c();
+}
diff --git a/test/intrinsics/gen/atan2/96057c.wgsl.expected.glsl b/test/builtins/gen/atan2/96057c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atan2/96057c.wgsl.expected.glsl
rename to test/builtins/gen/atan2/96057c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atan2/96057c.wgsl.expected.hlsl b/test/builtins/gen/atan2/96057c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atan2/96057c.wgsl.expected.hlsl
rename to test/builtins/gen/atan2/96057c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atan2/96057c.wgsl.expected.msl b/test/builtins/gen/atan2/96057c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atan2/96057c.wgsl.expected.msl
rename to test/builtins/gen/atan2/96057c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atan2/96057c.wgsl.expected.spvasm b/test/builtins/gen/atan2/96057c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atan2/96057c.wgsl.expected.spvasm
rename to test/builtins/gen/atan2/96057c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atan2/96057c.wgsl.expected.wgsl b/test/builtins/gen/atan2/96057c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atan2/96057c.wgsl.expected.wgsl
rename to test/builtins/gen/atan2/96057c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atan2/a70d0d.wgsl b/test/builtins/gen/atan2/a70d0d.wgsl
new file mode 100644
index 0000000..fe3ec65
--- /dev/null
+++ b/test/builtins/gen/atan2/a70d0d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn atan2(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn atan2_a70d0d() {
+  var res: vec3<f32> = atan2(vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_a70d0d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atan2_a70d0d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atan2_a70d0d();
+}
diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.glsl b/test/builtins/gen/atan2/a70d0d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atan2/a70d0d.wgsl.expected.glsl
rename to test/builtins/gen/atan2/a70d0d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.hlsl b/test/builtins/gen/atan2/a70d0d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atan2/a70d0d.wgsl.expected.hlsl
rename to test/builtins/gen/atan2/a70d0d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.msl b/test/builtins/gen/atan2/a70d0d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atan2/a70d0d.wgsl.expected.msl
rename to test/builtins/gen/atan2/a70d0d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.spvasm b/test/builtins/gen/atan2/a70d0d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atan2/a70d0d.wgsl.expected.spvasm
rename to test/builtins/gen/atan2/a70d0d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.wgsl b/test/builtins/gen/atan2/a70d0d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atan2/a70d0d.wgsl.expected.wgsl
rename to test/builtins/gen/atan2/a70d0d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atan2/ae713e.wgsl b/test/builtins/gen/atan2/ae713e.wgsl
new file mode 100644
index 0000000..50b8b8f
--- /dev/null
+++ b/test/builtins/gen/atan2/ae713e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn atan2(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn atan2_ae713e() {
+  var res: vec4<f32> = atan2(vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_ae713e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atan2_ae713e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atan2_ae713e();
+}
diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.glsl b/test/builtins/gen/atan2/ae713e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atan2/ae713e.wgsl.expected.glsl
rename to test/builtins/gen/atan2/ae713e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.hlsl b/test/builtins/gen/atan2/ae713e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atan2/ae713e.wgsl.expected.hlsl
rename to test/builtins/gen/atan2/ae713e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.msl b/test/builtins/gen/atan2/ae713e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atan2/ae713e.wgsl.expected.msl
rename to test/builtins/gen/atan2/ae713e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.spvasm b/test/builtins/gen/atan2/ae713e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atan2/ae713e.wgsl.expected.spvasm
rename to test/builtins/gen/atan2/ae713e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.wgsl b/test/builtins/gen/atan2/ae713e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atan2/ae713e.wgsl.expected.wgsl
rename to test/builtins/gen/atan2/ae713e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicAdd/794055.wgsl b/test/builtins/gen/atomicAdd/794055.wgsl
new file mode 100644
index 0000000..97cf17c
--- /dev/null
+++ b/test/builtins/gen/atomicAdd/794055.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicAdd(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
+fn atomicAdd_794055() {
+  var res: i32 = atomicAdd(&arg_0, 1);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicAdd_794055();
+}
diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.glsl b/test/builtins/gen/atomicAdd/794055.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/794055.wgsl.expected.glsl
rename to test/builtins/gen/atomicAdd/794055.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl b/test/builtins/gen/atomicAdd/794055.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl
rename to test/builtins/gen/atomicAdd/794055.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.msl b/test/builtins/gen/atomicAdd/794055.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/794055.wgsl.expected.msl
rename to test/builtins/gen/atomicAdd/794055.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.spvasm b/test/builtins/gen/atomicAdd/794055.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/794055.wgsl.expected.spvasm
rename to test/builtins/gen/atomicAdd/794055.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.wgsl b/test/builtins/gen/atomicAdd/794055.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/794055.wgsl.expected.wgsl
rename to test/builtins/gen/atomicAdd/794055.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicAdd/8a199a.wgsl b/test/builtins/gen/atomicAdd/8a199a.wgsl
new file mode 100644
index 0000000..55ef7cf
--- /dev/null
+++ b/test/builtins/gen/atomicAdd/8a199a.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicAdd(ptr<storage, atomic<u32>, read_write>, u32) -> u32
+fn atomicAdd_8a199a() {
+  var res: u32 = atomicAdd(&sb_rw.arg_0, 1u);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicAdd_8a199a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicAdd_8a199a();
+}
diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.glsl b/test/builtins/gen/atomicAdd/8a199a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.glsl
rename to test/builtins/gen/atomicAdd/8a199a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.hlsl b/test/builtins/gen/atomicAdd/8a199a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.hlsl
rename to test/builtins/gen/atomicAdd/8a199a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.msl b/test/builtins/gen/atomicAdd/8a199a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.msl
rename to test/builtins/gen/atomicAdd/8a199a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.spvasm b/test/builtins/gen/atomicAdd/8a199a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.spvasm
rename to test/builtins/gen/atomicAdd/8a199a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.wgsl b/test/builtins/gen/atomicAdd/8a199a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.wgsl
rename to test/builtins/gen/atomicAdd/8a199a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicAdd/d32fe4.wgsl b/test/builtins/gen/atomicAdd/d32fe4.wgsl
new file mode 100644
index 0000000..167c225
--- /dev/null
+++ b/test/builtins/gen/atomicAdd/d32fe4.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicAdd(ptr<storage, atomic<i32>, read_write>, i32) -> i32
+fn atomicAdd_d32fe4() {
+  var res: i32 = atomicAdd(&sb_rw.arg_0, 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicAdd_d32fe4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicAdd_d32fe4();
+}
diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.glsl b/test/builtins/gen/atomicAdd/d32fe4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.glsl
rename to test/builtins/gen/atomicAdd/d32fe4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.hlsl b/test/builtins/gen/atomicAdd/d32fe4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.hlsl
rename to test/builtins/gen/atomicAdd/d32fe4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.msl b/test/builtins/gen/atomicAdd/d32fe4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.msl
rename to test/builtins/gen/atomicAdd/d32fe4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.spvasm b/test/builtins/gen/atomicAdd/d32fe4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.spvasm
rename to test/builtins/gen/atomicAdd/d32fe4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.wgsl b/test/builtins/gen/atomicAdd/d32fe4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.wgsl
rename to test/builtins/gen/atomicAdd/d32fe4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicAdd/d5db1d.wgsl b/test/builtins/gen/atomicAdd/d5db1d.wgsl
new file mode 100644
index 0000000..aa00e56
--- /dev/null
+++ b/test/builtins/gen/atomicAdd/d5db1d.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicAdd(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
+fn atomicAdd_d5db1d() {
+  var res: u32 = atomicAdd(&arg_0, 1u);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicAdd_d5db1d();
+}
diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.glsl b/test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.glsl
rename to test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl b/test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl
rename to test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.msl b/test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.msl
rename to test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.spvasm b/test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.spvasm
rename to test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.wgsl b/test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.wgsl
rename to test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicAnd/152966.wgsl b/test/builtins/gen/atomicAnd/152966.wgsl
new file mode 100644
index 0000000..5e9a323
--- /dev/null
+++ b/test/builtins/gen/atomicAnd/152966.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicAnd(ptr<storage, atomic<i32>, read_write>, i32) -> i32
+fn atomicAnd_152966() {
+  var res: i32 = atomicAnd(&sb_rw.arg_0, 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicAnd_152966();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicAnd_152966();
+}
diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.glsl b/test/builtins/gen/atomicAnd/152966.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/152966.wgsl.expected.glsl
rename to test/builtins/gen/atomicAnd/152966.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.hlsl b/test/builtins/gen/atomicAnd/152966.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/152966.wgsl.expected.hlsl
rename to test/builtins/gen/atomicAnd/152966.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.msl b/test/builtins/gen/atomicAnd/152966.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/152966.wgsl.expected.msl
rename to test/builtins/gen/atomicAnd/152966.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.spvasm b/test/builtins/gen/atomicAnd/152966.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/152966.wgsl.expected.spvasm
rename to test/builtins/gen/atomicAnd/152966.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.wgsl b/test/builtins/gen/atomicAnd/152966.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/152966.wgsl.expected.wgsl
rename to test/builtins/gen/atomicAnd/152966.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicAnd/34edd3.wgsl b/test/builtins/gen/atomicAnd/34edd3.wgsl
new file mode 100644
index 0000000..a77f6bf
--- /dev/null
+++ b/test/builtins/gen/atomicAnd/34edd3.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicAnd(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
+fn atomicAnd_34edd3() {
+  var res: u32 = atomicAnd(&arg_0, 1u);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicAnd_34edd3();
+}
diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.glsl b/test/builtins/gen/atomicAnd/34edd3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.glsl
rename to test/builtins/gen/atomicAnd/34edd3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl b/test/builtins/gen/atomicAnd/34edd3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl
rename to test/builtins/gen/atomicAnd/34edd3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.msl b/test/builtins/gen/atomicAnd/34edd3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.msl
rename to test/builtins/gen/atomicAnd/34edd3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.spvasm b/test/builtins/gen/atomicAnd/34edd3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.spvasm
rename to test/builtins/gen/atomicAnd/34edd3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.wgsl b/test/builtins/gen/atomicAnd/34edd3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.wgsl
rename to test/builtins/gen/atomicAnd/34edd3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicAnd/45a819.wgsl b/test/builtins/gen/atomicAnd/45a819.wgsl
new file mode 100644
index 0000000..35979fe
--- /dev/null
+++ b/test/builtins/gen/atomicAnd/45a819.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicAnd(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
+fn atomicAnd_45a819() {
+  var res: i32 = atomicAnd(&arg_0, 1);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicAnd_45a819();
+}
diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.glsl b/test/builtins/gen/atomicAnd/45a819.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.glsl
rename to test/builtins/gen/atomicAnd/45a819.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl b/test/builtins/gen/atomicAnd/45a819.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl
rename to test/builtins/gen/atomicAnd/45a819.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.msl b/test/builtins/gen/atomicAnd/45a819.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.msl
rename to test/builtins/gen/atomicAnd/45a819.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.spvasm b/test/builtins/gen/atomicAnd/45a819.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.spvasm
rename to test/builtins/gen/atomicAnd/45a819.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.wgsl b/test/builtins/gen/atomicAnd/45a819.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.wgsl
rename to test/builtins/gen/atomicAnd/45a819.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicAnd/85a8d9.wgsl b/test/builtins/gen/atomicAnd/85a8d9.wgsl
new file mode 100644
index 0000000..bfdd088
--- /dev/null
+++ b/test/builtins/gen/atomicAnd/85a8d9.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicAnd(ptr<storage, atomic<u32>, read_write>, u32) -> u32
+fn atomicAnd_85a8d9() {
+  var res: u32 = atomicAnd(&sb_rw.arg_0, 1u);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicAnd_85a8d9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicAnd_85a8d9();
+}
diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.glsl b/test/builtins/gen/atomicAnd/85a8d9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.glsl
rename to test/builtins/gen/atomicAnd/85a8d9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.hlsl b/test/builtins/gen/atomicAnd/85a8d9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.hlsl
rename to test/builtins/gen/atomicAnd/85a8d9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.msl b/test/builtins/gen/atomicAnd/85a8d9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.msl
rename to test/builtins/gen/atomicAnd/85a8d9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.spvasm b/test/builtins/gen/atomicAnd/85a8d9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.spvasm
rename to test/builtins/gen/atomicAnd/85a8d9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.wgsl b/test/builtins/gen/atomicAnd/85a8d9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.wgsl
rename to test/builtins/gen/atomicAnd/85a8d9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl b/test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl
new file mode 100644
index 0000000..66ffc04
--- /dev/null
+++ b/test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicCompareExchangeWeak(ptr<storage, atomic<i32>, read_write>, i32, i32) -> vec2<i32>
+fn atomicCompareExchangeWeak_12871c() {
+  var res: vec2<i32> = atomicCompareExchangeWeak(&sb_rw.arg_0, 1, 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicCompareExchangeWeak_12871c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicCompareExchangeWeak_12871c();
+}
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.glsl b/test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.glsl
rename to test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.hlsl b/test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.hlsl
rename to test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.msl b/test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.msl
rename to test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.spvasm b/test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.spvasm
rename to test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl b/test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl
rename to test/builtins/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl b/test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl
new file mode 100644
index 0000000..f9f15bb
--- /dev/null
+++ b/test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicCompareExchangeWeak(ptr<storage, atomic<u32>, read_write>, u32, u32) -> vec2<u32>
+fn atomicCompareExchangeWeak_6673da() {
+  var res: vec2<u32> = atomicCompareExchangeWeak(&sb_rw.arg_0, 1u, 1u);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicCompareExchangeWeak_6673da();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicCompareExchangeWeak_6673da();
+}
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.glsl b/test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.glsl
rename to test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.hlsl b/test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.hlsl
rename to test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.msl b/test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.msl
rename to test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.spvasm b/test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.spvasm
rename to test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl b/test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl
rename to test/builtins/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl b/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl
new file mode 100644
index 0000000..2f2c251
--- /dev/null
+++ b/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicCompareExchangeWeak(ptr<workgroup, atomic<i32>, read_write>, i32, i32) -> vec2<i32>
+fn atomicCompareExchangeWeak_89ea3b() {
+  var res: vec2<i32> = atomicCompareExchangeWeak(&arg_0, 1, 1);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicCompareExchangeWeak_89ea3b();
+}
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.glsl b/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.glsl
rename to test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl b/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl
rename to test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl b/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl
rename to test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.spvasm b/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.spvasm
rename to test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl b/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl
rename to test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl b/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl
new file mode 100644
index 0000000..0df6c0f
--- /dev/null
+++ b/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicCompareExchangeWeak(ptr<workgroup, atomic<u32>, read_write>, u32, u32) -> vec2<u32>
+fn atomicCompareExchangeWeak_b2ab2c() {
+  var res: vec2<u32> = atomicCompareExchangeWeak(&arg_0, 1u, 1u);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicCompareExchangeWeak_b2ab2c();
+}
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.glsl b/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.glsl
rename to test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl b/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl
rename to test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl b/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl
rename to test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.spvasm b/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.spvasm
rename to test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl b/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl
rename to test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicExchange/0a5dca.wgsl b/test/builtins/gen/atomicExchange/0a5dca.wgsl
new file mode 100644
index 0000000..5fb5b65
--- /dev/null
+++ b/test/builtins/gen/atomicExchange/0a5dca.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicExchange(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
+fn atomicExchange_0a5dca() {
+  var res: u32 = atomicExchange(&arg_0, 1u);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicExchange_0a5dca();
+}
diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.glsl b/test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.glsl
rename to test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl b/test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl
rename to test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.msl b/test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.msl
rename to test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.spvasm b/test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.spvasm
rename to test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.wgsl b/test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.wgsl
rename to test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicExchange/d59712.wgsl b/test/builtins/gen/atomicExchange/d59712.wgsl
new file mode 100644
index 0000000..5109bb7
--- /dev/null
+++ b/test/builtins/gen/atomicExchange/d59712.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicExchange(ptr<storage, atomic<u32>, read_write>, u32) -> u32
+fn atomicExchange_d59712() {
+  var res: u32 = atomicExchange(&sb_rw.arg_0, 1u);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicExchange_d59712();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicExchange_d59712();
+}
diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.glsl b/test/builtins/gen/atomicExchange/d59712.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.glsl
rename to test/builtins/gen/atomicExchange/d59712.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.hlsl b/test/builtins/gen/atomicExchange/d59712.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.hlsl
rename to test/builtins/gen/atomicExchange/d59712.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.msl b/test/builtins/gen/atomicExchange/d59712.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.msl
rename to test/builtins/gen/atomicExchange/d59712.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.spvasm b/test/builtins/gen/atomicExchange/d59712.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.spvasm
rename to test/builtins/gen/atomicExchange/d59712.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.wgsl b/test/builtins/gen/atomicExchange/d59712.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.wgsl
rename to test/builtins/gen/atomicExchange/d59712.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicExchange/e114ba.wgsl b/test/builtins/gen/atomicExchange/e114ba.wgsl
new file mode 100644
index 0000000..bb22f27
--- /dev/null
+++ b/test/builtins/gen/atomicExchange/e114ba.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicExchange(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
+fn atomicExchange_e114ba() {
+  var res: i32 = atomicExchange(&arg_0, 1);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicExchange_e114ba();
+}
diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.glsl b/test/builtins/gen/atomicExchange/e114ba.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.glsl
rename to test/builtins/gen/atomicExchange/e114ba.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl b/test/builtins/gen/atomicExchange/e114ba.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl
rename to test/builtins/gen/atomicExchange/e114ba.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.msl b/test/builtins/gen/atomicExchange/e114ba.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.msl
rename to test/builtins/gen/atomicExchange/e114ba.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.spvasm b/test/builtins/gen/atomicExchange/e114ba.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.spvasm
rename to test/builtins/gen/atomicExchange/e114ba.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.wgsl b/test/builtins/gen/atomicExchange/e114ba.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.wgsl
rename to test/builtins/gen/atomicExchange/e114ba.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicExchange/f2e22f.wgsl b/test/builtins/gen/atomicExchange/f2e22f.wgsl
new file mode 100644
index 0000000..f9af168
--- /dev/null
+++ b/test/builtins/gen/atomicExchange/f2e22f.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicExchange(ptr<storage, atomic<i32>, read_write>, i32) -> i32
+fn atomicExchange_f2e22f() {
+  var res: i32 = atomicExchange(&sb_rw.arg_0, 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicExchange_f2e22f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicExchange_f2e22f();
+}
diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.glsl b/test/builtins/gen/atomicExchange/f2e22f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.glsl
rename to test/builtins/gen/atomicExchange/f2e22f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.hlsl b/test/builtins/gen/atomicExchange/f2e22f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.hlsl
rename to test/builtins/gen/atomicExchange/f2e22f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.msl b/test/builtins/gen/atomicExchange/f2e22f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.msl
rename to test/builtins/gen/atomicExchange/f2e22f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.spvasm b/test/builtins/gen/atomicExchange/f2e22f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.spvasm
rename to test/builtins/gen/atomicExchange/f2e22f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.wgsl b/test/builtins/gen/atomicExchange/f2e22f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.wgsl
rename to test/builtins/gen/atomicExchange/f2e22f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicLoad/0806ad.wgsl b/test/builtins/gen/atomicLoad/0806ad.wgsl
new file mode 100644
index 0000000..61fd4ec
--- /dev/null
+++ b/test/builtins/gen/atomicLoad/0806ad.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicLoad(ptr<storage, atomic<i32>, read_write>) -> i32
+fn atomicLoad_0806ad() {
+  var res: i32 = atomicLoad(&sb_rw.arg_0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicLoad_0806ad();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicLoad_0806ad();
+}
diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.glsl b/test/builtins/gen/atomicLoad/0806ad.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.glsl
rename to test/builtins/gen/atomicLoad/0806ad.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.hlsl b/test/builtins/gen/atomicLoad/0806ad.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.hlsl
rename to test/builtins/gen/atomicLoad/0806ad.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.msl b/test/builtins/gen/atomicLoad/0806ad.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.msl
rename to test/builtins/gen/atomicLoad/0806ad.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.spvasm b/test/builtins/gen/atomicLoad/0806ad.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.spvasm
rename to test/builtins/gen/atomicLoad/0806ad.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.wgsl b/test/builtins/gen/atomicLoad/0806ad.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.wgsl
rename to test/builtins/gen/atomicLoad/0806ad.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicLoad/361bf1.wgsl b/test/builtins/gen/atomicLoad/361bf1.wgsl
new file mode 100644
index 0000000..23841ab
--- /dev/null
+++ b/test/builtins/gen/atomicLoad/361bf1.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicLoad(ptr<workgroup, atomic<u32>, read_write>) -> u32
+fn atomicLoad_361bf1() {
+  var res: u32 = atomicLoad(&arg_0);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicLoad_361bf1();
+}
diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.glsl b/test/builtins/gen/atomicLoad/361bf1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.glsl
rename to test/builtins/gen/atomicLoad/361bf1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl b/test/builtins/gen/atomicLoad/361bf1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl
rename to test/builtins/gen/atomicLoad/361bf1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.msl b/test/builtins/gen/atomicLoad/361bf1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.msl
rename to test/builtins/gen/atomicLoad/361bf1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.spvasm b/test/builtins/gen/atomicLoad/361bf1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.spvasm
rename to test/builtins/gen/atomicLoad/361bf1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.wgsl b/test/builtins/gen/atomicLoad/361bf1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.wgsl
rename to test/builtins/gen/atomicLoad/361bf1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicLoad/afcc03.wgsl b/test/builtins/gen/atomicLoad/afcc03.wgsl
new file mode 100644
index 0000000..2f29bbc
--- /dev/null
+++ b/test/builtins/gen/atomicLoad/afcc03.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicLoad(ptr<workgroup, atomic<i32>, read_write>) -> i32
+fn atomicLoad_afcc03() {
+  var res: i32 = atomicLoad(&arg_0);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicLoad_afcc03();
+}
diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.glsl b/test/builtins/gen/atomicLoad/afcc03.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.glsl
rename to test/builtins/gen/atomicLoad/afcc03.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl b/test/builtins/gen/atomicLoad/afcc03.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl
rename to test/builtins/gen/atomicLoad/afcc03.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.msl b/test/builtins/gen/atomicLoad/afcc03.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.msl
rename to test/builtins/gen/atomicLoad/afcc03.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.spvasm b/test/builtins/gen/atomicLoad/afcc03.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.spvasm
rename to test/builtins/gen/atomicLoad/afcc03.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.wgsl b/test/builtins/gen/atomicLoad/afcc03.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.wgsl
rename to test/builtins/gen/atomicLoad/afcc03.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicLoad/fe6cc3.wgsl b/test/builtins/gen/atomicLoad/fe6cc3.wgsl
new file mode 100644
index 0000000..854e9fe
--- /dev/null
+++ b/test/builtins/gen/atomicLoad/fe6cc3.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicLoad(ptr<storage, atomic<u32>, read_write>) -> u32
+fn atomicLoad_fe6cc3() {
+  var res: u32 = atomicLoad(&sb_rw.arg_0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicLoad_fe6cc3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicLoad_fe6cc3();
+}
diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.glsl b/test/builtins/gen/atomicLoad/fe6cc3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.glsl
rename to test/builtins/gen/atomicLoad/fe6cc3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.hlsl b/test/builtins/gen/atomicLoad/fe6cc3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.hlsl
rename to test/builtins/gen/atomicLoad/fe6cc3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.msl b/test/builtins/gen/atomicLoad/fe6cc3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.msl
rename to test/builtins/gen/atomicLoad/fe6cc3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.spvasm b/test/builtins/gen/atomicLoad/fe6cc3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.spvasm
rename to test/builtins/gen/atomicLoad/fe6cc3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl b/test/builtins/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl
rename to test/builtins/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicMax/51b9be.wgsl b/test/builtins/gen/atomicMax/51b9be.wgsl
new file mode 100644
index 0000000..6303854
--- /dev/null
+++ b/test/builtins/gen/atomicMax/51b9be.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicMax(ptr<storage, atomic<u32>, read_write>, u32) -> u32
+fn atomicMax_51b9be() {
+  var res: u32 = atomicMax(&sb_rw.arg_0, 1u);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicMax_51b9be();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicMax_51b9be();
+}
diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.glsl b/test/builtins/gen/atomicMax/51b9be.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.glsl
rename to test/builtins/gen/atomicMax/51b9be.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.hlsl b/test/builtins/gen/atomicMax/51b9be.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.hlsl
rename to test/builtins/gen/atomicMax/51b9be.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.msl b/test/builtins/gen/atomicMax/51b9be.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.msl
rename to test/builtins/gen/atomicMax/51b9be.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.spvasm b/test/builtins/gen/atomicMax/51b9be.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.spvasm
rename to test/builtins/gen/atomicMax/51b9be.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.wgsl b/test/builtins/gen/atomicMax/51b9be.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.wgsl
rename to test/builtins/gen/atomicMax/51b9be.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicMax/92aa72.wgsl b/test/builtins/gen/atomicMax/92aa72.wgsl
new file mode 100644
index 0000000..4924d84
--- /dev/null
+++ b/test/builtins/gen/atomicMax/92aa72.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicMax(ptr<storage, atomic<i32>, read_write>, i32) -> i32
+fn atomicMax_92aa72() {
+  var res: i32 = atomicMax(&sb_rw.arg_0, 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicMax_92aa72();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicMax_92aa72();
+}
diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.glsl b/test/builtins/gen/atomicMax/92aa72.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.glsl
rename to test/builtins/gen/atomicMax/92aa72.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.hlsl b/test/builtins/gen/atomicMax/92aa72.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.hlsl
rename to test/builtins/gen/atomicMax/92aa72.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.msl b/test/builtins/gen/atomicMax/92aa72.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.msl
rename to test/builtins/gen/atomicMax/92aa72.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.spvasm b/test/builtins/gen/atomicMax/92aa72.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.spvasm
rename to test/builtins/gen/atomicMax/92aa72.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.wgsl b/test/builtins/gen/atomicMax/92aa72.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.wgsl
rename to test/builtins/gen/atomicMax/92aa72.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicMax/a89cc3.wgsl b/test/builtins/gen/atomicMax/a89cc3.wgsl
new file mode 100644
index 0000000..904cea8
--- /dev/null
+++ b/test/builtins/gen/atomicMax/a89cc3.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicMax(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
+fn atomicMax_a89cc3() {
+  var res: i32 = atomicMax(&arg_0, 1);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicMax_a89cc3();
+}
diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.glsl b/test/builtins/gen/atomicMax/a89cc3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.glsl
rename to test/builtins/gen/atomicMax/a89cc3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl b/test/builtins/gen/atomicMax/a89cc3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl
rename to test/builtins/gen/atomicMax/a89cc3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.msl b/test/builtins/gen/atomicMax/a89cc3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.msl
rename to test/builtins/gen/atomicMax/a89cc3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.spvasm b/test/builtins/gen/atomicMax/a89cc3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.spvasm
rename to test/builtins/gen/atomicMax/a89cc3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.wgsl b/test/builtins/gen/atomicMax/a89cc3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.wgsl
rename to test/builtins/gen/atomicMax/a89cc3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicMax/beccfc.wgsl b/test/builtins/gen/atomicMax/beccfc.wgsl
new file mode 100644
index 0000000..b26574d
--- /dev/null
+++ b/test/builtins/gen/atomicMax/beccfc.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicMax(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
+fn atomicMax_beccfc() {
+  var res: u32 = atomicMax(&arg_0, 1u);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicMax_beccfc();
+}
diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.glsl b/test/builtins/gen/atomicMax/beccfc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.glsl
rename to test/builtins/gen/atomicMax/beccfc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl b/test/builtins/gen/atomicMax/beccfc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl
rename to test/builtins/gen/atomicMax/beccfc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.msl b/test/builtins/gen/atomicMax/beccfc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.msl
rename to test/builtins/gen/atomicMax/beccfc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.spvasm b/test/builtins/gen/atomicMax/beccfc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.spvasm
rename to test/builtins/gen/atomicMax/beccfc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.wgsl b/test/builtins/gen/atomicMax/beccfc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.wgsl
rename to test/builtins/gen/atomicMax/beccfc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicMin/278235.wgsl b/test/builtins/gen/atomicMin/278235.wgsl
new file mode 100644
index 0000000..591d091
--- /dev/null
+++ b/test/builtins/gen/atomicMin/278235.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicMin(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
+fn atomicMin_278235() {
+  var res: i32 = atomicMin(&arg_0, 1);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicMin_278235();
+}
diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.glsl b/test/builtins/gen/atomicMin/278235.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/278235.wgsl.expected.glsl
rename to test/builtins/gen/atomicMin/278235.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl b/test/builtins/gen/atomicMin/278235.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl
rename to test/builtins/gen/atomicMin/278235.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.msl b/test/builtins/gen/atomicMin/278235.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/278235.wgsl.expected.msl
rename to test/builtins/gen/atomicMin/278235.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.spvasm b/test/builtins/gen/atomicMin/278235.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicMin/278235.wgsl.expected.spvasm
rename to test/builtins/gen/atomicMin/278235.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.wgsl b/test/builtins/gen/atomicMin/278235.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/278235.wgsl.expected.wgsl
rename to test/builtins/gen/atomicMin/278235.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicMin/69d383.wgsl b/test/builtins/gen/atomicMin/69d383.wgsl
new file mode 100644
index 0000000..9b435d4
--- /dev/null
+++ b/test/builtins/gen/atomicMin/69d383.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicMin(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
+fn atomicMin_69d383() {
+  var res: u32 = atomicMin(&arg_0, 1u);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicMin_69d383();
+}
diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.glsl b/test/builtins/gen/atomicMin/69d383.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/69d383.wgsl.expected.glsl
rename to test/builtins/gen/atomicMin/69d383.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl b/test/builtins/gen/atomicMin/69d383.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl
rename to test/builtins/gen/atomicMin/69d383.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.msl b/test/builtins/gen/atomicMin/69d383.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/69d383.wgsl.expected.msl
rename to test/builtins/gen/atomicMin/69d383.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.spvasm b/test/builtins/gen/atomicMin/69d383.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicMin/69d383.wgsl.expected.spvasm
rename to test/builtins/gen/atomicMin/69d383.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.wgsl b/test/builtins/gen/atomicMin/69d383.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/69d383.wgsl.expected.wgsl
rename to test/builtins/gen/atomicMin/69d383.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicMin/8e38dc.wgsl b/test/builtins/gen/atomicMin/8e38dc.wgsl
new file mode 100644
index 0000000..fdde4a5
--- /dev/null
+++ b/test/builtins/gen/atomicMin/8e38dc.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicMin(ptr<storage, atomic<i32>, read_write>, i32) -> i32
+fn atomicMin_8e38dc() {
+  var res: i32 = atomicMin(&sb_rw.arg_0, 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicMin_8e38dc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicMin_8e38dc();
+}
diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.glsl b/test/builtins/gen/atomicMin/8e38dc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.glsl
rename to test/builtins/gen/atomicMin/8e38dc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.hlsl b/test/builtins/gen/atomicMin/8e38dc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.hlsl
rename to test/builtins/gen/atomicMin/8e38dc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.msl b/test/builtins/gen/atomicMin/8e38dc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.msl
rename to test/builtins/gen/atomicMin/8e38dc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.spvasm b/test/builtins/gen/atomicMin/8e38dc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.spvasm
rename to test/builtins/gen/atomicMin/8e38dc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.wgsl b/test/builtins/gen/atomicMin/8e38dc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.wgsl
rename to test/builtins/gen/atomicMin/8e38dc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicMin/c67a74.wgsl b/test/builtins/gen/atomicMin/c67a74.wgsl
new file mode 100644
index 0000000..f55c394
--- /dev/null
+++ b/test/builtins/gen/atomicMin/c67a74.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicMin(ptr<storage, atomic<u32>, read_write>, u32) -> u32
+fn atomicMin_c67a74() {
+  var res: u32 = atomicMin(&sb_rw.arg_0, 1u);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicMin_c67a74();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicMin_c67a74();
+}
diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.glsl b/test/builtins/gen/atomicMin/c67a74.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.glsl
rename to test/builtins/gen/atomicMin/c67a74.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.hlsl b/test/builtins/gen/atomicMin/c67a74.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.hlsl
rename to test/builtins/gen/atomicMin/c67a74.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.msl b/test/builtins/gen/atomicMin/c67a74.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.msl
rename to test/builtins/gen/atomicMin/c67a74.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.spvasm b/test/builtins/gen/atomicMin/c67a74.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.spvasm
rename to test/builtins/gen/atomicMin/c67a74.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.wgsl b/test/builtins/gen/atomicMin/c67a74.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.wgsl
rename to test/builtins/gen/atomicMin/c67a74.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicOr/5e3d61.wgsl b/test/builtins/gen/atomicOr/5e3d61.wgsl
new file mode 100644
index 0000000..d6a8468
--- /dev/null
+++ b/test/builtins/gen/atomicOr/5e3d61.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicOr(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
+fn atomicOr_5e3d61() {
+  var res: u32 = atomicOr(&arg_0, 1u);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicOr_5e3d61();
+}
diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.glsl b/test/builtins/gen/atomicOr/5e3d61.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.glsl
rename to test/builtins/gen/atomicOr/5e3d61.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl b/test/builtins/gen/atomicOr/5e3d61.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl
rename to test/builtins/gen/atomicOr/5e3d61.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.msl b/test/builtins/gen/atomicOr/5e3d61.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.msl
rename to test/builtins/gen/atomicOr/5e3d61.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.spvasm b/test/builtins/gen/atomicOr/5e3d61.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.spvasm
rename to test/builtins/gen/atomicOr/5e3d61.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.wgsl b/test/builtins/gen/atomicOr/5e3d61.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.wgsl
rename to test/builtins/gen/atomicOr/5e3d61.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicOr/5e95d4.wgsl b/test/builtins/gen/atomicOr/5e95d4.wgsl
new file mode 100644
index 0000000..b66fd0c
--- /dev/null
+++ b/test/builtins/gen/atomicOr/5e95d4.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicOr(ptr<storage, atomic<u32>, read_write>, u32) -> u32
+fn atomicOr_5e95d4() {
+  var res: u32 = atomicOr(&sb_rw.arg_0, 1u);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicOr_5e95d4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicOr_5e95d4();
+}
diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.glsl b/test/builtins/gen/atomicOr/5e95d4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.glsl
rename to test/builtins/gen/atomicOr/5e95d4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.hlsl b/test/builtins/gen/atomicOr/5e95d4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.hlsl
rename to test/builtins/gen/atomicOr/5e95d4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.msl b/test/builtins/gen/atomicOr/5e95d4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.msl
rename to test/builtins/gen/atomicOr/5e95d4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.spvasm b/test/builtins/gen/atomicOr/5e95d4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.spvasm
rename to test/builtins/gen/atomicOr/5e95d4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.wgsl b/test/builtins/gen/atomicOr/5e95d4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.wgsl
rename to test/builtins/gen/atomicOr/5e95d4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicOr/8d96a0.wgsl b/test/builtins/gen/atomicOr/8d96a0.wgsl
new file mode 100644
index 0000000..2f95738
--- /dev/null
+++ b/test/builtins/gen/atomicOr/8d96a0.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicOr(ptr<storage, atomic<i32>, read_write>, i32) -> i32
+fn atomicOr_8d96a0() {
+  var res: i32 = atomicOr(&sb_rw.arg_0, 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicOr_8d96a0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicOr_8d96a0();
+}
diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.glsl b/test/builtins/gen/atomicOr/8d96a0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.glsl
rename to test/builtins/gen/atomicOr/8d96a0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.hlsl b/test/builtins/gen/atomicOr/8d96a0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.hlsl
rename to test/builtins/gen/atomicOr/8d96a0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.msl b/test/builtins/gen/atomicOr/8d96a0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.msl
rename to test/builtins/gen/atomicOr/8d96a0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.spvasm b/test/builtins/gen/atomicOr/8d96a0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.spvasm
rename to test/builtins/gen/atomicOr/8d96a0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.wgsl b/test/builtins/gen/atomicOr/8d96a0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.wgsl
rename to test/builtins/gen/atomicOr/8d96a0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicOr/d09248.wgsl b/test/builtins/gen/atomicOr/d09248.wgsl
new file mode 100644
index 0000000..7ffd645
--- /dev/null
+++ b/test/builtins/gen/atomicOr/d09248.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicOr(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
+fn atomicOr_d09248() {
+  var res: i32 = atomicOr(&arg_0, 1);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicOr_d09248();
+}
diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.glsl b/test/builtins/gen/atomicOr/d09248.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/d09248.wgsl.expected.glsl
rename to test/builtins/gen/atomicOr/d09248.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl b/test/builtins/gen/atomicOr/d09248.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl
rename to test/builtins/gen/atomicOr/d09248.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.msl b/test/builtins/gen/atomicOr/d09248.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/d09248.wgsl.expected.msl
rename to test/builtins/gen/atomicOr/d09248.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.spvasm b/test/builtins/gen/atomicOr/d09248.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicOr/d09248.wgsl.expected.spvasm
rename to test/builtins/gen/atomicOr/d09248.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.wgsl b/test/builtins/gen/atomicOr/d09248.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicOr/d09248.wgsl.expected.wgsl
rename to test/builtins/gen/atomicOr/d09248.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicStore/726882.wgsl b/test/builtins/gen/atomicStore/726882.wgsl
new file mode 100644
index 0000000..3287e49
--- /dev/null
+++ b/test/builtins/gen/atomicStore/726882.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicStore(ptr<workgroup, atomic<u32>, read_write>, u32)
+fn atomicStore_726882() {
+  atomicStore(&arg_0, 1u);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicStore_726882();
+}
diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.glsl b/test/builtins/gen/atomicStore/726882.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/726882.wgsl.expected.glsl
rename to test/builtins/gen/atomicStore/726882.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl b/test/builtins/gen/atomicStore/726882.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl
rename to test/builtins/gen/atomicStore/726882.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.msl b/test/builtins/gen/atomicStore/726882.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/726882.wgsl.expected.msl
rename to test/builtins/gen/atomicStore/726882.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.spvasm b/test/builtins/gen/atomicStore/726882.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicStore/726882.wgsl.expected.spvasm
rename to test/builtins/gen/atomicStore/726882.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.wgsl b/test/builtins/gen/atomicStore/726882.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/726882.wgsl.expected.wgsl
rename to test/builtins/gen/atomicStore/726882.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicStore/8bea94.wgsl b/test/builtins/gen/atomicStore/8bea94.wgsl
new file mode 100644
index 0000000..bf474e7
--- /dev/null
+++ b/test/builtins/gen/atomicStore/8bea94.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicStore(ptr<workgroup, atomic<i32>, read_write>, i32)
+fn atomicStore_8bea94() {
+  atomicStore(&arg_0, 1);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicStore_8bea94();
+}
diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.glsl b/test/builtins/gen/atomicStore/8bea94.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.glsl
rename to test/builtins/gen/atomicStore/8bea94.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl b/test/builtins/gen/atomicStore/8bea94.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl
rename to test/builtins/gen/atomicStore/8bea94.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.msl b/test/builtins/gen/atomicStore/8bea94.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.msl
rename to test/builtins/gen/atomicStore/8bea94.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.spvasm b/test/builtins/gen/atomicStore/8bea94.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.spvasm
rename to test/builtins/gen/atomicStore/8bea94.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.wgsl b/test/builtins/gen/atomicStore/8bea94.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.wgsl
rename to test/builtins/gen/atomicStore/8bea94.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicStore/cdc29e.wgsl b/test/builtins/gen/atomicStore/cdc29e.wgsl
new file mode 100644
index 0000000..362f702
--- /dev/null
+++ b/test/builtins/gen/atomicStore/cdc29e.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicStore(ptr<storage, atomic<u32>, read_write>, u32)
+fn atomicStore_cdc29e() {
+  atomicStore(&sb_rw.arg_0, 1u);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicStore_cdc29e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicStore_cdc29e();
+}
diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.glsl b/test/builtins/gen/atomicStore/cdc29e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.glsl
rename to test/builtins/gen/atomicStore/cdc29e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.hlsl b/test/builtins/gen/atomicStore/cdc29e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.hlsl
rename to test/builtins/gen/atomicStore/cdc29e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.msl b/test/builtins/gen/atomicStore/cdc29e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.msl
rename to test/builtins/gen/atomicStore/cdc29e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.spvasm b/test/builtins/gen/atomicStore/cdc29e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.spvasm
rename to test/builtins/gen/atomicStore/cdc29e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.wgsl b/test/builtins/gen/atomicStore/cdc29e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.wgsl
rename to test/builtins/gen/atomicStore/cdc29e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicStore/d1e9a6.wgsl b/test/builtins/gen/atomicStore/d1e9a6.wgsl
new file mode 100644
index 0000000..0de53f5
--- /dev/null
+++ b/test/builtins/gen/atomicStore/d1e9a6.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicStore(ptr<storage, atomic<i32>, read_write>, i32)
+fn atomicStore_d1e9a6() {
+  atomicStore(&sb_rw.arg_0, 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicStore_d1e9a6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicStore_d1e9a6();
+}
diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.glsl b/test/builtins/gen/atomicStore/d1e9a6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.glsl
rename to test/builtins/gen/atomicStore/d1e9a6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.hlsl b/test/builtins/gen/atomicStore/d1e9a6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.hlsl
rename to test/builtins/gen/atomicStore/d1e9a6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.msl b/test/builtins/gen/atomicStore/d1e9a6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.msl
rename to test/builtins/gen/atomicStore/d1e9a6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.spvasm b/test/builtins/gen/atomicStore/d1e9a6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.spvasm
rename to test/builtins/gen/atomicStore/d1e9a6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.wgsl b/test/builtins/gen/atomicStore/d1e9a6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.wgsl
rename to test/builtins/gen/atomicStore/d1e9a6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicSub/051100.wgsl b/test/builtins/gen/atomicSub/051100.wgsl
new file mode 100644
index 0000000..818b85f
--- /dev/null
+++ b/test/builtins/gen/atomicSub/051100.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicSub(ptr<storage, atomic<i32>, read_write>, i32) -> i32
+fn atomicSub_051100() {
+  var res: i32 = atomicSub(&sb_rw.arg_0, 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicSub_051100();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicSub_051100();
+}
diff --git a/test/intrinsics/gen/atomicSub/051100.wgsl.expected.glsl b/test/builtins/gen/atomicSub/051100.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/051100.wgsl.expected.glsl
rename to test/builtins/gen/atomicSub/051100.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicSub/051100.wgsl.expected.hlsl b/test/builtins/gen/atomicSub/051100.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/051100.wgsl.expected.hlsl
rename to test/builtins/gen/atomicSub/051100.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicSub/051100.wgsl.expected.msl b/test/builtins/gen/atomicSub/051100.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/051100.wgsl.expected.msl
rename to test/builtins/gen/atomicSub/051100.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicSub/051100.wgsl.expected.spvasm b/test/builtins/gen/atomicSub/051100.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicSub/051100.wgsl.expected.spvasm
rename to test/builtins/gen/atomicSub/051100.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicSub/051100.wgsl.expected.wgsl b/test/builtins/gen/atomicSub/051100.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/051100.wgsl.expected.wgsl
rename to test/builtins/gen/atomicSub/051100.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicSub/0d26c2.wgsl b/test/builtins/gen/atomicSub/0d26c2.wgsl
new file mode 100644
index 0000000..43478d7
--- /dev/null
+++ b/test/builtins/gen/atomicSub/0d26c2.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicSub(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
+fn atomicSub_0d26c2() {
+  var res: u32 = atomicSub(&arg_0, 1u);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicSub_0d26c2();
+}
diff --git a/test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.glsl b/test/builtins/gen/atomicSub/0d26c2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.glsl
rename to test/builtins/gen/atomicSub/0d26c2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.hlsl b/test/builtins/gen/atomicSub/0d26c2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.hlsl
rename to test/builtins/gen/atomicSub/0d26c2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.msl b/test/builtins/gen/atomicSub/0d26c2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.msl
rename to test/builtins/gen/atomicSub/0d26c2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.spvasm b/test/builtins/gen/atomicSub/0d26c2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.spvasm
rename to test/builtins/gen/atomicSub/0d26c2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.wgsl b/test/builtins/gen/atomicSub/0d26c2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.wgsl
rename to test/builtins/gen/atomicSub/0d26c2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicSub/15bfc9.wgsl b/test/builtins/gen/atomicSub/15bfc9.wgsl
new file mode 100644
index 0000000..8609e9f
--- /dev/null
+++ b/test/builtins/gen/atomicSub/15bfc9.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicSub(ptr<storage, atomic<u32>, read_write>, u32) -> u32
+fn atomicSub_15bfc9() {
+  var res: u32 = atomicSub(&sb_rw.arg_0, 1u);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicSub_15bfc9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicSub_15bfc9();
+}
diff --git a/test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.glsl b/test/builtins/gen/atomicSub/15bfc9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.glsl
rename to test/builtins/gen/atomicSub/15bfc9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.hlsl b/test/builtins/gen/atomicSub/15bfc9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.hlsl
rename to test/builtins/gen/atomicSub/15bfc9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.msl b/test/builtins/gen/atomicSub/15bfc9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.msl
rename to test/builtins/gen/atomicSub/15bfc9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.spvasm b/test/builtins/gen/atomicSub/15bfc9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.spvasm
rename to test/builtins/gen/atomicSub/15bfc9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.wgsl b/test/builtins/gen/atomicSub/15bfc9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.wgsl
rename to test/builtins/gen/atomicSub/15bfc9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicSub/77883a.wgsl b/test/builtins/gen/atomicSub/77883a.wgsl
new file mode 100644
index 0000000..3ab3abd
--- /dev/null
+++ b/test/builtins/gen/atomicSub/77883a.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicSub(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
+fn atomicSub_77883a() {
+  var res: i32 = atomicSub(&arg_0, 1);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicSub_77883a();
+}
diff --git a/test/intrinsics/gen/atomicSub/77883a.wgsl.expected.glsl b/test/builtins/gen/atomicSub/77883a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/77883a.wgsl.expected.glsl
rename to test/builtins/gen/atomicSub/77883a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicSub/77883a.wgsl.expected.hlsl b/test/builtins/gen/atomicSub/77883a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/77883a.wgsl.expected.hlsl
rename to test/builtins/gen/atomicSub/77883a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicSub/77883a.wgsl.expected.msl b/test/builtins/gen/atomicSub/77883a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/77883a.wgsl.expected.msl
rename to test/builtins/gen/atomicSub/77883a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicSub/77883a.wgsl.expected.spvasm b/test/builtins/gen/atomicSub/77883a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicSub/77883a.wgsl.expected.spvasm
rename to test/builtins/gen/atomicSub/77883a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicSub/77883a.wgsl.expected.wgsl b/test/builtins/gen/atomicSub/77883a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicSub/77883a.wgsl.expected.wgsl
rename to test/builtins/gen/atomicSub/77883a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicXor/54510e.wgsl b/test/builtins/gen/atomicXor/54510e.wgsl
new file mode 100644
index 0000000..755c218
--- /dev/null
+++ b/test/builtins/gen/atomicXor/54510e.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<u32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicXor(ptr<storage, atomic<u32>, read_write>, u32) -> u32
+fn atomicXor_54510e() {
+  var res: u32 = atomicXor(&sb_rw.arg_0, 1u);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicXor_54510e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicXor_54510e();
+}
diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.glsl b/test/builtins/gen/atomicXor/54510e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/54510e.wgsl.expected.glsl
rename to test/builtins/gen/atomicXor/54510e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.hlsl b/test/builtins/gen/atomicXor/54510e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/54510e.wgsl.expected.hlsl
rename to test/builtins/gen/atomicXor/54510e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.msl b/test/builtins/gen/atomicXor/54510e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/54510e.wgsl.expected.msl
rename to test/builtins/gen/atomicXor/54510e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.spvasm b/test/builtins/gen/atomicXor/54510e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicXor/54510e.wgsl.expected.spvasm
rename to test/builtins/gen/atomicXor/54510e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.wgsl b/test/builtins/gen/atomicXor/54510e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/54510e.wgsl.expected.wgsl
rename to test/builtins/gen/atomicXor/54510e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicXor/75dc95.wgsl b/test/builtins/gen/atomicXor/75dc95.wgsl
new file mode 100644
index 0000000..951d732
--- /dev/null
+++ b/test/builtins/gen/atomicXor/75dc95.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<i32>;
+
+// fn atomicXor(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
+fn atomicXor_75dc95() {
+  var res: i32 = atomicXor(&arg_0, 1);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicXor_75dc95();
+}
diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.glsl b/test/builtins/gen/atomicXor/75dc95.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.glsl
rename to test/builtins/gen/atomicXor/75dc95.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl b/test/builtins/gen/atomicXor/75dc95.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl
rename to test/builtins/gen/atomicXor/75dc95.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.msl b/test/builtins/gen/atomicXor/75dc95.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.msl
rename to test/builtins/gen/atomicXor/75dc95.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.spvasm b/test/builtins/gen/atomicXor/75dc95.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.spvasm
rename to test/builtins/gen/atomicXor/75dc95.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.wgsl b/test/builtins/gen/atomicXor/75dc95.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.wgsl
rename to test/builtins/gen/atomicXor/75dc95.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicXor/c1b78c.wgsl b/test/builtins/gen/atomicXor/c1b78c.wgsl
new file mode 100644
index 0000000..54c82df
--- /dev/null
+++ b/test/builtins/gen/atomicXor/c1b78c.wgsl
@@ -0,0 +1,43 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+struct SB_RW {
+  arg_0: atomic<i32>;
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn atomicXor(ptr<storage, atomic<i32>, read_write>, i32) -> i32
+fn atomicXor_c1b78c() {
+  var res: i32 = atomicXor(&sb_rw.arg_0, 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  atomicXor_c1b78c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicXor_c1b78c();
+}
diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.glsl b/test/builtins/gen/atomicXor/c1b78c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.glsl
rename to test/builtins/gen/atomicXor/c1b78c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.hlsl b/test/builtins/gen/atomicXor/c1b78c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.hlsl
rename to test/builtins/gen/atomicXor/c1b78c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.msl b/test/builtins/gen/atomicXor/c1b78c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.msl
rename to test/builtins/gen/atomicXor/c1b78c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.spvasm b/test/builtins/gen/atomicXor/c1b78c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.spvasm
rename to test/builtins/gen/atomicXor/c1b78c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.wgsl b/test/builtins/gen/atomicXor/c1b78c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.wgsl
rename to test/builtins/gen/atomicXor/c1b78c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/atomicXor/c8e6be.wgsl b/test/builtins/gen/atomicXor/c8e6be.wgsl
new file mode 100644
index 0000000..bfc379d
--- /dev/null
+++ b/test/builtins/gen/atomicXor/c8e6be.wgsl
@@ -0,0 +1,35 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+var<workgroup> arg_0: atomic<u32>;
+
+// fn atomicXor(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
+fn atomicXor_c8e6be() {
+  var res: u32 = atomicXor(&arg_0, 1u);
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  atomicXor_c8e6be();
+}
diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.glsl b/test/builtins/gen/atomicXor/c8e6be.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.glsl
rename to test/builtins/gen/atomicXor/c8e6be.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl b/test/builtins/gen/atomicXor/c8e6be.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl
rename to test/builtins/gen/atomicXor/c8e6be.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.msl b/test/builtins/gen/atomicXor/c8e6be.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.msl
rename to test/builtins/gen/atomicXor/c8e6be.wgsl.expected.msl
diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.spvasm b/test/builtins/gen/atomicXor/c8e6be.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.spvasm
rename to test/builtins/gen/atomicXor/c8e6be.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.wgsl b/test/builtins/gen/atomicXor/c8e6be.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.wgsl
rename to test/builtins/gen/atomicXor/c8e6be.wgsl.expected.wgsl
diff --git a/test/builtins/gen/ceil/34064b.wgsl b/test/builtins/gen/ceil/34064b.wgsl
new file mode 100644
index 0000000..41f8602
--- /dev/null
+++ b/test/builtins/gen/ceil/34064b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn ceil(vec<3, f32>) -> vec<3, f32>
+fn ceil_34064b() {
+  var res: vec3<f32> = ceil(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_34064b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  ceil_34064b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  ceil_34064b();
+}
diff --git a/test/intrinsics/gen/ceil/34064b.wgsl.expected.glsl b/test/builtins/gen/ceil/34064b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/ceil/34064b.wgsl.expected.glsl
rename to test/builtins/gen/ceil/34064b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/ceil/34064b.wgsl.expected.hlsl b/test/builtins/gen/ceil/34064b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/ceil/34064b.wgsl.expected.hlsl
rename to test/builtins/gen/ceil/34064b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/ceil/34064b.wgsl.expected.msl b/test/builtins/gen/ceil/34064b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/ceil/34064b.wgsl.expected.msl
rename to test/builtins/gen/ceil/34064b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/ceil/34064b.wgsl.expected.spvasm b/test/builtins/gen/ceil/34064b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/ceil/34064b.wgsl.expected.spvasm
rename to test/builtins/gen/ceil/34064b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/ceil/34064b.wgsl.expected.wgsl b/test/builtins/gen/ceil/34064b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/ceil/34064b.wgsl.expected.wgsl
rename to test/builtins/gen/ceil/34064b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/ceil/678655.wgsl b/test/builtins/gen/ceil/678655.wgsl
new file mode 100644
index 0000000..e9d4249
--- /dev/null
+++ b/test/builtins/gen/ceil/678655.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn ceil(f32) -> f32
+fn ceil_678655() {
+  var res: f32 = ceil(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_678655();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  ceil_678655();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  ceil_678655();
+}
diff --git a/test/intrinsics/gen/ceil/678655.wgsl.expected.glsl b/test/builtins/gen/ceil/678655.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/ceil/678655.wgsl.expected.glsl
rename to test/builtins/gen/ceil/678655.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/ceil/678655.wgsl.expected.hlsl b/test/builtins/gen/ceil/678655.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/ceil/678655.wgsl.expected.hlsl
rename to test/builtins/gen/ceil/678655.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/ceil/678655.wgsl.expected.msl b/test/builtins/gen/ceil/678655.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/ceil/678655.wgsl.expected.msl
rename to test/builtins/gen/ceil/678655.wgsl.expected.msl
diff --git a/test/intrinsics/gen/ceil/678655.wgsl.expected.spvasm b/test/builtins/gen/ceil/678655.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/ceil/678655.wgsl.expected.spvasm
rename to test/builtins/gen/ceil/678655.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/ceil/678655.wgsl.expected.wgsl b/test/builtins/gen/ceil/678655.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/ceil/678655.wgsl.expected.wgsl
rename to test/builtins/gen/ceil/678655.wgsl.expected.wgsl
diff --git a/test/builtins/gen/ceil/96f597.wgsl b/test/builtins/gen/ceil/96f597.wgsl
new file mode 100644
index 0000000..4b21a85
--- /dev/null
+++ b/test/builtins/gen/ceil/96f597.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn ceil(vec<2, f32>) -> vec<2, f32>
+fn ceil_96f597() {
+  var res: vec2<f32> = ceil(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_96f597();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  ceil_96f597();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  ceil_96f597();
+}
diff --git a/test/intrinsics/gen/ceil/96f597.wgsl.expected.glsl b/test/builtins/gen/ceil/96f597.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/ceil/96f597.wgsl.expected.glsl
rename to test/builtins/gen/ceil/96f597.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/ceil/96f597.wgsl.expected.hlsl b/test/builtins/gen/ceil/96f597.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/ceil/96f597.wgsl.expected.hlsl
rename to test/builtins/gen/ceil/96f597.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/ceil/96f597.wgsl.expected.msl b/test/builtins/gen/ceil/96f597.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/ceil/96f597.wgsl.expected.msl
rename to test/builtins/gen/ceil/96f597.wgsl.expected.msl
diff --git a/test/intrinsics/gen/ceil/96f597.wgsl.expected.spvasm b/test/builtins/gen/ceil/96f597.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/ceil/96f597.wgsl.expected.spvasm
rename to test/builtins/gen/ceil/96f597.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/ceil/96f597.wgsl.expected.wgsl b/test/builtins/gen/ceil/96f597.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/ceil/96f597.wgsl.expected.wgsl
rename to test/builtins/gen/ceil/96f597.wgsl.expected.wgsl
diff --git a/test/builtins/gen/ceil/b74c16.wgsl b/test/builtins/gen/ceil/b74c16.wgsl
new file mode 100644
index 0000000..f80ec4d
--- /dev/null
+++ b/test/builtins/gen/ceil/b74c16.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn ceil(vec<4, f32>) -> vec<4, f32>
+fn ceil_b74c16() {
+  var res: vec4<f32> = ceil(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_b74c16();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  ceil_b74c16();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  ceil_b74c16();
+}
diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.glsl b/test/builtins/gen/ceil/b74c16.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/ceil/b74c16.wgsl.expected.glsl
rename to test/builtins/gen/ceil/b74c16.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.hlsl b/test/builtins/gen/ceil/b74c16.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/ceil/b74c16.wgsl.expected.hlsl
rename to test/builtins/gen/ceil/b74c16.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.msl b/test/builtins/gen/ceil/b74c16.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/ceil/b74c16.wgsl.expected.msl
rename to test/builtins/gen/ceil/b74c16.wgsl.expected.msl
diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.spvasm b/test/builtins/gen/ceil/b74c16.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/ceil/b74c16.wgsl.expected.spvasm
rename to test/builtins/gen/ceil/b74c16.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.wgsl b/test/builtins/gen/ceil/b74c16.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/ceil/b74c16.wgsl.expected.wgsl
rename to test/builtins/gen/ceil/b74c16.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/0acf8f.wgsl b/test/builtins/gen/clamp/0acf8f.wgsl
new file mode 100644
index 0000000..e7a635b
--- /dev/null
+++ b/test/builtins/gen/clamp/0acf8f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn clamp_0acf8f() {
+  var res: vec2<f32> = clamp(vec2<f32>(), vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_0acf8f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_0acf8f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_0acf8f();
+}
diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.glsl b/test/builtins/gen/clamp/0acf8f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/0acf8f.wgsl.expected.glsl
rename to test/builtins/gen/clamp/0acf8f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.hlsl b/test/builtins/gen/clamp/0acf8f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/0acf8f.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/0acf8f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.msl b/test/builtins/gen/clamp/0acf8f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/0acf8f.wgsl.expected.msl
rename to test/builtins/gen/clamp/0acf8f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.spvasm b/test/builtins/gen/clamp/0acf8f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/0acf8f.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/0acf8f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.wgsl b/test/builtins/gen/clamp/0acf8f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/0acf8f.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/0acf8f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/1a32e3.wgsl b/test/builtins/gen/clamp/1a32e3.wgsl
new file mode 100644
index 0000000..a42b965
--- /dev/null
+++ b/test/builtins/gen/clamp/1a32e3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(vec<4, i32>, vec<4, i32>, vec<4, i32>) -> vec<4, i32>
+fn clamp_1a32e3() {
+  var res: vec4<i32> = clamp(vec4<i32>(), vec4<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_1a32e3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_1a32e3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_1a32e3();
+}
diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.glsl b/test/builtins/gen/clamp/1a32e3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/1a32e3.wgsl.expected.glsl
rename to test/builtins/gen/clamp/1a32e3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.hlsl b/test/builtins/gen/clamp/1a32e3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/1a32e3.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/1a32e3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.msl b/test/builtins/gen/clamp/1a32e3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/1a32e3.wgsl.expected.msl
rename to test/builtins/gen/clamp/1a32e3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.spvasm b/test/builtins/gen/clamp/1a32e3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/1a32e3.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/1a32e3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.wgsl b/test/builtins/gen/clamp/1a32e3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/1a32e3.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/1a32e3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/2bd567.wgsl b/test/builtins/gen/clamp/2bd567.wgsl
new file mode 100644
index 0000000..9fa69a0
--- /dev/null
+++ b/test/builtins/gen/clamp/2bd567.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(f32, f32, f32) -> f32
+fn clamp_2bd567() {
+  var res: f32 = clamp(1.0, 1.0, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_2bd567();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_2bd567();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_2bd567();
+}
diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.glsl b/test/builtins/gen/clamp/2bd567.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/2bd567.wgsl.expected.glsl
rename to test/builtins/gen/clamp/2bd567.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.hlsl b/test/builtins/gen/clamp/2bd567.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/2bd567.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/2bd567.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.msl b/test/builtins/gen/clamp/2bd567.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/2bd567.wgsl.expected.msl
rename to test/builtins/gen/clamp/2bd567.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.spvasm b/test/builtins/gen/clamp/2bd567.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/2bd567.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/2bd567.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.wgsl b/test/builtins/gen/clamp/2bd567.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/2bd567.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/2bd567.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/2bde41.wgsl b/test/builtins/gen/clamp/2bde41.wgsl
new file mode 100644
index 0000000..bdc06b9
--- /dev/null
+++ b/test/builtins/gen/clamp/2bde41.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn clamp_2bde41() {
+  var res: vec4<f32> = clamp(vec4<f32>(), vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_2bde41();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_2bde41();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_2bde41();
+}
diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.glsl b/test/builtins/gen/clamp/2bde41.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/2bde41.wgsl.expected.glsl
rename to test/builtins/gen/clamp/2bde41.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.hlsl b/test/builtins/gen/clamp/2bde41.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/2bde41.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/2bde41.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.msl b/test/builtins/gen/clamp/2bde41.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/2bde41.wgsl.expected.msl
rename to test/builtins/gen/clamp/2bde41.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.spvasm b/test/builtins/gen/clamp/2bde41.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/2bde41.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/2bde41.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.wgsl b/test/builtins/gen/clamp/2bde41.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/2bde41.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/2bde41.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/548fc7.wgsl b/test/builtins/gen/clamp/548fc7.wgsl
new file mode 100644
index 0000000..202aecb
--- /dev/null
+++ b/test/builtins/gen/clamp/548fc7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(vec<3, u32>, vec<3, u32>, vec<3, u32>) -> vec<3, u32>
+fn clamp_548fc7() {
+  var res: vec3<u32> = clamp(vec3<u32>(), vec3<u32>(), vec3<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_548fc7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_548fc7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_548fc7();
+}
diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.glsl b/test/builtins/gen/clamp/548fc7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/548fc7.wgsl.expected.glsl
rename to test/builtins/gen/clamp/548fc7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.hlsl b/test/builtins/gen/clamp/548fc7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/548fc7.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/548fc7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.msl b/test/builtins/gen/clamp/548fc7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/548fc7.wgsl.expected.msl
rename to test/builtins/gen/clamp/548fc7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.spvasm b/test/builtins/gen/clamp/548fc7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/548fc7.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/548fc7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.wgsl b/test/builtins/gen/clamp/548fc7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/548fc7.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/548fc7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/5f0819.wgsl b/test/builtins/gen/clamp/5f0819.wgsl
new file mode 100644
index 0000000..5ee0369
--- /dev/null
+++ b/test/builtins/gen/clamp/5f0819.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(vec<3, i32>, vec<3, i32>, vec<3, i32>) -> vec<3, i32>
+fn clamp_5f0819() {
+  var res: vec3<i32> = clamp(vec3<i32>(), vec3<i32>(), vec3<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_5f0819();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_5f0819();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_5f0819();
+}
diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.glsl b/test/builtins/gen/clamp/5f0819.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/5f0819.wgsl.expected.glsl
rename to test/builtins/gen/clamp/5f0819.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.hlsl b/test/builtins/gen/clamp/5f0819.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/5f0819.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/5f0819.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.msl b/test/builtins/gen/clamp/5f0819.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/5f0819.wgsl.expected.msl
rename to test/builtins/gen/clamp/5f0819.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.spvasm b/test/builtins/gen/clamp/5f0819.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/5f0819.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/5f0819.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.wgsl b/test/builtins/gen/clamp/5f0819.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/5f0819.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/5f0819.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/6c1749.wgsl b/test/builtins/gen/clamp/6c1749.wgsl
new file mode 100644
index 0000000..dd62b9c
--- /dev/null
+++ b/test/builtins/gen/clamp/6c1749.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(vec<2, i32>, vec<2, i32>, vec<2, i32>) -> vec<2, i32>
+fn clamp_6c1749() {
+  var res: vec2<i32> = clamp(vec2<i32>(), vec2<i32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_6c1749();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_6c1749();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_6c1749();
+}
diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.glsl b/test/builtins/gen/clamp/6c1749.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/6c1749.wgsl.expected.glsl
rename to test/builtins/gen/clamp/6c1749.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.hlsl b/test/builtins/gen/clamp/6c1749.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/6c1749.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/6c1749.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.msl b/test/builtins/gen/clamp/6c1749.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/6c1749.wgsl.expected.msl
rename to test/builtins/gen/clamp/6c1749.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.spvasm b/test/builtins/gen/clamp/6c1749.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/6c1749.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/6c1749.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.wgsl b/test/builtins/gen/clamp/6c1749.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/6c1749.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/6c1749.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/7706d7.wgsl b/test/builtins/gen/clamp/7706d7.wgsl
new file mode 100644
index 0000000..0ab5c81
--- /dev/null
+++ b/test/builtins/gen/clamp/7706d7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(vec<2, u32>, vec<2, u32>, vec<2, u32>) -> vec<2, u32>
+fn clamp_7706d7() {
+  var res: vec2<u32> = clamp(vec2<u32>(), vec2<u32>(), vec2<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_7706d7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_7706d7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_7706d7();
+}
diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.glsl b/test/builtins/gen/clamp/7706d7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/7706d7.wgsl.expected.glsl
rename to test/builtins/gen/clamp/7706d7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.hlsl b/test/builtins/gen/clamp/7706d7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/7706d7.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/7706d7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.msl b/test/builtins/gen/clamp/7706d7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/7706d7.wgsl.expected.msl
rename to test/builtins/gen/clamp/7706d7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.spvasm b/test/builtins/gen/clamp/7706d7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/7706d7.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/7706d7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.wgsl b/test/builtins/gen/clamp/7706d7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/7706d7.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/7706d7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/867397.wgsl b/test/builtins/gen/clamp/867397.wgsl
new file mode 100644
index 0000000..6a0e4f3
--- /dev/null
+++ b/test/builtins/gen/clamp/867397.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn clamp_867397() {
+  var res: vec3<f32> = clamp(vec3<f32>(), vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_867397();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_867397();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_867397();
+}
diff --git a/test/intrinsics/gen/clamp/867397.wgsl.expected.glsl b/test/builtins/gen/clamp/867397.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/867397.wgsl.expected.glsl
rename to test/builtins/gen/clamp/867397.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/867397.wgsl.expected.hlsl b/test/builtins/gen/clamp/867397.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/867397.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/867397.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/867397.wgsl.expected.msl b/test/builtins/gen/clamp/867397.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/867397.wgsl.expected.msl
rename to test/builtins/gen/clamp/867397.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/867397.wgsl.expected.spvasm b/test/builtins/gen/clamp/867397.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/867397.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/867397.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/867397.wgsl.expected.wgsl b/test/builtins/gen/clamp/867397.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/867397.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/867397.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/a2de25.wgsl b/test/builtins/gen/clamp/a2de25.wgsl
new file mode 100644
index 0000000..671ecbc
--- /dev/null
+++ b/test/builtins/gen/clamp/a2de25.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(u32, u32, u32) -> u32
+fn clamp_a2de25() {
+  var res: u32 = clamp(1u, 1u, 1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_a2de25();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_a2de25();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_a2de25();
+}
diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.glsl b/test/builtins/gen/clamp/a2de25.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/a2de25.wgsl.expected.glsl
rename to test/builtins/gen/clamp/a2de25.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.hlsl b/test/builtins/gen/clamp/a2de25.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/a2de25.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/a2de25.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.msl b/test/builtins/gen/clamp/a2de25.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/a2de25.wgsl.expected.msl
rename to test/builtins/gen/clamp/a2de25.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.spvasm b/test/builtins/gen/clamp/a2de25.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/a2de25.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/a2de25.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.wgsl b/test/builtins/gen/clamp/a2de25.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/a2de25.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/a2de25.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/b07c65.wgsl b/test/builtins/gen/clamp/b07c65.wgsl
new file mode 100644
index 0000000..1616879
--- /dev/null
+++ b/test/builtins/gen/clamp/b07c65.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(i32, i32, i32) -> i32
+fn clamp_b07c65() {
+  var res: i32 = clamp(1, 1, 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_b07c65();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_b07c65();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_b07c65();
+}
diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.glsl b/test/builtins/gen/clamp/b07c65.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/b07c65.wgsl.expected.glsl
rename to test/builtins/gen/clamp/b07c65.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.hlsl b/test/builtins/gen/clamp/b07c65.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/b07c65.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/b07c65.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.msl b/test/builtins/gen/clamp/b07c65.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/b07c65.wgsl.expected.msl
rename to test/builtins/gen/clamp/b07c65.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.spvasm b/test/builtins/gen/clamp/b07c65.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/b07c65.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/b07c65.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.wgsl b/test/builtins/gen/clamp/b07c65.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/b07c65.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/b07c65.wgsl.expected.wgsl
diff --git a/test/builtins/gen/clamp/bd43ce.wgsl b/test/builtins/gen/clamp/bd43ce.wgsl
new file mode 100644
index 0000000..fbdbb70
--- /dev/null
+++ b/test/builtins/gen/clamp/bd43ce.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn clamp(vec<4, u32>, vec<4, u32>, vec<4, u32>) -> vec<4, u32>
+fn clamp_bd43ce() {
+  var res: vec4<u32> = clamp(vec4<u32>(), vec4<u32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_bd43ce();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  clamp_bd43ce();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  clamp_bd43ce();
+}
diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.glsl b/test/builtins/gen/clamp/bd43ce.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/clamp/bd43ce.wgsl.expected.glsl
rename to test/builtins/gen/clamp/bd43ce.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.hlsl b/test/builtins/gen/clamp/bd43ce.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/clamp/bd43ce.wgsl.expected.hlsl
rename to test/builtins/gen/clamp/bd43ce.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.msl b/test/builtins/gen/clamp/bd43ce.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/clamp/bd43ce.wgsl.expected.msl
rename to test/builtins/gen/clamp/bd43ce.wgsl.expected.msl
diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.spvasm b/test/builtins/gen/clamp/bd43ce.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/clamp/bd43ce.wgsl.expected.spvasm
rename to test/builtins/gen/clamp/bd43ce.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.wgsl b/test/builtins/gen/clamp/bd43ce.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/clamp/bd43ce.wgsl.expected.wgsl
rename to test/builtins/gen/clamp/bd43ce.wgsl.expected.wgsl
diff --git a/test/builtins/gen/cos/16dc15.wgsl b/test/builtins/gen/cos/16dc15.wgsl
new file mode 100644
index 0000000..0e917e3
--- /dev/null
+++ b/test/builtins/gen/cos/16dc15.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn cos(vec<3, f32>) -> vec<3, f32>
+fn cos_16dc15() {
+  var res: vec3<f32> = cos(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_16dc15();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  cos_16dc15();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  cos_16dc15();
+}
diff --git a/test/intrinsics/gen/cos/16dc15.wgsl.expected.glsl b/test/builtins/gen/cos/16dc15.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/cos/16dc15.wgsl.expected.glsl
rename to test/builtins/gen/cos/16dc15.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/cos/16dc15.wgsl.expected.hlsl b/test/builtins/gen/cos/16dc15.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/cos/16dc15.wgsl.expected.hlsl
rename to test/builtins/gen/cos/16dc15.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/cos/16dc15.wgsl.expected.msl b/test/builtins/gen/cos/16dc15.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/cos/16dc15.wgsl.expected.msl
rename to test/builtins/gen/cos/16dc15.wgsl.expected.msl
diff --git a/test/intrinsics/gen/cos/16dc15.wgsl.expected.spvasm b/test/builtins/gen/cos/16dc15.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/cos/16dc15.wgsl.expected.spvasm
rename to test/builtins/gen/cos/16dc15.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/cos/16dc15.wgsl.expected.wgsl b/test/builtins/gen/cos/16dc15.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/cos/16dc15.wgsl.expected.wgsl
rename to test/builtins/gen/cos/16dc15.wgsl.expected.wgsl
diff --git a/test/builtins/gen/cos/29d66d.wgsl b/test/builtins/gen/cos/29d66d.wgsl
new file mode 100644
index 0000000..7c47ea4
--- /dev/null
+++ b/test/builtins/gen/cos/29d66d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn cos(vec<4, f32>) -> vec<4, f32>
+fn cos_29d66d() {
+  var res: vec4<f32> = cos(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_29d66d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  cos_29d66d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  cos_29d66d();
+}
diff --git a/test/intrinsics/gen/cos/29d66d.wgsl.expected.glsl b/test/builtins/gen/cos/29d66d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/cos/29d66d.wgsl.expected.glsl
rename to test/builtins/gen/cos/29d66d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/cos/29d66d.wgsl.expected.hlsl b/test/builtins/gen/cos/29d66d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/cos/29d66d.wgsl.expected.hlsl
rename to test/builtins/gen/cos/29d66d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/cos/29d66d.wgsl.expected.msl b/test/builtins/gen/cos/29d66d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/cos/29d66d.wgsl.expected.msl
rename to test/builtins/gen/cos/29d66d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/cos/29d66d.wgsl.expected.spvasm b/test/builtins/gen/cos/29d66d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/cos/29d66d.wgsl.expected.spvasm
rename to test/builtins/gen/cos/29d66d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/cos/29d66d.wgsl.expected.wgsl b/test/builtins/gen/cos/29d66d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/cos/29d66d.wgsl.expected.wgsl
rename to test/builtins/gen/cos/29d66d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/cos/c3b486.wgsl b/test/builtins/gen/cos/c3b486.wgsl
new file mode 100644
index 0000000..942f1bd
--- /dev/null
+++ b/test/builtins/gen/cos/c3b486.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn cos(vec<2, f32>) -> vec<2, f32>
+fn cos_c3b486() {
+  var res: vec2<f32> = cos(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_c3b486();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  cos_c3b486();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  cos_c3b486();
+}
diff --git a/test/intrinsics/gen/cos/c3b486.wgsl.expected.glsl b/test/builtins/gen/cos/c3b486.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/cos/c3b486.wgsl.expected.glsl
rename to test/builtins/gen/cos/c3b486.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/cos/c3b486.wgsl.expected.hlsl b/test/builtins/gen/cos/c3b486.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/cos/c3b486.wgsl.expected.hlsl
rename to test/builtins/gen/cos/c3b486.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/cos/c3b486.wgsl.expected.msl b/test/builtins/gen/cos/c3b486.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/cos/c3b486.wgsl.expected.msl
rename to test/builtins/gen/cos/c3b486.wgsl.expected.msl
diff --git a/test/intrinsics/gen/cos/c3b486.wgsl.expected.spvasm b/test/builtins/gen/cos/c3b486.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/cos/c3b486.wgsl.expected.spvasm
rename to test/builtins/gen/cos/c3b486.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/cos/c3b486.wgsl.expected.wgsl b/test/builtins/gen/cos/c3b486.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/cos/c3b486.wgsl.expected.wgsl
rename to test/builtins/gen/cos/c3b486.wgsl.expected.wgsl
diff --git a/test/builtins/gen/cos/c5c28e.wgsl b/test/builtins/gen/cos/c5c28e.wgsl
new file mode 100644
index 0000000..d88b9e1
--- /dev/null
+++ b/test/builtins/gen/cos/c5c28e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn cos(f32) -> f32
+fn cos_c5c28e() {
+  var res: f32 = cos(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_c5c28e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  cos_c5c28e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  cos_c5c28e();
+}
diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.glsl b/test/builtins/gen/cos/c5c28e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/cos/c5c28e.wgsl.expected.glsl
rename to test/builtins/gen/cos/c5c28e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.hlsl b/test/builtins/gen/cos/c5c28e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/cos/c5c28e.wgsl.expected.hlsl
rename to test/builtins/gen/cos/c5c28e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.msl b/test/builtins/gen/cos/c5c28e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/cos/c5c28e.wgsl.expected.msl
rename to test/builtins/gen/cos/c5c28e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.spvasm b/test/builtins/gen/cos/c5c28e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/cos/c5c28e.wgsl.expected.spvasm
rename to test/builtins/gen/cos/c5c28e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.wgsl b/test/builtins/gen/cos/c5c28e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/cos/c5c28e.wgsl.expected.wgsl
rename to test/builtins/gen/cos/c5c28e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/cosh/377652.wgsl b/test/builtins/gen/cosh/377652.wgsl
new file mode 100644
index 0000000..ff336ed
--- /dev/null
+++ b/test/builtins/gen/cosh/377652.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn cosh(vec<3, f32>) -> vec<3, f32>
+fn cosh_377652() {
+  var res: vec3<f32> = cosh(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_377652();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  cosh_377652();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  cosh_377652();
+}
diff --git a/test/intrinsics/gen/cosh/377652.wgsl.expected.glsl b/test/builtins/gen/cosh/377652.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/cosh/377652.wgsl.expected.glsl
rename to test/builtins/gen/cosh/377652.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/cosh/377652.wgsl.expected.hlsl b/test/builtins/gen/cosh/377652.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/cosh/377652.wgsl.expected.hlsl
rename to test/builtins/gen/cosh/377652.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/cosh/377652.wgsl.expected.msl b/test/builtins/gen/cosh/377652.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/cosh/377652.wgsl.expected.msl
rename to test/builtins/gen/cosh/377652.wgsl.expected.msl
diff --git a/test/intrinsics/gen/cosh/377652.wgsl.expected.spvasm b/test/builtins/gen/cosh/377652.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/cosh/377652.wgsl.expected.spvasm
rename to test/builtins/gen/cosh/377652.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/cosh/377652.wgsl.expected.wgsl b/test/builtins/gen/cosh/377652.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/cosh/377652.wgsl.expected.wgsl
rename to test/builtins/gen/cosh/377652.wgsl.expected.wgsl
diff --git a/test/builtins/gen/cosh/c13756.wgsl b/test/builtins/gen/cosh/c13756.wgsl
new file mode 100644
index 0000000..4eadf79
--- /dev/null
+++ b/test/builtins/gen/cosh/c13756.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn cosh(vec<2, f32>) -> vec<2, f32>
+fn cosh_c13756() {
+  var res: vec2<f32> = cosh(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_c13756();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  cosh_c13756();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  cosh_c13756();
+}
diff --git a/test/intrinsics/gen/cosh/c13756.wgsl.expected.glsl b/test/builtins/gen/cosh/c13756.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/cosh/c13756.wgsl.expected.glsl
rename to test/builtins/gen/cosh/c13756.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/cosh/c13756.wgsl.expected.hlsl b/test/builtins/gen/cosh/c13756.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/cosh/c13756.wgsl.expected.hlsl
rename to test/builtins/gen/cosh/c13756.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/cosh/c13756.wgsl.expected.msl b/test/builtins/gen/cosh/c13756.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/cosh/c13756.wgsl.expected.msl
rename to test/builtins/gen/cosh/c13756.wgsl.expected.msl
diff --git a/test/intrinsics/gen/cosh/c13756.wgsl.expected.spvasm b/test/builtins/gen/cosh/c13756.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/cosh/c13756.wgsl.expected.spvasm
rename to test/builtins/gen/cosh/c13756.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/cosh/c13756.wgsl.expected.wgsl b/test/builtins/gen/cosh/c13756.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/cosh/c13756.wgsl.expected.wgsl
rename to test/builtins/gen/cosh/c13756.wgsl.expected.wgsl
diff --git a/test/builtins/gen/cosh/da92dd.wgsl b/test/builtins/gen/cosh/da92dd.wgsl
new file mode 100644
index 0000000..770696c
--- /dev/null
+++ b/test/builtins/gen/cosh/da92dd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn cosh(f32) -> f32
+fn cosh_da92dd() {
+  var res: f32 = cosh(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_da92dd();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  cosh_da92dd();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  cosh_da92dd();
+}
diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.glsl b/test/builtins/gen/cosh/da92dd.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/cosh/da92dd.wgsl.expected.glsl
rename to test/builtins/gen/cosh/da92dd.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.hlsl b/test/builtins/gen/cosh/da92dd.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/cosh/da92dd.wgsl.expected.hlsl
rename to test/builtins/gen/cosh/da92dd.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.msl b/test/builtins/gen/cosh/da92dd.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/cosh/da92dd.wgsl.expected.msl
rename to test/builtins/gen/cosh/da92dd.wgsl.expected.msl
diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.spvasm b/test/builtins/gen/cosh/da92dd.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/cosh/da92dd.wgsl.expected.spvasm
rename to test/builtins/gen/cosh/da92dd.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.wgsl b/test/builtins/gen/cosh/da92dd.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/cosh/da92dd.wgsl.expected.wgsl
rename to test/builtins/gen/cosh/da92dd.wgsl.expected.wgsl
diff --git a/test/builtins/gen/cosh/e0c1de.wgsl b/test/builtins/gen/cosh/e0c1de.wgsl
new file mode 100644
index 0000000..79f948e
--- /dev/null
+++ b/test/builtins/gen/cosh/e0c1de.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn cosh(vec<4, f32>) -> vec<4, f32>
+fn cosh_e0c1de() {
+  var res: vec4<f32> = cosh(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_e0c1de();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  cosh_e0c1de();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  cosh_e0c1de();
+}
diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.glsl b/test/builtins/gen/cosh/e0c1de.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/cosh/e0c1de.wgsl.expected.glsl
rename to test/builtins/gen/cosh/e0c1de.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.hlsl b/test/builtins/gen/cosh/e0c1de.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/cosh/e0c1de.wgsl.expected.hlsl
rename to test/builtins/gen/cosh/e0c1de.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.msl b/test/builtins/gen/cosh/e0c1de.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/cosh/e0c1de.wgsl.expected.msl
rename to test/builtins/gen/cosh/e0c1de.wgsl.expected.msl
diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.spvasm b/test/builtins/gen/cosh/e0c1de.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/cosh/e0c1de.wgsl.expected.spvasm
rename to test/builtins/gen/cosh/e0c1de.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.wgsl b/test/builtins/gen/cosh/e0c1de.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/cosh/e0c1de.wgsl.expected.wgsl
rename to test/builtins/gen/cosh/e0c1de.wgsl.expected.wgsl
diff --git a/test/builtins/gen/countOneBits/0d0e46.wgsl b/test/builtins/gen/countOneBits/0d0e46.wgsl
new file mode 100644
index 0000000..adef749
--- /dev/null
+++ b/test/builtins/gen/countOneBits/0d0e46.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn countOneBits(vec<4, u32>) -> vec<4, u32>
+fn countOneBits_0d0e46() {
+  var res: vec4<u32> = countOneBits(vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  countOneBits_0d0e46();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  countOneBits_0d0e46();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  countOneBits_0d0e46();
+}
diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.glsl b/test/builtins/gen/countOneBits/0d0e46.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.glsl
rename to test/builtins/gen/countOneBits/0d0e46.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.hlsl b/test/builtins/gen/countOneBits/0d0e46.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.hlsl
rename to test/builtins/gen/countOneBits/0d0e46.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.msl b/test/builtins/gen/countOneBits/0d0e46.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.msl
rename to test/builtins/gen/countOneBits/0d0e46.wgsl.expected.msl
diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.spvasm b/test/builtins/gen/countOneBits/0d0e46.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.spvasm
rename to test/builtins/gen/countOneBits/0d0e46.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.wgsl b/test/builtins/gen/countOneBits/0d0e46.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.wgsl
rename to test/builtins/gen/countOneBits/0d0e46.wgsl.expected.wgsl
diff --git a/test/builtins/gen/countOneBits/0f7980.wgsl b/test/builtins/gen/countOneBits/0f7980.wgsl
new file mode 100644
index 0000000..95185f5
--- /dev/null
+++ b/test/builtins/gen/countOneBits/0f7980.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn countOneBits(vec<4, i32>) -> vec<4, i32>
+fn countOneBits_0f7980() {
+  var res: vec4<i32> = countOneBits(vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  countOneBits_0f7980();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  countOneBits_0f7980();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  countOneBits_0f7980();
+}
diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.glsl b/test/builtins/gen/countOneBits/0f7980.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.glsl
rename to test/builtins/gen/countOneBits/0f7980.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.hlsl b/test/builtins/gen/countOneBits/0f7980.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.hlsl
rename to test/builtins/gen/countOneBits/0f7980.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.msl b/test/builtins/gen/countOneBits/0f7980.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.msl
rename to test/builtins/gen/countOneBits/0f7980.wgsl.expected.msl
diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.spvasm b/test/builtins/gen/countOneBits/0f7980.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.spvasm
rename to test/builtins/gen/countOneBits/0f7980.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.wgsl b/test/builtins/gen/countOneBits/0f7980.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.wgsl
rename to test/builtins/gen/countOneBits/0f7980.wgsl.expected.wgsl
diff --git a/test/builtins/gen/countOneBits/65d2ae.wgsl b/test/builtins/gen/countOneBits/65d2ae.wgsl
new file mode 100644
index 0000000..c0d2bfa
--- /dev/null
+++ b/test/builtins/gen/countOneBits/65d2ae.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn countOneBits(vec<3, i32>) -> vec<3, i32>
+fn countOneBits_65d2ae() {
+  var res: vec3<i32> = countOneBits(vec3<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  countOneBits_65d2ae();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  countOneBits_65d2ae();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  countOneBits_65d2ae();
+}
diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.glsl b/test/builtins/gen/countOneBits/65d2ae.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.glsl
rename to test/builtins/gen/countOneBits/65d2ae.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.hlsl b/test/builtins/gen/countOneBits/65d2ae.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.hlsl
rename to test/builtins/gen/countOneBits/65d2ae.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.msl b/test/builtins/gen/countOneBits/65d2ae.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.msl
rename to test/builtins/gen/countOneBits/65d2ae.wgsl.expected.msl
diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.spvasm b/test/builtins/gen/countOneBits/65d2ae.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.spvasm
rename to test/builtins/gen/countOneBits/65d2ae.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.wgsl b/test/builtins/gen/countOneBits/65d2ae.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.wgsl
rename to test/builtins/gen/countOneBits/65d2ae.wgsl.expected.wgsl
diff --git a/test/builtins/gen/countOneBits/690cfc.wgsl b/test/builtins/gen/countOneBits/690cfc.wgsl
new file mode 100644
index 0000000..7770626
--- /dev/null
+++ b/test/builtins/gen/countOneBits/690cfc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn countOneBits(vec<3, u32>) -> vec<3, u32>
+fn countOneBits_690cfc() {
+  var res: vec3<u32> = countOneBits(vec3<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  countOneBits_690cfc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  countOneBits_690cfc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  countOneBits_690cfc();
+}
diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.glsl b/test/builtins/gen/countOneBits/690cfc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.glsl
rename to test/builtins/gen/countOneBits/690cfc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.hlsl b/test/builtins/gen/countOneBits/690cfc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.hlsl
rename to test/builtins/gen/countOneBits/690cfc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.msl b/test/builtins/gen/countOneBits/690cfc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.msl
rename to test/builtins/gen/countOneBits/690cfc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.spvasm b/test/builtins/gen/countOneBits/690cfc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.spvasm
rename to test/builtins/gen/countOneBits/690cfc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.wgsl b/test/builtins/gen/countOneBits/690cfc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.wgsl
rename to test/builtins/gen/countOneBits/690cfc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/countOneBits/94fd81.wgsl b/test/builtins/gen/countOneBits/94fd81.wgsl
new file mode 100644
index 0000000..7c4d42f
--- /dev/null
+++ b/test/builtins/gen/countOneBits/94fd81.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn countOneBits(vec<2, u32>) -> vec<2, u32>
+fn countOneBits_94fd81() {
+  var res: vec2<u32> = countOneBits(vec2<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  countOneBits_94fd81();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  countOneBits_94fd81();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  countOneBits_94fd81();
+}
diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.glsl b/test/builtins/gen/countOneBits/94fd81.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.glsl
rename to test/builtins/gen/countOneBits/94fd81.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.hlsl b/test/builtins/gen/countOneBits/94fd81.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.hlsl
rename to test/builtins/gen/countOneBits/94fd81.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.msl b/test/builtins/gen/countOneBits/94fd81.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.msl
rename to test/builtins/gen/countOneBits/94fd81.wgsl.expected.msl
diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.spvasm b/test/builtins/gen/countOneBits/94fd81.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.spvasm
rename to test/builtins/gen/countOneBits/94fd81.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.wgsl b/test/builtins/gen/countOneBits/94fd81.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.wgsl
rename to test/builtins/gen/countOneBits/94fd81.wgsl.expected.wgsl
diff --git a/test/builtins/gen/countOneBits/ae44f9.wgsl b/test/builtins/gen/countOneBits/ae44f9.wgsl
new file mode 100644
index 0000000..713ab90
--- /dev/null
+++ b/test/builtins/gen/countOneBits/ae44f9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn countOneBits(u32) -> u32
+fn countOneBits_ae44f9() {
+  var res: u32 = countOneBits(1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  countOneBits_ae44f9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  countOneBits_ae44f9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  countOneBits_ae44f9();
+}
diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.glsl b/test/builtins/gen/countOneBits/ae44f9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.glsl
rename to test/builtins/gen/countOneBits/ae44f9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.hlsl b/test/builtins/gen/countOneBits/ae44f9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.hlsl
rename to test/builtins/gen/countOneBits/ae44f9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.msl b/test/builtins/gen/countOneBits/ae44f9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.msl
rename to test/builtins/gen/countOneBits/ae44f9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.spvasm b/test/builtins/gen/countOneBits/ae44f9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.spvasm
rename to test/builtins/gen/countOneBits/ae44f9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.wgsl b/test/builtins/gen/countOneBits/ae44f9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.wgsl
rename to test/builtins/gen/countOneBits/ae44f9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/countOneBits/af90e2.wgsl b/test/builtins/gen/countOneBits/af90e2.wgsl
new file mode 100644
index 0000000..48ea794
--- /dev/null
+++ b/test/builtins/gen/countOneBits/af90e2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn countOneBits(vec<2, i32>) -> vec<2, i32>
+fn countOneBits_af90e2() {
+  var res: vec2<i32> = countOneBits(vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  countOneBits_af90e2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  countOneBits_af90e2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  countOneBits_af90e2();
+}
diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.glsl b/test/builtins/gen/countOneBits/af90e2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.glsl
rename to test/builtins/gen/countOneBits/af90e2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.hlsl b/test/builtins/gen/countOneBits/af90e2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.hlsl
rename to test/builtins/gen/countOneBits/af90e2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.msl b/test/builtins/gen/countOneBits/af90e2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.msl
rename to test/builtins/gen/countOneBits/af90e2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.spvasm b/test/builtins/gen/countOneBits/af90e2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.spvasm
rename to test/builtins/gen/countOneBits/af90e2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.wgsl b/test/builtins/gen/countOneBits/af90e2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.wgsl
rename to test/builtins/gen/countOneBits/af90e2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/countOneBits/fd88b2.wgsl b/test/builtins/gen/countOneBits/fd88b2.wgsl
new file mode 100644
index 0000000..a0f758d
--- /dev/null
+++ b/test/builtins/gen/countOneBits/fd88b2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn countOneBits(i32) -> i32
+fn countOneBits_fd88b2() {
+  var res: i32 = countOneBits(1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  countOneBits_fd88b2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  countOneBits_fd88b2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  countOneBits_fd88b2();
+}
diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.glsl b/test/builtins/gen/countOneBits/fd88b2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.glsl
rename to test/builtins/gen/countOneBits/fd88b2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.hlsl b/test/builtins/gen/countOneBits/fd88b2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.hlsl
rename to test/builtins/gen/countOneBits/fd88b2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.msl b/test/builtins/gen/countOneBits/fd88b2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.msl
rename to test/builtins/gen/countOneBits/fd88b2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.spvasm b/test/builtins/gen/countOneBits/fd88b2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.spvasm
rename to test/builtins/gen/countOneBits/fd88b2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.wgsl b/test/builtins/gen/countOneBits/fd88b2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.wgsl
rename to test/builtins/gen/countOneBits/fd88b2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/cross/041cb0.wgsl b/test/builtins/gen/cross/041cb0.wgsl
new file mode 100644
index 0000000..ce0f043
--- /dev/null
+++ b/test/builtins/gen/cross/041cb0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn cross(vec3<f32>, vec3<f32>) -> vec3<f32>
+fn cross_041cb0() {
+  var res: vec3<f32> = cross(vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cross_041cb0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  cross_041cb0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  cross_041cb0();
+}
diff --git a/test/intrinsics/gen/cross/041cb0.wgsl.expected.glsl b/test/builtins/gen/cross/041cb0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/cross/041cb0.wgsl.expected.glsl
rename to test/builtins/gen/cross/041cb0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/cross/041cb0.wgsl.expected.hlsl b/test/builtins/gen/cross/041cb0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/cross/041cb0.wgsl.expected.hlsl
rename to test/builtins/gen/cross/041cb0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/cross/041cb0.wgsl.expected.msl b/test/builtins/gen/cross/041cb0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/cross/041cb0.wgsl.expected.msl
rename to test/builtins/gen/cross/041cb0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/cross/041cb0.wgsl.expected.spvasm b/test/builtins/gen/cross/041cb0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/cross/041cb0.wgsl.expected.spvasm
rename to test/builtins/gen/cross/041cb0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/cross/041cb0.wgsl.expected.wgsl b/test/builtins/gen/cross/041cb0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/cross/041cb0.wgsl.expected.wgsl
rename to test/builtins/gen/cross/041cb0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/degrees/0d170c.wgsl b/test/builtins/gen/degrees/0d170c.wgsl
new file mode 100644
index 0000000..3dc201e
--- /dev/null
+++ b/test/builtins/gen/degrees/0d170c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn degrees(vec<4, f32>) -> vec<4, f32>
+fn degrees_0d170c() {
+  var res: vec4<f32> = degrees(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_0d170c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  degrees_0d170c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  degrees_0d170c();
+}
diff --git a/test/intrinsics/gen/degrees/0d170c.wgsl.expected.glsl b/test/builtins/gen/degrees/0d170c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/degrees/0d170c.wgsl.expected.glsl
rename to test/builtins/gen/degrees/0d170c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/degrees/0d170c.wgsl.expected.hlsl b/test/builtins/gen/degrees/0d170c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/degrees/0d170c.wgsl.expected.hlsl
rename to test/builtins/gen/degrees/0d170c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/degrees/0d170c.wgsl.expected.msl b/test/builtins/gen/degrees/0d170c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/degrees/0d170c.wgsl.expected.msl
rename to test/builtins/gen/degrees/0d170c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/degrees/0d170c.wgsl.expected.spvasm b/test/builtins/gen/degrees/0d170c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/degrees/0d170c.wgsl.expected.spvasm
rename to test/builtins/gen/degrees/0d170c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/degrees/0d170c.wgsl.expected.wgsl b/test/builtins/gen/degrees/0d170c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/degrees/0d170c.wgsl.expected.wgsl
rename to test/builtins/gen/degrees/0d170c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/degrees/1ad5df.wgsl b/test/builtins/gen/degrees/1ad5df.wgsl
new file mode 100644
index 0000000..d6ec551
--- /dev/null
+++ b/test/builtins/gen/degrees/1ad5df.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn degrees(vec<2, f32>) -> vec<2, f32>
+fn degrees_1ad5df() {
+  var res: vec2<f32> = degrees(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_1ad5df();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  degrees_1ad5df();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  degrees_1ad5df();
+}
diff --git a/test/intrinsics/gen/degrees/1ad5df.wgsl.expected.glsl b/test/builtins/gen/degrees/1ad5df.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/degrees/1ad5df.wgsl.expected.glsl
rename to test/builtins/gen/degrees/1ad5df.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/degrees/1ad5df.wgsl.expected.hlsl b/test/builtins/gen/degrees/1ad5df.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/degrees/1ad5df.wgsl.expected.hlsl
rename to test/builtins/gen/degrees/1ad5df.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/degrees/1ad5df.wgsl.expected.msl b/test/builtins/gen/degrees/1ad5df.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/degrees/1ad5df.wgsl.expected.msl
rename to test/builtins/gen/degrees/1ad5df.wgsl.expected.msl
diff --git a/test/intrinsics/gen/degrees/1ad5df.wgsl.expected.spvasm b/test/builtins/gen/degrees/1ad5df.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/degrees/1ad5df.wgsl.expected.spvasm
rename to test/builtins/gen/degrees/1ad5df.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/degrees/1ad5df.wgsl.expected.wgsl b/test/builtins/gen/degrees/1ad5df.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/degrees/1ad5df.wgsl.expected.wgsl
rename to test/builtins/gen/degrees/1ad5df.wgsl.expected.wgsl
diff --git a/test/builtins/gen/degrees/2af623.wgsl b/test/builtins/gen/degrees/2af623.wgsl
new file mode 100644
index 0000000..55f67d8d
--- /dev/null
+++ b/test/builtins/gen/degrees/2af623.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn degrees(vec<3, f32>) -> vec<3, f32>
+fn degrees_2af623() {
+  var res: vec3<f32> = degrees(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_2af623();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  degrees_2af623();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  degrees_2af623();
+}
diff --git a/test/intrinsics/gen/degrees/2af623.wgsl.expected.glsl b/test/builtins/gen/degrees/2af623.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/degrees/2af623.wgsl.expected.glsl
rename to test/builtins/gen/degrees/2af623.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/degrees/2af623.wgsl.expected.hlsl b/test/builtins/gen/degrees/2af623.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/degrees/2af623.wgsl.expected.hlsl
rename to test/builtins/gen/degrees/2af623.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/degrees/2af623.wgsl.expected.msl b/test/builtins/gen/degrees/2af623.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/degrees/2af623.wgsl.expected.msl
rename to test/builtins/gen/degrees/2af623.wgsl.expected.msl
diff --git a/test/intrinsics/gen/degrees/2af623.wgsl.expected.spvasm b/test/builtins/gen/degrees/2af623.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/degrees/2af623.wgsl.expected.spvasm
rename to test/builtins/gen/degrees/2af623.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/degrees/2af623.wgsl.expected.wgsl b/test/builtins/gen/degrees/2af623.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/degrees/2af623.wgsl.expected.wgsl
rename to test/builtins/gen/degrees/2af623.wgsl.expected.wgsl
diff --git a/test/builtins/gen/degrees/51f705.wgsl b/test/builtins/gen/degrees/51f705.wgsl
new file mode 100644
index 0000000..c55523a
--- /dev/null
+++ b/test/builtins/gen/degrees/51f705.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn degrees(f32) -> f32
+fn degrees_51f705() {
+  var res: f32 = degrees(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_51f705();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  degrees_51f705();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  degrees_51f705();
+}
diff --git a/test/intrinsics/gen/degrees/51f705.wgsl.expected.glsl b/test/builtins/gen/degrees/51f705.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/degrees/51f705.wgsl.expected.glsl
rename to test/builtins/gen/degrees/51f705.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/degrees/51f705.wgsl.expected.hlsl b/test/builtins/gen/degrees/51f705.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/degrees/51f705.wgsl.expected.hlsl
rename to test/builtins/gen/degrees/51f705.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/degrees/51f705.wgsl.expected.msl b/test/builtins/gen/degrees/51f705.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/degrees/51f705.wgsl.expected.msl
rename to test/builtins/gen/degrees/51f705.wgsl.expected.msl
diff --git a/test/intrinsics/gen/degrees/51f705.wgsl.expected.spvasm b/test/builtins/gen/degrees/51f705.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/degrees/51f705.wgsl.expected.spvasm
rename to test/builtins/gen/degrees/51f705.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/degrees/51f705.wgsl.expected.wgsl b/test/builtins/gen/degrees/51f705.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/degrees/51f705.wgsl.expected.wgsl
rename to test/builtins/gen/degrees/51f705.wgsl.expected.wgsl
diff --git a/test/builtins/gen/determinant/2b62ba.wgsl b/test/builtins/gen/determinant/2b62ba.wgsl
new file mode 100644
index 0000000..7189a45
--- /dev/null
+++ b/test/builtins/gen/determinant/2b62ba.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn determinant(mat<3, 3, f32>) -> f32
+fn determinant_2b62ba() {
+  var res: f32 = determinant(mat3x3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  determinant_2b62ba();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  determinant_2b62ba();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  determinant_2b62ba();
+}
diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.glsl b/test/builtins/gen/determinant/2b62ba.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/determinant/2b62ba.wgsl.expected.glsl
rename to test/builtins/gen/determinant/2b62ba.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.hlsl b/test/builtins/gen/determinant/2b62ba.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/determinant/2b62ba.wgsl.expected.hlsl
rename to test/builtins/gen/determinant/2b62ba.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.msl b/test/builtins/gen/determinant/2b62ba.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/determinant/2b62ba.wgsl.expected.msl
rename to test/builtins/gen/determinant/2b62ba.wgsl.expected.msl
diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.spvasm b/test/builtins/gen/determinant/2b62ba.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/determinant/2b62ba.wgsl.expected.spvasm
rename to test/builtins/gen/determinant/2b62ba.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.wgsl b/test/builtins/gen/determinant/2b62ba.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/determinant/2b62ba.wgsl.expected.wgsl
rename to test/builtins/gen/determinant/2b62ba.wgsl.expected.wgsl
diff --git a/test/builtins/gen/determinant/a0a87c.wgsl b/test/builtins/gen/determinant/a0a87c.wgsl
new file mode 100644
index 0000000..31873fa
--- /dev/null
+++ b/test/builtins/gen/determinant/a0a87c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn determinant(mat<4, 4, f32>) -> f32
+fn determinant_a0a87c() {
+  var res: f32 = determinant(mat4x4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  determinant_a0a87c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  determinant_a0a87c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  determinant_a0a87c();
+}
diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.glsl b/test/builtins/gen/determinant/a0a87c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/determinant/a0a87c.wgsl.expected.glsl
rename to test/builtins/gen/determinant/a0a87c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.hlsl b/test/builtins/gen/determinant/a0a87c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/determinant/a0a87c.wgsl.expected.hlsl
rename to test/builtins/gen/determinant/a0a87c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.msl b/test/builtins/gen/determinant/a0a87c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/determinant/a0a87c.wgsl.expected.msl
rename to test/builtins/gen/determinant/a0a87c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.spvasm b/test/builtins/gen/determinant/a0a87c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/determinant/a0a87c.wgsl.expected.spvasm
rename to test/builtins/gen/determinant/a0a87c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.wgsl b/test/builtins/gen/determinant/a0a87c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/determinant/a0a87c.wgsl.expected.wgsl
rename to test/builtins/gen/determinant/a0a87c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/determinant/e19305.wgsl b/test/builtins/gen/determinant/e19305.wgsl
new file mode 100644
index 0000000..7b3329e
--- /dev/null
+++ b/test/builtins/gen/determinant/e19305.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn determinant(mat<2, 2, f32>) -> f32
+fn determinant_e19305() {
+  var res: f32 = determinant(mat2x2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  determinant_e19305();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  determinant_e19305();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  determinant_e19305();
+}
diff --git a/test/intrinsics/gen/determinant/e19305.wgsl.expected.glsl b/test/builtins/gen/determinant/e19305.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/determinant/e19305.wgsl.expected.glsl
rename to test/builtins/gen/determinant/e19305.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/determinant/e19305.wgsl.expected.hlsl b/test/builtins/gen/determinant/e19305.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/determinant/e19305.wgsl.expected.hlsl
rename to test/builtins/gen/determinant/e19305.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/determinant/e19305.wgsl.expected.msl b/test/builtins/gen/determinant/e19305.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/determinant/e19305.wgsl.expected.msl
rename to test/builtins/gen/determinant/e19305.wgsl.expected.msl
diff --git a/test/intrinsics/gen/determinant/e19305.wgsl.expected.spvasm b/test/builtins/gen/determinant/e19305.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/determinant/e19305.wgsl.expected.spvasm
rename to test/builtins/gen/determinant/e19305.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/determinant/e19305.wgsl.expected.wgsl b/test/builtins/gen/determinant/e19305.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/determinant/e19305.wgsl.expected.wgsl
rename to test/builtins/gen/determinant/e19305.wgsl.expected.wgsl
diff --git a/test/builtins/gen/distance/0657d4.wgsl b/test/builtins/gen/distance/0657d4.wgsl
new file mode 100644
index 0000000..73d4596
--- /dev/null
+++ b/test/builtins/gen/distance/0657d4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn distance(vec<3, f32>, vec<3, f32>) -> f32
+fn distance_0657d4() {
+  var res: f32 = distance(vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_0657d4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  distance_0657d4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  distance_0657d4();
+}
diff --git a/test/intrinsics/gen/distance/0657d4.wgsl.expected.glsl b/test/builtins/gen/distance/0657d4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/distance/0657d4.wgsl.expected.glsl
rename to test/builtins/gen/distance/0657d4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/distance/0657d4.wgsl.expected.hlsl b/test/builtins/gen/distance/0657d4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/distance/0657d4.wgsl.expected.hlsl
rename to test/builtins/gen/distance/0657d4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/distance/0657d4.wgsl.expected.msl b/test/builtins/gen/distance/0657d4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/distance/0657d4.wgsl.expected.msl
rename to test/builtins/gen/distance/0657d4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/distance/0657d4.wgsl.expected.spvasm b/test/builtins/gen/distance/0657d4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/distance/0657d4.wgsl.expected.spvasm
rename to test/builtins/gen/distance/0657d4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/distance/0657d4.wgsl.expected.wgsl b/test/builtins/gen/distance/0657d4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/distance/0657d4.wgsl.expected.wgsl
rename to test/builtins/gen/distance/0657d4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/distance/9646ea.wgsl b/test/builtins/gen/distance/9646ea.wgsl
new file mode 100644
index 0000000..da013ae
--- /dev/null
+++ b/test/builtins/gen/distance/9646ea.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn distance(vec<4, f32>, vec<4, f32>) -> f32
+fn distance_9646ea() {
+  var res: f32 = distance(vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_9646ea();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  distance_9646ea();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  distance_9646ea();
+}
diff --git a/test/intrinsics/gen/distance/9646ea.wgsl.expected.glsl b/test/builtins/gen/distance/9646ea.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/distance/9646ea.wgsl.expected.glsl
rename to test/builtins/gen/distance/9646ea.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/distance/9646ea.wgsl.expected.hlsl b/test/builtins/gen/distance/9646ea.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/distance/9646ea.wgsl.expected.hlsl
rename to test/builtins/gen/distance/9646ea.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/distance/9646ea.wgsl.expected.msl b/test/builtins/gen/distance/9646ea.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/distance/9646ea.wgsl.expected.msl
rename to test/builtins/gen/distance/9646ea.wgsl.expected.msl
diff --git a/test/intrinsics/gen/distance/9646ea.wgsl.expected.spvasm b/test/builtins/gen/distance/9646ea.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/distance/9646ea.wgsl.expected.spvasm
rename to test/builtins/gen/distance/9646ea.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/distance/9646ea.wgsl.expected.wgsl b/test/builtins/gen/distance/9646ea.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/distance/9646ea.wgsl.expected.wgsl
rename to test/builtins/gen/distance/9646ea.wgsl.expected.wgsl
diff --git a/test/builtins/gen/distance/aa4055.wgsl b/test/builtins/gen/distance/aa4055.wgsl
new file mode 100644
index 0000000..bce51c6
--- /dev/null
+++ b/test/builtins/gen/distance/aa4055.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn distance(vec<2, f32>, vec<2, f32>) -> f32
+fn distance_aa4055() {
+  var res: f32 = distance(vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_aa4055();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  distance_aa4055();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  distance_aa4055();
+}
diff --git a/test/intrinsics/gen/distance/aa4055.wgsl.expected.glsl b/test/builtins/gen/distance/aa4055.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/distance/aa4055.wgsl.expected.glsl
rename to test/builtins/gen/distance/aa4055.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/distance/aa4055.wgsl.expected.hlsl b/test/builtins/gen/distance/aa4055.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/distance/aa4055.wgsl.expected.hlsl
rename to test/builtins/gen/distance/aa4055.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/distance/aa4055.wgsl.expected.msl b/test/builtins/gen/distance/aa4055.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/distance/aa4055.wgsl.expected.msl
rename to test/builtins/gen/distance/aa4055.wgsl.expected.msl
diff --git a/test/intrinsics/gen/distance/aa4055.wgsl.expected.spvasm b/test/builtins/gen/distance/aa4055.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/distance/aa4055.wgsl.expected.spvasm
rename to test/builtins/gen/distance/aa4055.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/distance/aa4055.wgsl.expected.wgsl b/test/builtins/gen/distance/aa4055.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/distance/aa4055.wgsl.expected.wgsl
rename to test/builtins/gen/distance/aa4055.wgsl.expected.wgsl
diff --git a/test/builtins/gen/distance/cfed73.wgsl b/test/builtins/gen/distance/cfed73.wgsl
new file mode 100644
index 0000000..9ad9a81
--- /dev/null
+++ b/test/builtins/gen/distance/cfed73.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn distance(f32, f32) -> f32
+fn distance_cfed73() {
+  var res: f32 = distance(1.0, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_cfed73();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  distance_cfed73();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  distance_cfed73();
+}
diff --git a/test/intrinsics/gen/distance/cfed73.wgsl.expected.glsl b/test/builtins/gen/distance/cfed73.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/distance/cfed73.wgsl.expected.glsl
rename to test/builtins/gen/distance/cfed73.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/distance/cfed73.wgsl.expected.hlsl b/test/builtins/gen/distance/cfed73.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/distance/cfed73.wgsl.expected.hlsl
rename to test/builtins/gen/distance/cfed73.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/distance/cfed73.wgsl.expected.msl b/test/builtins/gen/distance/cfed73.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/distance/cfed73.wgsl.expected.msl
rename to test/builtins/gen/distance/cfed73.wgsl.expected.msl
diff --git a/test/intrinsics/gen/distance/cfed73.wgsl.expected.spvasm b/test/builtins/gen/distance/cfed73.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/distance/cfed73.wgsl.expected.spvasm
rename to test/builtins/gen/distance/cfed73.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/distance/cfed73.wgsl.expected.wgsl b/test/builtins/gen/distance/cfed73.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/distance/cfed73.wgsl.expected.wgsl
rename to test/builtins/gen/distance/cfed73.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dot/0c577b.wgsl b/test/builtins/gen/dot/0c577b.wgsl
new file mode 100644
index 0000000..0724d16
--- /dev/null
+++ b/test/builtins/gen/dot/0c577b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dot(vec<4, f32>, vec<4, f32>) -> f32
+fn dot_0c577b() {
+  var res: f32 = dot(vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_0c577b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dot_0c577b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  dot_0c577b();
+}
diff --git a/test/intrinsics/gen/dot/0c577b.wgsl.expected.glsl b/test/builtins/gen/dot/0c577b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dot/0c577b.wgsl.expected.glsl
rename to test/builtins/gen/dot/0c577b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dot/0c577b.wgsl.expected.hlsl b/test/builtins/gen/dot/0c577b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dot/0c577b.wgsl.expected.hlsl
rename to test/builtins/gen/dot/0c577b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dot/0c577b.wgsl.expected.msl b/test/builtins/gen/dot/0c577b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dot/0c577b.wgsl.expected.msl
rename to test/builtins/gen/dot/0c577b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dot/0c577b.wgsl.expected.spvasm b/test/builtins/gen/dot/0c577b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dot/0c577b.wgsl.expected.spvasm
rename to test/builtins/gen/dot/0c577b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dot/0c577b.wgsl.expected.wgsl b/test/builtins/gen/dot/0c577b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dot/0c577b.wgsl.expected.wgsl
rename to test/builtins/gen/dot/0c577b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dot/7548a0.wgsl b/test/builtins/gen/dot/7548a0.wgsl
new file mode 100644
index 0000000..647c3a7
--- /dev/null
+++ b/test/builtins/gen/dot/7548a0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dot(vec<3, u32>, vec<3, u32>) -> u32
+fn dot_7548a0() {
+  var res: u32 = dot(vec3<u32>(), vec3<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_7548a0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dot_7548a0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  dot_7548a0();
+}
diff --git a/test/intrinsics/gen/dot/7548a0.wgsl.expected.glsl b/test/builtins/gen/dot/7548a0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dot/7548a0.wgsl.expected.glsl
rename to test/builtins/gen/dot/7548a0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dot/7548a0.wgsl.expected.hlsl b/test/builtins/gen/dot/7548a0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dot/7548a0.wgsl.expected.hlsl
rename to test/builtins/gen/dot/7548a0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dot/7548a0.wgsl.expected.msl b/test/builtins/gen/dot/7548a0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dot/7548a0.wgsl.expected.msl
rename to test/builtins/gen/dot/7548a0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dot/7548a0.wgsl.expected.spvasm b/test/builtins/gen/dot/7548a0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dot/7548a0.wgsl.expected.spvasm
rename to test/builtins/gen/dot/7548a0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dot/7548a0.wgsl.expected.wgsl b/test/builtins/gen/dot/7548a0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dot/7548a0.wgsl.expected.wgsl
rename to test/builtins/gen/dot/7548a0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dot/883f0e.wgsl b/test/builtins/gen/dot/883f0e.wgsl
new file mode 100644
index 0000000..4b8db17
--- /dev/null
+++ b/test/builtins/gen/dot/883f0e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dot(vec<2, f32>, vec<2, f32>) -> f32
+fn dot_883f0e() {
+  var res: f32 = dot(vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_883f0e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dot_883f0e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  dot_883f0e();
+}
diff --git a/test/intrinsics/gen/dot/883f0e.wgsl.expected.glsl b/test/builtins/gen/dot/883f0e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dot/883f0e.wgsl.expected.glsl
rename to test/builtins/gen/dot/883f0e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dot/883f0e.wgsl.expected.hlsl b/test/builtins/gen/dot/883f0e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dot/883f0e.wgsl.expected.hlsl
rename to test/builtins/gen/dot/883f0e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dot/883f0e.wgsl.expected.msl b/test/builtins/gen/dot/883f0e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dot/883f0e.wgsl.expected.msl
rename to test/builtins/gen/dot/883f0e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dot/883f0e.wgsl.expected.spvasm b/test/builtins/gen/dot/883f0e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dot/883f0e.wgsl.expected.spvasm
rename to test/builtins/gen/dot/883f0e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dot/883f0e.wgsl.expected.wgsl b/test/builtins/gen/dot/883f0e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dot/883f0e.wgsl.expected.wgsl
rename to test/builtins/gen/dot/883f0e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dot/97c7ee.wgsl b/test/builtins/gen/dot/97c7ee.wgsl
new file mode 100644
index 0000000..5dc7481
--- /dev/null
+++ b/test/builtins/gen/dot/97c7ee.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dot(vec<2, u32>, vec<2, u32>) -> u32
+fn dot_97c7ee() {
+  var res: u32 = dot(vec2<u32>(), vec2<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_97c7ee();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dot_97c7ee();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  dot_97c7ee();
+}
diff --git a/test/intrinsics/gen/dot/97c7ee.wgsl.expected.glsl b/test/builtins/gen/dot/97c7ee.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dot/97c7ee.wgsl.expected.glsl
rename to test/builtins/gen/dot/97c7ee.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dot/97c7ee.wgsl.expected.hlsl b/test/builtins/gen/dot/97c7ee.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dot/97c7ee.wgsl.expected.hlsl
rename to test/builtins/gen/dot/97c7ee.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dot/97c7ee.wgsl.expected.msl b/test/builtins/gen/dot/97c7ee.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dot/97c7ee.wgsl.expected.msl
rename to test/builtins/gen/dot/97c7ee.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dot/97c7ee.wgsl.expected.spvasm b/test/builtins/gen/dot/97c7ee.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dot/97c7ee.wgsl.expected.spvasm
rename to test/builtins/gen/dot/97c7ee.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dot/97c7ee.wgsl.expected.wgsl b/test/builtins/gen/dot/97c7ee.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dot/97c7ee.wgsl.expected.wgsl
rename to test/builtins/gen/dot/97c7ee.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dot/ba4246.wgsl b/test/builtins/gen/dot/ba4246.wgsl
new file mode 100644
index 0000000..cc7bb12
--- /dev/null
+++ b/test/builtins/gen/dot/ba4246.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dot(vec<3, f32>, vec<3, f32>) -> f32
+fn dot_ba4246() {
+  var res: f32 = dot(vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_ba4246();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dot_ba4246();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  dot_ba4246();
+}
diff --git a/test/intrinsics/gen/dot/ba4246.wgsl.expected.glsl b/test/builtins/gen/dot/ba4246.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dot/ba4246.wgsl.expected.glsl
rename to test/builtins/gen/dot/ba4246.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dot/ba4246.wgsl.expected.hlsl b/test/builtins/gen/dot/ba4246.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dot/ba4246.wgsl.expected.hlsl
rename to test/builtins/gen/dot/ba4246.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dot/ba4246.wgsl.expected.msl b/test/builtins/gen/dot/ba4246.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dot/ba4246.wgsl.expected.msl
rename to test/builtins/gen/dot/ba4246.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dot/ba4246.wgsl.expected.spvasm b/test/builtins/gen/dot/ba4246.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dot/ba4246.wgsl.expected.spvasm
rename to test/builtins/gen/dot/ba4246.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dot/ba4246.wgsl.expected.wgsl b/test/builtins/gen/dot/ba4246.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dot/ba4246.wgsl.expected.wgsl
rename to test/builtins/gen/dot/ba4246.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dot/e994c7.wgsl b/test/builtins/gen/dot/e994c7.wgsl
new file mode 100644
index 0000000..2fbaa28
--- /dev/null
+++ b/test/builtins/gen/dot/e994c7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dot(vec<4, u32>, vec<4, u32>) -> u32
+fn dot_e994c7() {
+  var res: u32 = dot(vec4<u32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_e994c7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dot_e994c7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  dot_e994c7();
+}
diff --git a/test/intrinsics/gen/dot/e994c7.wgsl.expected.glsl b/test/builtins/gen/dot/e994c7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dot/e994c7.wgsl.expected.glsl
rename to test/builtins/gen/dot/e994c7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dot/e994c7.wgsl.expected.hlsl b/test/builtins/gen/dot/e994c7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dot/e994c7.wgsl.expected.hlsl
rename to test/builtins/gen/dot/e994c7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dot/e994c7.wgsl.expected.msl b/test/builtins/gen/dot/e994c7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dot/e994c7.wgsl.expected.msl
rename to test/builtins/gen/dot/e994c7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dot/e994c7.wgsl.expected.spvasm b/test/builtins/gen/dot/e994c7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dot/e994c7.wgsl.expected.spvasm
rename to test/builtins/gen/dot/e994c7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dot/e994c7.wgsl.expected.wgsl b/test/builtins/gen/dot/e994c7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dot/e994c7.wgsl.expected.wgsl
rename to test/builtins/gen/dot/e994c7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dot/ef6b1d.wgsl b/test/builtins/gen/dot/ef6b1d.wgsl
new file mode 100644
index 0000000..3a39735
--- /dev/null
+++ b/test/builtins/gen/dot/ef6b1d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dot(vec<4, i32>, vec<4, i32>) -> i32
+fn dot_ef6b1d() {
+  var res: i32 = dot(vec4<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_ef6b1d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dot_ef6b1d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  dot_ef6b1d();
+}
diff --git a/test/intrinsics/gen/dot/ef6b1d.wgsl.expected.glsl b/test/builtins/gen/dot/ef6b1d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dot/ef6b1d.wgsl.expected.glsl
rename to test/builtins/gen/dot/ef6b1d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dot/ef6b1d.wgsl.expected.hlsl b/test/builtins/gen/dot/ef6b1d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dot/ef6b1d.wgsl.expected.hlsl
rename to test/builtins/gen/dot/ef6b1d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dot/ef6b1d.wgsl.expected.msl b/test/builtins/gen/dot/ef6b1d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dot/ef6b1d.wgsl.expected.msl
rename to test/builtins/gen/dot/ef6b1d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dot/ef6b1d.wgsl.expected.spvasm b/test/builtins/gen/dot/ef6b1d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dot/ef6b1d.wgsl.expected.spvasm
rename to test/builtins/gen/dot/ef6b1d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dot/ef6b1d.wgsl.expected.wgsl b/test/builtins/gen/dot/ef6b1d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dot/ef6b1d.wgsl.expected.wgsl
rename to test/builtins/gen/dot/ef6b1d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dot/f1312c.wgsl b/test/builtins/gen/dot/f1312c.wgsl
new file mode 100644
index 0000000..22e38b1
--- /dev/null
+++ b/test/builtins/gen/dot/f1312c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dot(vec<3, i32>, vec<3, i32>) -> i32
+fn dot_f1312c() {
+  var res: i32 = dot(vec3<i32>(), vec3<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_f1312c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dot_f1312c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  dot_f1312c();
+}
diff --git a/test/intrinsics/gen/dot/f1312c.wgsl.expected.glsl b/test/builtins/gen/dot/f1312c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dot/f1312c.wgsl.expected.glsl
rename to test/builtins/gen/dot/f1312c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dot/f1312c.wgsl.expected.hlsl b/test/builtins/gen/dot/f1312c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dot/f1312c.wgsl.expected.hlsl
rename to test/builtins/gen/dot/f1312c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dot/f1312c.wgsl.expected.msl b/test/builtins/gen/dot/f1312c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dot/f1312c.wgsl.expected.msl
rename to test/builtins/gen/dot/f1312c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dot/f1312c.wgsl.expected.spvasm b/test/builtins/gen/dot/f1312c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dot/f1312c.wgsl.expected.spvasm
rename to test/builtins/gen/dot/f1312c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dot/f1312c.wgsl.expected.wgsl b/test/builtins/gen/dot/f1312c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dot/f1312c.wgsl.expected.wgsl
rename to test/builtins/gen/dot/f1312c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dot/fc5f7c.wgsl b/test/builtins/gen/dot/fc5f7c.wgsl
new file mode 100644
index 0000000..dda5044
--- /dev/null
+++ b/test/builtins/gen/dot/fc5f7c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dot(vec<2, i32>, vec<2, i32>) -> i32
+fn dot_fc5f7c() {
+  var res: i32 = dot(vec2<i32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_fc5f7c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dot_fc5f7c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  dot_fc5f7c();
+}
diff --git a/test/intrinsics/gen/dot/fc5f7c.wgsl.expected.glsl b/test/builtins/gen/dot/fc5f7c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dot/fc5f7c.wgsl.expected.glsl
rename to test/builtins/gen/dot/fc5f7c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dot/fc5f7c.wgsl.expected.hlsl b/test/builtins/gen/dot/fc5f7c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dot/fc5f7c.wgsl.expected.hlsl
rename to test/builtins/gen/dot/fc5f7c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dot/fc5f7c.wgsl.expected.msl b/test/builtins/gen/dot/fc5f7c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dot/fc5f7c.wgsl.expected.msl
rename to test/builtins/gen/dot/fc5f7c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dot/fc5f7c.wgsl.expected.spvasm b/test/builtins/gen/dot/fc5f7c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dot/fc5f7c.wgsl.expected.spvasm
rename to test/builtins/gen/dot/fc5f7c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dot/fc5f7c.wgsl.expected.wgsl b/test/builtins/gen/dot/fc5f7c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dot/fc5f7c.wgsl.expected.wgsl
rename to test/builtins/gen/dot/fc5f7c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdx/0763f7.wgsl b/test/builtins/gen/dpdx/0763f7.wgsl
new file mode 100644
index 0000000..003e03f
--- /dev/null
+++ b/test/builtins/gen/dpdx/0763f7.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdx(vec<3, f32>) -> vec<3, f32>
+fn dpdx_0763f7() {
+  var res: vec3<f32> = dpdx(vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdx_0763f7();
+}
diff --git a/test/intrinsics/gen/dpdx/0763f7.wgsl.expected.glsl b/test/builtins/gen/dpdx/0763f7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/0763f7.wgsl.expected.glsl
rename to test/builtins/gen/dpdx/0763f7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdx/0763f7.wgsl.expected.hlsl b/test/builtins/gen/dpdx/0763f7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/0763f7.wgsl.expected.hlsl
rename to test/builtins/gen/dpdx/0763f7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdx/0763f7.wgsl.expected.msl b/test/builtins/gen/dpdx/0763f7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdx/0763f7.wgsl.expected.msl
rename to test/builtins/gen/dpdx/0763f7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdx/0763f7.wgsl.expected.spvasm b/test/builtins/gen/dpdx/0763f7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdx/0763f7.wgsl.expected.spvasm
rename to test/builtins/gen/dpdx/0763f7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdx/0763f7.wgsl.expected.wgsl b/test/builtins/gen/dpdx/0763f7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/0763f7.wgsl.expected.wgsl
rename to test/builtins/gen/dpdx/0763f7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdx/99edb1.wgsl b/test/builtins/gen/dpdx/99edb1.wgsl
new file mode 100644
index 0000000..59f8956
--- /dev/null
+++ b/test/builtins/gen/dpdx/99edb1.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdx(vec<2, f32>) -> vec<2, f32>
+fn dpdx_99edb1() {
+  var res: vec2<f32> = dpdx(vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdx_99edb1();
+}
diff --git a/test/intrinsics/gen/dpdx/99edb1.wgsl.expected.glsl b/test/builtins/gen/dpdx/99edb1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/99edb1.wgsl.expected.glsl
rename to test/builtins/gen/dpdx/99edb1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdx/99edb1.wgsl.expected.hlsl b/test/builtins/gen/dpdx/99edb1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/99edb1.wgsl.expected.hlsl
rename to test/builtins/gen/dpdx/99edb1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdx/99edb1.wgsl.expected.msl b/test/builtins/gen/dpdx/99edb1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdx/99edb1.wgsl.expected.msl
rename to test/builtins/gen/dpdx/99edb1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdx/99edb1.wgsl.expected.spvasm b/test/builtins/gen/dpdx/99edb1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdx/99edb1.wgsl.expected.spvasm
rename to test/builtins/gen/dpdx/99edb1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdx/99edb1.wgsl.expected.wgsl b/test/builtins/gen/dpdx/99edb1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/99edb1.wgsl.expected.wgsl
rename to test/builtins/gen/dpdx/99edb1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdx/c487fa.wgsl b/test/builtins/gen/dpdx/c487fa.wgsl
new file mode 100644
index 0000000..289a97d
--- /dev/null
+++ b/test/builtins/gen/dpdx/c487fa.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdx(vec<4, f32>) -> vec<4, f32>
+fn dpdx_c487fa() {
+  var res: vec4<f32> = dpdx(vec4<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdx_c487fa();
+}
diff --git a/test/intrinsics/gen/dpdx/c487fa.wgsl.expected.glsl b/test/builtins/gen/dpdx/c487fa.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/c487fa.wgsl.expected.glsl
rename to test/builtins/gen/dpdx/c487fa.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdx/c487fa.wgsl.expected.hlsl b/test/builtins/gen/dpdx/c487fa.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/c487fa.wgsl.expected.hlsl
rename to test/builtins/gen/dpdx/c487fa.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdx/c487fa.wgsl.expected.msl b/test/builtins/gen/dpdx/c487fa.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdx/c487fa.wgsl.expected.msl
rename to test/builtins/gen/dpdx/c487fa.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdx/c487fa.wgsl.expected.spvasm b/test/builtins/gen/dpdx/c487fa.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdx/c487fa.wgsl.expected.spvasm
rename to test/builtins/gen/dpdx/c487fa.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdx/c487fa.wgsl.expected.wgsl b/test/builtins/gen/dpdx/c487fa.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/c487fa.wgsl.expected.wgsl
rename to test/builtins/gen/dpdx/c487fa.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdx/e263de.wgsl b/test/builtins/gen/dpdx/e263de.wgsl
new file mode 100644
index 0000000..ff46515
--- /dev/null
+++ b/test/builtins/gen/dpdx/e263de.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdx(f32) -> f32
+fn dpdx_e263de() {
+  var res: f32 = dpdx(1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdx_e263de();
+}
diff --git a/test/intrinsics/gen/dpdx/e263de.wgsl.expected.glsl b/test/builtins/gen/dpdx/e263de.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/e263de.wgsl.expected.glsl
rename to test/builtins/gen/dpdx/e263de.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdx/e263de.wgsl.expected.hlsl b/test/builtins/gen/dpdx/e263de.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/e263de.wgsl.expected.hlsl
rename to test/builtins/gen/dpdx/e263de.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdx/e263de.wgsl.expected.msl b/test/builtins/gen/dpdx/e263de.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdx/e263de.wgsl.expected.msl
rename to test/builtins/gen/dpdx/e263de.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdx/e263de.wgsl.expected.spvasm b/test/builtins/gen/dpdx/e263de.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdx/e263de.wgsl.expected.spvasm
rename to test/builtins/gen/dpdx/e263de.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdx/e263de.wgsl.expected.wgsl b/test/builtins/gen/dpdx/e263de.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdx/e263de.wgsl.expected.wgsl
rename to test/builtins/gen/dpdx/e263de.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdxCoarse/029152.wgsl b/test/builtins/gen/dpdxCoarse/029152.wgsl
new file mode 100644
index 0000000..7792ffa
--- /dev/null
+++ b/test/builtins/gen/dpdxCoarse/029152.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdxCoarse(f32) -> f32
+fn dpdxCoarse_029152() {
+  var res: f32 = dpdxCoarse(1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdxCoarse_029152();
+}
diff --git a/test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.glsl b/test/builtins/gen/dpdxCoarse/029152.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.glsl
rename to test/builtins/gen/dpdxCoarse/029152.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.hlsl b/test/builtins/gen/dpdxCoarse/029152.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.hlsl
rename to test/builtins/gen/dpdxCoarse/029152.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.msl b/test/builtins/gen/dpdxCoarse/029152.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.msl
rename to test/builtins/gen/dpdxCoarse/029152.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.spvasm b/test/builtins/gen/dpdxCoarse/029152.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.spvasm
rename to test/builtins/gen/dpdxCoarse/029152.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.wgsl b/test/builtins/gen/dpdxCoarse/029152.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.wgsl
rename to test/builtins/gen/dpdxCoarse/029152.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdxCoarse/9581cf.wgsl b/test/builtins/gen/dpdxCoarse/9581cf.wgsl
new file mode 100644
index 0000000..2a08179
--- /dev/null
+++ b/test/builtins/gen/dpdxCoarse/9581cf.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdxCoarse(vec<2, f32>) -> vec<2, f32>
+fn dpdxCoarse_9581cf() {
+  var res: vec2<f32> = dpdxCoarse(vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdxCoarse_9581cf();
+}
diff --git a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.glsl b/test/builtins/gen/dpdxCoarse/9581cf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.glsl
rename to test/builtins/gen/dpdxCoarse/9581cf.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.hlsl b/test/builtins/gen/dpdxCoarse/9581cf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.hlsl
rename to test/builtins/gen/dpdxCoarse/9581cf.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.msl b/test/builtins/gen/dpdxCoarse/9581cf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.msl
rename to test/builtins/gen/dpdxCoarse/9581cf.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.spvasm b/test/builtins/gen/dpdxCoarse/9581cf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.spvasm
rename to test/builtins/gen/dpdxCoarse/9581cf.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.wgsl b/test/builtins/gen/dpdxCoarse/9581cf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.wgsl
rename to test/builtins/gen/dpdxCoarse/9581cf.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdxCoarse/c28641.wgsl b/test/builtins/gen/dpdxCoarse/c28641.wgsl
new file mode 100644
index 0000000..3fe013e
--- /dev/null
+++ b/test/builtins/gen/dpdxCoarse/c28641.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdxCoarse(vec<4, f32>) -> vec<4, f32>
+fn dpdxCoarse_c28641() {
+  var res: vec4<f32> = dpdxCoarse(vec4<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdxCoarse_c28641();
+}
diff --git a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.glsl b/test/builtins/gen/dpdxCoarse/c28641.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.glsl
rename to test/builtins/gen/dpdxCoarse/c28641.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.hlsl b/test/builtins/gen/dpdxCoarse/c28641.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.hlsl
rename to test/builtins/gen/dpdxCoarse/c28641.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.msl b/test/builtins/gen/dpdxCoarse/c28641.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.msl
rename to test/builtins/gen/dpdxCoarse/c28641.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.spvasm b/test/builtins/gen/dpdxCoarse/c28641.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.spvasm
rename to test/builtins/gen/dpdxCoarse/c28641.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.wgsl b/test/builtins/gen/dpdxCoarse/c28641.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.wgsl
rename to test/builtins/gen/dpdxCoarse/c28641.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdxCoarse/f64d7b.wgsl b/test/builtins/gen/dpdxCoarse/f64d7b.wgsl
new file mode 100644
index 0000000..e5543ea
--- /dev/null
+++ b/test/builtins/gen/dpdxCoarse/f64d7b.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdxCoarse(vec<3, f32>) -> vec<3, f32>
+fn dpdxCoarse_f64d7b() {
+  var res: vec3<f32> = dpdxCoarse(vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdxCoarse_f64d7b();
+}
diff --git a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.glsl b/test/builtins/gen/dpdxCoarse/f64d7b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.glsl
rename to test/builtins/gen/dpdxCoarse/f64d7b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.hlsl b/test/builtins/gen/dpdxCoarse/f64d7b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.hlsl
rename to test/builtins/gen/dpdxCoarse/f64d7b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.msl b/test/builtins/gen/dpdxCoarse/f64d7b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.msl
rename to test/builtins/gen/dpdxCoarse/f64d7b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.spvasm b/test/builtins/gen/dpdxCoarse/f64d7b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.spvasm
rename to test/builtins/gen/dpdxCoarse/f64d7b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.wgsl b/test/builtins/gen/dpdxCoarse/f64d7b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.wgsl
rename to test/builtins/gen/dpdxCoarse/f64d7b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdxFine/8c5069.wgsl b/test/builtins/gen/dpdxFine/8c5069.wgsl
new file mode 100644
index 0000000..a19dccd
--- /dev/null
+++ b/test/builtins/gen/dpdxFine/8c5069.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdxFine(vec<4, f32>) -> vec<4, f32>
+fn dpdxFine_8c5069() {
+  var res: vec4<f32> = dpdxFine(vec4<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdxFine_8c5069();
+}
diff --git a/test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.glsl b/test/builtins/gen/dpdxFine/8c5069.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.glsl
rename to test/builtins/gen/dpdxFine/8c5069.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.hlsl b/test/builtins/gen/dpdxFine/8c5069.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.hlsl
rename to test/builtins/gen/dpdxFine/8c5069.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.msl b/test/builtins/gen/dpdxFine/8c5069.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.msl
rename to test/builtins/gen/dpdxFine/8c5069.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.spvasm b/test/builtins/gen/dpdxFine/8c5069.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.spvasm
rename to test/builtins/gen/dpdxFine/8c5069.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.wgsl b/test/builtins/gen/dpdxFine/8c5069.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.wgsl
rename to test/builtins/gen/dpdxFine/8c5069.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdxFine/9631de.wgsl b/test/builtins/gen/dpdxFine/9631de.wgsl
new file mode 100644
index 0000000..1c1c50d
--- /dev/null
+++ b/test/builtins/gen/dpdxFine/9631de.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdxFine(vec<2, f32>) -> vec<2, f32>
+fn dpdxFine_9631de() {
+  var res: vec2<f32> = dpdxFine(vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdxFine_9631de();
+}
diff --git a/test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.glsl b/test/builtins/gen/dpdxFine/9631de.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.glsl
rename to test/builtins/gen/dpdxFine/9631de.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.hlsl b/test/builtins/gen/dpdxFine/9631de.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.hlsl
rename to test/builtins/gen/dpdxFine/9631de.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.msl b/test/builtins/gen/dpdxFine/9631de.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.msl
rename to test/builtins/gen/dpdxFine/9631de.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.spvasm b/test/builtins/gen/dpdxFine/9631de.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.spvasm
rename to test/builtins/gen/dpdxFine/9631de.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.wgsl b/test/builtins/gen/dpdxFine/9631de.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.wgsl
rename to test/builtins/gen/dpdxFine/9631de.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdxFine/f401a2.wgsl b/test/builtins/gen/dpdxFine/f401a2.wgsl
new file mode 100644
index 0000000..d501e7a
--- /dev/null
+++ b/test/builtins/gen/dpdxFine/f401a2.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdxFine(f32) -> f32
+fn dpdxFine_f401a2() {
+  var res: f32 = dpdxFine(1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdxFine_f401a2();
+}
diff --git a/test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.glsl b/test/builtins/gen/dpdxFine/f401a2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.glsl
rename to test/builtins/gen/dpdxFine/f401a2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.hlsl b/test/builtins/gen/dpdxFine/f401a2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.hlsl
rename to test/builtins/gen/dpdxFine/f401a2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.msl b/test/builtins/gen/dpdxFine/f401a2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.msl
rename to test/builtins/gen/dpdxFine/f401a2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.spvasm b/test/builtins/gen/dpdxFine/f401a2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.spvasm
rename to test/builtins/gen/dpdxFine/f401a2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.wgsl b/test/builtins/gen/dpdxFine/f401a2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.wgsl
rename to test/builtins/gen/dpdxFine/f401a2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdxFine/f92fb6.wgsl b/test/builtins/gen/dpdxFine/f92fb6.wgsl
new file mode 100644
index 0000000..99f58b7
--- /dev/null
+++ b/test/builtins/gen/dpdxFine/f92fb6.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdxFine(vec<3, f32>) -> vec<3, f32>
+fn dpdxFine_f92fb6() {
+  var res: vec3<f32> = dpdxFine(vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdxFine_f92fb6();
+}
diff --git a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.glsl b/test/builtins/gen/dpdxFine/f92fb6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.glsl
rename to test/builtins/gen/dpdxFine/f92fb6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.hlsl b/test/builtins/gen/dpdxFine/f92fb6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.hlsl
rename to test/builtins/gen/dpdxFine/f92fb6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.msl b/test/builtins/gen/dpdxFine/f92fb6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.msl
rename to test/builtins/gen/dpdxFine/f92fb6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.spvasm b/test/builtins/gen/dpdxFine/f92fb6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.spvasm
rename to test/builtins/gen/dpdxFine/f92fb6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.wgsl b/test/builtins/gen/dpdxFine/f92fb6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.wgsl
rename to test/builtins/gen/dpdxFine/f92fb6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdy/699a05.wgsl b/test/builtins/gen/dpdy/699a05.wgsl
new file mode 100644
index 0000000..6ffa8d8
--- /dev/null
+++ b/test/builtins/gen/dpdy/699a05.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdy(vec<4, f32>) -> vec<4, f32>
+fn dpdy_699a05() {
+  var res: vec4<f32> = dpdy(vec4<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdy_699a05();
+}
diff --git a/test/intrinsics/gen/dpdy/699a05.wgsl.expected.glsl b/test/builtins/gen/dpdy/699a05.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/699a05.wgsl.expected.glsl
rename to test/builtins/gen/dpdy/699a05.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdy/699a05.wgsl.expected.hlsl b/test/builtins/gen/dpdy/699a05.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/699a05.wgsl.expected.hlsl
rename to test/builtins/gen/dpdy/699a05.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdy/699a05.wgsl.expected.msl b/test/builtins/gen/dpdy/699a05.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdy/699a05.wgsl.expected.msl
rename to test/builtins/gen/dpdy/699a05.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdy/699a05.wgsl.expected.spvasm b/test/builtins/gen/dpdy/699a05.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdy/699a05.wgsl.expected.spvasm
rename to test/builtins/gen/dpdy/699a05.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdy/699a05.wgsl.expected.wgsl b/test/builtins/gen/dpdy/699a05.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/699a05.wgsl.expected.wgsl
rename to test/builtins/gen/dpdy/699a05.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdy/7f8d84.wgsl b/test/builtins/gen/dpdy/7f8d84.wgsl
new file mode 100644
index 0000000..0298c49
--- /dev/null
+++ b/test/builtins/gen/dpdy/7f8d84.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdy(f32) -> f32
+fn dpdy_7f8d84() {
+  var res: f32 = dpdy(1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdy_7f8d84();
+}
diff --git a/test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.glsl b/test/builtins/gen/dpdy/7f8d84.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.glsl
rename to test/builtins/gen/dpdy/7f8d84.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.hlsl b/test/builtins/gen/dpdy/7f8d84.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.hlsl
rename to test/builtins/gen/dpdy/7f8d84.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.msl b/test/builtins/gen/dpdy/7f8d84.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.msl
rename to test/builtins/gen/dpdy/7f8d84.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.spvasm b/test/builtins/gen/dpdy/7f8d84.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.spvasm
rename to test/builtins/gen/dpdy/7f8d84.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.wgsl b/test/builtins/gen/dpdy/7f8d84.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.wgsl
rename to test/builtins/gen/dpdy/7f8d84.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdy/a8b56e.wgsl b/test/builtins/gen/dpdy/a8b56e.wgsl
new file mode 100644
index 0000000..62408d5
--- /dev/null
+++ b/test/builtins/gen/dpdy/a8b56e.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdy(vec<2, f32>) -> vec<2, f32>
+fn dpdy_a8b56e() {
+  var res: vec2<f32> = dpdy(vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdy_a8b56e();
+}
diff --git a/test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.glsl b/test/builtins/gen/dpdy/a8b56e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.glsl
rename to test/builtins/gen/dpdy/a8b56e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.hlsl b/test/builtins/gen/dpdy/a8b56e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.hlsl
rename to test/builtins/gen/dpdy/a8b56e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.msl b/test/builtins/gen/dpdy/a8b56e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.msl
rename to test/builtins/gen/dpdy/a8b56e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.spvasm b/test/builtins/gen/dpdy/a8b56e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.spvasm
rename to test/builtins/gen/dpdy/a8b56e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.wgsl b/test/builtins/gen/dpdy/a8b56e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.wgsl
rename to test/builtins/gen/dpdy/a8b56e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdy/feb40f.wgsl b/test/builtins/gen/dpdy/feb40f.wgsl
new file mode 100644
index 0000000..e6ff720
--- /dev/null
+++ b/test/builtins/gen/dpdy/feb40f.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdy(vec<3, f32>) -> vec<3, f32>
+fn dpdy_feb40f() {
+  var res: vec3<f32> = dpdy(vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdy_feb40f();
+}
diff --git a/test/intrinsics/gen/dpdy/feb40f.wgsl.expected.glsl b/test/builtins/gen/dpdy/feb40f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/feb40f.wgsl.expected.glsl
rename to test/builtins/gen/dpdy/feb40f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdy/feb40f.wgsl.expected.hlsl b/test/builtins/gen/dpdy/feb40f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/feb40f.wgsl.expected.hlsl
rename to test/builtins/gen/dpdy/feb40f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdy/feb40f.wgsl.expected.msl b/test/builtins/gen/dpdy/feb40f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdy/feb40f.wgsl.expected.msl
rename to test/builtins/gen/dpdy/feb40f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdy/feb40f.wgsl.expected.spvasm b/test/builtins/gen/dpdy/feb40f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdy/feb40f.wgsl.expected.spvasm
rename to test/builtins/gen/dpdy/feb40f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdy/feb40f.wgsl.expected.wgsl b/test/builtins/gen/dpdy/feb40f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdy/feb40f.wgsl.expected.wgsl
rename to test/builtins/gen/dpdy/feb40f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdyCoarse/3e1ab4.wgsl b/test/builtins/gen/dpdyCoarse/3e1ab4.wgsl
new file mode 100644
index 0000000..5817c55
--- /dev/null
+++ b/test/builtins/gen/dpdyCoarse/3e1ab4.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdyCoarse(vec<2, f32>) -> vec<2, f32>
+fn dpdyCoarse_3e1ab4() {
+  var res: vec2<f32> = dpdyCoarse(vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdyCoarse_3e1ab4();
+}
diff --git a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.glsl b/test/builtins/gen/dpdyCoarse/3e1ab4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.glsl
rename to test/builtins/gen/dpdyCoarse/3e1ab4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.hlsl b/test/builtins/gen/dpdyCoarse/3e1ab4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.hlsl
rename to test/builtins/gen/dpdyCoarse/3e1ab4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.msl b/test/builtins/gen/dpdyCoarse/3e1ab4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.msl
rename to test/builtins/gen/dpdyCoarse/3e1ab4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.spvasm b/test/builtins/gen/dpdyCoarse/3e1ab4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.spvasm
rename to test/builtins/gen/dpdyCoarse/3e1ab4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.wgsl b/test/builtins/gen/dpdyCoarse/3e1ab4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.wgsl
rename to test/builtins/gen/dpdyCoarse/3e1ab4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdyCoarse/445d24.wgsl b/test/builtins/gen/dpdyCoarse/445d24.wgsl
new file mode 100644
index 0000000..9206d8f
--- /dev/null
+++ b/test/builtins/gen/dpdyCoarse/445d24.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdyCoarse(vec<4, f32>) -> vec<4, f32>
+fn dpdyCoarse_445d24() {
+  var res: vec4<f32> = dpdyCoarse(vec4<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdyCoarse_445d24();
+}
diff --git a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.glsl b/test/builtins/gen/dpdyCoarse/445d24.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.glsl
rename to test/builtins/gen/dpdyCoarse/445d24.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.hlsl b/test/builtins/gen/dpdyCoarse/445d24.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.hlsl
rename to test/builtins/gen/dpdyCoarse/445d24.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.msl b/test/builtins/gen/dpdyCoarse/445d24.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.msl
rename to test/builtins/gen/dpdyCoarse/445d24.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.spvasm b/test/builtins/gen/dpdyCoarse/445d24.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.spvasm
rename to test/builtins/gen/dpdyCoarse/445d24.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.wgsl b/test/builtins/gen/dpdyCoarse/445d24.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.wgsl
rename to test/builtins/gen/dpdyCoarse/445d24.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdyCoarse/870a7e.wgsl b/test/builtins/gen/dpdyCoarse/870a7e.wgsl
new file mode 100644
index 0000000..81f0cd2
--- /dev/null
+++ b/test/builtins/gen/dpdyCoarse/870a7e.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdyCoarse(f32) -> f32
+fn dpdyCoarse_870a7e() {
+  var res: f32 = dpdyCoarse(1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdyCoarse_870a7e();
+}
diff --git a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.glsl b/test/builtins/gen/dpdyCoarse/870a7e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.glsl
rename to test/builtins/gen/dpdyCoarse/870a7e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.hlsl b/test/builtins/gen/dpdyCoarse/870a7e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.hlsl
rename to test/builtins/gen/dpdyCoarse/870a7e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.msl b/test/builtins/gen/dpdyCoarse/870a7e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.msl
rename to test/builtins/gen/dpdyCoarse/870a7e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.spvasm b/test/builtins/gen/dpdyCoarse/870a7e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.spvasm
rename to test/builtins/gen/dpdyCoarse/870a7e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.wgsl b/test/builtins/gen/dpdyCoarse/870a7e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.wgsl
rename to test/builtins/gen/dpdyCoarse/870a7e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdyCoarse/ae1873.wgsl b/test/builtins/gen/dpdyCoarse/ae1873.wgsl
new file mode 100644
index 0000000..ec0b565
--- /dev/null
+++ b/test/builtins/gen/dpdyCoarse/ae1873.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdyCoarse(vec<3, f32>) -> vec<3, f32>
+fn dpdyCoarse_ae1873() {
+  var res: vec3<f32> = dpdyCoarse(vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdyCoarse_ae1873();
+}
diff --git a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.glsl b/test/builtins/gen/dpdyCoarse/ae1873.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.glsl
rename to test/builtins/gen/dpdyCoarse/ae1873.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.hlsl b/test/builtins/gen/dpdyCoarse/ae1873.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.hlsl
rename to test/builtins/gen/dpdyCoarse/ae1873.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.msl b/test/builtins/gen/dpdyCoarse/ae1873.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.msl
rename to test/builtins/gen/dpdyCoarse/ae1873.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.spvasm b/test/builtins/gen/dpdyCoarse/ae1873.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.spvasm
rename to test/builtins/gen/dpdyCoarse/ae1873.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.wgsl b/test/builtins/gen/dpdyCoarse/ae1873.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.wgsl
rename to test/builtins/gen/dpdyCoarse/ae1873.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdyFine/1fb7ab.wgsl b/test/builtins/gen/dpdyFine/1fb7ab.wgsl
new file mode 100644
index 0000000..28d6efc
--- /dev/null
+++ b/test/builtins/gen/dpdyFine/1fb7ab.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdyFine(vec<3, f32>) -> vec<3, f32>
+fn dpdyFine_1fb7ab() {
+  var res: vec3<f32> = dpdyFine(vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdyFine_1fb7ab();
+}
diff --git a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.glsl b/test/builtins/gen/dpdyFine/1fb7ab.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.glsl
rename to test/builtins/gen/dpdyFine/1fb7ab.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.hlsl b/test/builtins/gen/dpdyFine/1fb7ab.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.hlsl
rename to test/builtins/gen/dpdyFine/1fb7ab.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.msl b/test/builtins/gen/dpdyFine/1fb7ab.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.msl
rename to test/builtins/gen/dpdyFine/1fb7ab.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.spvasm b/test/builtins/gen/dpdyFine/1fb7ab.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.spvasm
rename to test/builtins/gen/dpdyFine/1fb7ab.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.wgsl b/test/builtins/gen/dpdyFine/1fb7ab.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.wgsl
rename to test/builtins/gen/dpdyFine/1fb7ab.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdyFine/6eb673.wgsl b/test/builtins/gen/dpdyFine/6eb673.wgsl
new file mode 100644
index 0000000..87c154a
--- /dev/null
+++ b/test/builtins/gen/dpdyFine/6eb673.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdyFine(f32) -> f32
+fn dpdyFine_6eb673() {
+  var res: f32 = dpdyFine(1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdyFine_6eb673();
+}
diff --git a/test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.glsl b/test/builtins/gen/dpdyFine/6eb673.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.glsl
rename to test/builtins/gen/dpdyFine/6eb673.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.hlsl b/test/builtins/gen/dpdyFine/6eb673.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.hlsl
rename to test/builtins/gen/dpdyFine/6eb673.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.msl b/test/builtins/gen/dpdyFine/6eb673.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.msl
rename to test/builtins/gen/dpdyFine/6eb673.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.spvasm b/test/builtins/gen/dpdyFine/6eb673.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.spvasm
rename to test/builtins/gen/dpdyFine/6eb673.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.wgsl b/test/builtins/gen/dpdyFine/6eb673.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.wgsl
rename to test/builtins/gen/dpdyFine/6eb673.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdyFine/d0a648.wgsl b/test/builtins/gen/dpdyFine/d0a648.wgsl
new file mode 100644
index 0000000..d5477f8
--- /dev/null
+++ b/test/builtins/gen/dpdyFine/d0a648.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdyFine(vec<4, f32>) -> vec<4, f32>
+fn dpdyFine_d0a648() {
+  var res: vec4<f32> = dpdyFine(vec4<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdyFine_d0a648();
+}
diff --git a/test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.glsl b/test/builtins/gen/dpdyFine/d0a648.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.glsl
rename to test/builtins/gen/dpdyFine/d0a648.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.hlsl b/test/builtins/gen/dpdyFine/d0a648.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.hlsl
rename to test/builtins/gen/dpdyFine/d0a648.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.msl b/test/builtins/gen/dpdyFine/d0a648.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.msl
rename to test/builtins/gen/dpdyFine/d0a648.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.spvasm b/test/builtins/gen/dpdyFine/d0a648.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.spvasm
rename to test/builtins/gen/dpdyFine/d0a648.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.wgsl b/test/builtins/gen/dpdyFine/d0a648.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.wgsl
rename to test/builtins/gen/dpdyFine/d0a648.wgsl.expected.wgsl
diff --git a/test/builtins/gen/dpdyFine/df33aa.wgsl b/test/builtins/gen/dpdyFine/df33aa.wgsl
new file mode 100644
index 0000000..e2206ef
--- /dev/null
+++ b/test/builtins/gen/dpdyFine/df33aa.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn dpdyFine(vec<2, f32>) -> vec<2, f32>
+fn dpdyFine_df33aa() {
+  var res: vec2<f32> = dpdyFine(vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  dpdyFine_df33aa();
+}
diff --git a/test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.glsl b/test/builtins/gen/dpdyFine/df33aa.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.glsl
rename to test/builtins/gen/dpdyFine/df33aa.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.hlsl b/test/builtins/gen/dpdyFine/df33aa.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.hlsl
rename to test/builtins/gen/dpdyFine/df33aa.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.msl b/test/builtins/gen/dpdyFine/df33aa.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.msl
rename to test/builtins/gen/dpdyFine/df33aa.wgsl.expected.msl
diff --git a/test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.spvasm b/test/builtins/gen/dpdyFine/df33aa.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.spvasm
rename to test/builtins/gen/dpdyFine/df33aa.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.wgsl b/test/builtins/gen/dpdyFine/df33aa.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.wgsl
rename to test/builtins/gen/dpdyFine/df33aa.wgsl.expected.wgsl
diff --git a/test/builtins/gen/exp/0f70eb.wgsl b/test/builtins/gen/exp/0f70eb.wgsl
new file mode 100644
index 0000000..2798c27
--- /dev/null
+++ b/test/builtins/gen/exp/0f70eb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn exp(vec<4, f32>) -> vec<4, f32>
+fn exp_0f70eb() {
+  var res: vec4<f32> = exp(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_0f70eb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  exp_0f70eb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  exp_0f70eb();
+}
diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.glsl b/test/builtins/gen/exp/0f70eb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/exp/0f70eb.wgsl.expected.glsl
rename to test/builtins/gen/exp/0f70eb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.hlsl b/test/builtins/gen/exp/0f70eb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/exp/0f70eb.wgsl.expected.hlsl
rename to test/builtins/gen/exp/0f70eb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.msl b/test/builtins/gen/exp/0f70eb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/exp/0f70eb.wgsl.expected.msl
rename to test/builtins/gen/exp/0f70eb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.spvasm b/test/builtins/gen/exp/0f70eb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/exp/0f70eb.wgsl.expected.spvasm
rename to test/builtins/gen/exp/0f70eb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.wgsl b/test/builtins/gen/exp/0f70eb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/exp/0f70eb.wgsl.expected.wgsl
rename to test/builtins/gen/exp/0f70eb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/exp/1951e7.wgsl b/test/builtins/gen/exp/1951e7.wgsl
new file mode 100644
index 0000000..085a58f
--- /dev/null
+++ b/test/builtins/gen/exp/1951e7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn exp(vec<2, f32>) -> vec<2, f32>
+fn exp_1951e7() {
+  var res: vec2<f32> = exp(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_1951e7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  exp_1951e7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  exp_1951e7();
+}
diff --git a/test/intrinsics/gen/exp/1951e7.wgsl.expected.glsl b/test/builtins/gen/exp/1951e7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/exp/1951e7.wgsl.expected.glsl
rename to test/builtins/gen/exp/1951e7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/exp/1951e7.wgsl.expected.hlsl b/test/builtins/gen/exp/1951e7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/exp/1951e7.wgsl.expected.hlsl
rename to test/builtins/gen/exp/1951e7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/exp/1951e7.wgsl.expected.msl b/test/builtins/gen/exp/1951e7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/exp/1951e7.wgsl.expected.msl
rename to test/builtins/gen/exp/1951e7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/exp/1951e7.wgsl.expected.spvasm b/test/builtins/gen/exp/1951e7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/exp/1951e7.wgsl.expected.spvasm
rename to test/builtins/gen/exp/1951e7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/exp/1951e7.wgsl.expected.wgsl b/test/builtins/gen/exp/1951e7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/exp/1951e7.wgsl.expected.wgsl
rename to test/builtins/gen/exp/1951e7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/exp/771fd2.wgsl b/test/builtins/gen/exp/771fd2.wgsl
new file mode 100644
index 0000000..f7bb800
--- /dev/null
+++ b/test/builtins/gen/exp/771fd2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn exp(f32) -> f32
+fn exp_771fd2() {
+  var res: f32 = exp(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_771fd2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  exp_771fd2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  exp_771fd2();
+}
diff --git a/test/intrinsics/gen/exp/771fd2.wgsl.expected.glsl b/test/builtins/gen/exp/771fd2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/exp/771fd2.wgsl.expected.glsl
rename to test/builtins/gen/exp/771fd2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/exp/771fd2.wgsl.expected.hlsl b/test/builtins/gen/exp/771fd2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/exp/771fd2.wgsl.expected.hlsl
rename to test/builtins/gen/exp/771fd2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/exp/771fd2.wgsl.expected.msl b/test/builtins/gen/exp/771fd2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/exp/771fd2.wgsl.expected.msl
rename to test/builtins/gen/exp/771fd2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/exp/771fd2.wgsl.expected.spvasm b/test/builtins/gen/exp/771fd2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/exp/771fd2.wgsl.expected.spvasm
rename to test/builtins/gen/exp/771fd2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/exp/771fd2.wgsl.expected.wgsl b/test/builtins/gen/exp/771fd2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/exp/771fd2.wgsl.expected.wgsl
rename to test/builtins/gen/exp/771fd2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/exp/d98450.wgsl b/test/builtins/gen/exp/d98450.wgsl
new file mode 100644
index 0000000..caf87a5
--- /dev/null
+++ b/test/builtins/gen/exp/d98450.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn exp(vec<3, f32>) -> vec<3, f32>
+fn exp_d98450() {
+  var res: vec3<f32> = exp(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_d98450();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  exp_d98450();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  exp_d98450();
+}
diff --git a/test/intrinsics/gen/exp/d98450.wgsl.expected.glsl b/test/builtins/gen/exp/d98450.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/exp/d98450.wgsl.expected.glsl
rename to test/builtins/gen/exp/d98450.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/exp/d98450.wgsl.expected.hlsl b/test/builtins/gen/exp/d98450.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/exp/d98450.wgsl.expected.hlsl
rename to test/builtins/gen/exp/d98450.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/exp/d98450.wgsl.expected.msl b/test/builtins/gen/exp/d98450.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/exp/d98450.wgsl.expected.msl
rename to test/builtins/gen/exp/d98450.wgsl.expected.msl
diff --git a/test/intrinsics/gen/exp/d98450.wgsl.expected.spvasm b/test/builtins/gen/exp/d98450.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/exp/d98450.wgsl.expected.spvasm
rename to test/builtins/gen/exp/d98450.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/exp/d98450.wgsl.expected.wgsl b/test/builtins/gen/exp/d98450.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/exp/d98450.wgsl.expected.wgsl
rename to test/builtins/gen/exp/d98450.wgsl.expected.wgsl
diff --git a/test/builtins/gen/exp2/1f8680.wgsl b/test/builtins/gen/exp2/1f8680.wgsl
new file mode 100644
index 0000000..f5f34be
--- /dev/null
+++ b/test/builtins/gen/exp2/1f8680.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn exp2(vec<3, f32>) -> vec<3, f32>
+fn exp2_1f8680() {
+  var res: vec3<f32> = exp2(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_1f8680();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  exp2_1f8680();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  exp2_1f8680();
+}
diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.glsl b/test/builtins/gen/exp2/1f8680.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/exp2/1f8680.wgsl.expected.glsl
rename to test/builtins/gen/exp2/1f8680.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.hlsl b/test/builtins/gen/exp2/1f8680.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/exp2/1f8680.wgsl.expected.hlsl
rename to test/builtins/gen/exp2/1f8680.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.msl b/test/builtins/gen/exp2/1f8680.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/exp2/1f8680.wgsl.expected.msl
rename to test/builtins/gen/exp2/1f8680.wgsl.expected.msl
diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.spvasm b/test/builtins/gen/exp2/1f8680.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/exp2/1f8680.wgsl.expected.spvasm
rename to test/builtins/gen/exp2/1f8680.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.wgsl b/test/builtins/gen/exp2/1f8680.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/exp2/1f8680.wgsl.expected.wgsl
rename to test/builtins/gen/exp2/1f8680.wgsl.expected.wgsl
diff --git a/test/builtins/gen/exp2/a9d0a7.wgsl b/test/builtins/gen/exp2/a9d0a7.wgsl
new file mode 100644
index 0000000..e827c11
--- /dev/null
+++ b/test/builtins/gen/exp2/a9d0a7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn exp2(vec<4, f32>) -> vec<4, f32>
+fn exp2_a9d0a7() {
+  var res: vec4<f32> = exp2(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_a9d0a7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  exp2_a9d0a7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  exp2_a9d0a7();
+}
diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.glsl b/test/builtins/gen/exp2/a9d0a7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.glsl
rename to test/builtins/gen/exp2/a9d0a7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.hlsl b/test/builtins/gen/exp2/a9d0a7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.hlsl
rename to test/builtins/gen/exp2/a9d0a7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.msl b/test/builtins/gen/exp2/a9d0a7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.msl
rename to test/builtins/gen/exp2/a9d0a7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.spvasm b/test/builtins/gen/exp2/a9d0a7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.spvasm
rename to test/builtins/gen/exp2/a9d0a7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.wgsl b/test/builtins/gen/exp2/a9d0a7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.wgsl
rename to test/builtins/gen/exp2/a9d0a7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/exp2/d6777c.wgsl b/test/builtins/gen/exp2/d6777c.wgsl
new file mode 100644
index 0000000..3927cc8
--- /dev/null
+++ b/test/builtins/gen/exp2/d6777c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn exp2(vec<2, f32>) -> vec<2, f32>
+fn exp2_d6777c() {
+  var res: vec2<f32> = exp2(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_d6777c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  exp2_d6777c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  exp2_d6777c();
+}
diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.glsl b/test/builtins/gen/exp2/d6777c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/exp2/d6777c.wgsl.expected.glsl
rename to test/builtins/gen/exp2/d6777c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.hlsl b/test/builtins/gen/exp2/d6777c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/exp2/d6777c.wgsl.expected.hlsl
rename to test/builtins/gen/exp2/d6777c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.msl b/test/builtins/gen/exp2/d6777c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/exp2/d6777c.wgsl.expected.msl
rename to test/builtins/gen/exp2/d6777c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.spvasm b/test/builtins/gen/exp2/d6777c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/exp2/d6777c.wgsl.expected.spvasm
rename to test/builtins/gen/exp2/d6777c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.wgsl b/test/builtins/gen/exp2/d6777c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/exp2/d6777c.wgsl.expected.wgsl
rename to test/builtins/gen/exp2/d6777c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/exp2/dea523.wgsl b/test/builtins/gen/exp2/dea523.wgsl
new file mode 100644
index 0000000..7feb8af
--- /dev/null
+++ b/test/builtins/gen/exp2/dea523.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn exp2(f32) -> f32
+fn exp2_dea523() {
+  var res: f32 = exp2(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_dea523();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  exp2_dea523();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  exp2_dea523();
+}
diff --git a/test/intrinsics/gen/exp2/dea523.wgsl.expected.glsl b/test/builtins/gen/exp2/dea523.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/exp2/dea523.wgsl.expected.glsl
rename to test/builtins/gen/exp2/dea523.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/exp2/dea523.wgsl.expected.hlsl b/test/builtins/gen/exp2/dea523.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/exp2/dea523.wgsl.expected.hlsl
rename to test/builtins/gen/exp2/dea523.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/exp2/dea523.wgsl.expected.msl b/test/builtins/gen/exp2/dea523.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/exp2/dea523.wgsl.expected.msl
rename to test/builtins/gen/exp2/dea523.wgsl.expected.msl
diff --git a/test/intrinsics/gen/exp2/dea523.wgsl.expected.spvasm b/test/builtins/gen/exp2/dea523.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/exp2/dea523.wgsl.expected.spvasm
rename to test/builtins/gen/exp2/dea523.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/exp2/dea523.wgsl.expected.wgsl b/test/builtins/gen/exp2/dea523.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/exp2/dea523.wgsl.expected.wgsl
rename to test/builtins/gen/exp2/dea523.wgsl.expected.wgsl
diff --git a/test/builtins/gen/faceForward/5afbd5.wgsl b/test/builtins/gen/faceForward/5afbd5.wgsl
new file mode 100644
index 0000000..644b9c4
--- /dev/null
+++ b/test/builtins/gen/faceForward/5afbd5.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn faceForward(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn faceForward_5afbd5() {
+  var res: vec3<f32> = faceForward(vec3<f32>(), vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  faceForward_5afbd5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  faceForward_5afbd5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  faceForward_5afbd5();
+}
diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.glsl b/test/builtins/gen/faceForward/5afbd5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.glsl
rename to test/builtins/gen/faceForward/5afbd5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.hlsl b/test/builtins/gen/faceForward/5afbd5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.hlsl
rename to test/builtins/gen/faceForward/5afbd5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.msl b/test/builtins/gen/faceForward/5afbd5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.msl
rename to test/builtins/gen/faceForward/5afbd5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.spvasm b/test/builtins/gen/faceForward/5afbd5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.spvasm
rename to test/builtins/gen/faceForward/5afbd5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.wgsl b/test/builtins/gen/faceForward/5afbd5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.wgsl
rename to test/builtins/gen/faceForward/5afbd5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/faceForward/b316e5.wgsl b/test/builtins/gen/faceForward/b316e5.wgsl
new file mode 100644
index 0000000..a349af9
--- /dev/null
+++ b/test/builtins/gen/faceForward/b316e5.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn faceForward(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn faceForward_b316e5() {
+  var res: vec4<f32> = faceForward(vec4<f32>(), vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  faceForward_b316e5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  faceForward_b316e5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  faceForward_b316e5();
+}
diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.glsl b/test/builtins/gen/faceForward/b316e5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/faceForward/b316e5.wgsl.expected.glsl
rename to test/builtins/gen/faceForward/b316e5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.hlsl b/test/builtins/gen/faceForward/b316e5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/faceForward/b316e5.wgsl.expected.hlsl
rename to test/builtins/gen/faceForward/b316e5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.msl b/test/builtins/gen/faceForward/b316e5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/faceForward/b316e5.wgsl.expected.msl
rename to test/builtins/gen/faceForward/b316e5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.spvasm b/test/builtins/gen/faceForward/b316e5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/faceForward/b316e5.wgsl.expected.spvasm
rename to test/builtins/gen/faceForward/b316e5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.wgsl b/test/builtins/gen/faceForward/b316e5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/faceForward/b316e5.wgsl.expected.wgsl
rename to test/builtins/gen/faceForward/b316e5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/faceForward/e6908b.wgsl b/test/builtins/gen/faceForward/e6908b.wgsl
new file mode 100644
index 0000000..d7c41ed
--- /dev/null
+++ b/test/builtins/gen/faceForward/e6908b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn faceForward(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn faceForward_e6908b() {
+  var res: vec2<f32> = faceForward(vec2<f32>(), vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  faceForward_e6908b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  faceForward_e6908b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  faceForward_e6908b();
+}
diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.glsl b/test/builtins/gen/faceForward/e6908b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/faceForward/e6908b.wgsl.expected.glsl
rename to test/builtins/gen/faceForward/e6908b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.hlsl b/test/builtins/gen/faceForward/e6908b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/faceForward/e6908b.wgsl.expected.hlsl
rename to test/builtins/gen/faceForward/e6908b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.msl b/test/builtins/gen/faceForward/e6908b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/faceForward/e6908b.wgsl.expected.msl
rename to test/builtins/gen/faceForward/e6908b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.spvasm b/test/builtins/gen/faceForward/e6908b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/faceForward/e6908b.wgsl.expected.spvasm
rename to test/builtins/gen/faceForward/e6908b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.wgsl b/test/builtins/gen/faceForward/e6908b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/faceForward/e6908b.wgsl.expected.wgsl
rename to test/builtins/gen/faceForward/e6908b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/floor/3bccc4.wgsl b/test/builtins/gen/floor/3bccc4.wgsl
new file mode 100644
index 0000000..1b128ea
--- /dev/null
+++ b/test/builtins/gen/floor/3bccc4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn floor(vec<4, f32>) -> vec<4, f32>
+fn floor_3bccc4() {
+  var res: vec4<f32> = floor(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_3bccc4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  floor_3bccc4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  floor_3bccc4();
+}
diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.glsl b/test/builtins/gen/floor/3bccc4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/floor/3bccc4.wgsl.expected.glsl
rename to test/builtins/gen/floor/3bccc4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.hlsl b/test/builtins/gen/floor/3bccc4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/floor/3bccc4.wgsl.expected.hlsl
rename to test/builtins/gen/floor/3bccc4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.msl b/test/builtins/gen/floor/3bccc4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/floor/3bccc4.wgsl.expected.msl
rename to test/builtins/gen/floor/3bccc4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.spvasm b/test/builtins/gen/floor/3bccc4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/floor/3bccc4.wgsl.expected.spvasm
rename to test/builtins/gen/floor/3bccc4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.wgsl b/test/builtins/gen/floor/3bccc4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/floor/3bccc4.wgsl.expected.wgsl
rename to test/builtins/gen/floor/3bccc4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/floor/5fc9ac.wgsl b/test/builtins/gen/floor/5fc9ac.wgsl
new file mode 100644
index 0000000..4982415
--- /dev/null
+++ b/test/builtins/gen/floor/5fc9ac.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn floor(vec<2, f32>) -> vec<2, f32>
+fn floor_5fc9ac() {
+  var res: vec2<f32> = floor(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_5fc9ac();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  floor_5fc9ac();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  floor_5fc9ac();
+}
diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.glsl b/test/builtins/gen/floor/5fc9ac.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/floor/5fc9ac.wgsl.expected.glsl
rename to test/builtins/gen/floor/5fc9ac.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.hlsl b/test/builtins/gen/floor/5fc9ac.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/floor/5fc9ac.wgsl.expected.hlsl
rename to test/builtins/gen/floor/5fc9ac.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.msl b/test/builtins/gen/floor/5fc9ac.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/floor/5fc9ac.wgsl.expected.msl
rename to test/builtins/gen/floor/5fc9ac.wgsl.expected.msl
diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.spvasm b/test/builtins/gen/floor/5fc9ac.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/floor/5fc9ac.wgsl.expected.spvasm
rename to test/builtins/gen/floor/5fc9ac.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.wgsl b/test/builtins/gen/floor/5fc9ac.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/floor/5fc9ac.wgsl.expected.wgsl
rename to test/builtins/gen/floor/5fc9ac.wgsl.expected.wgsl
diff --git a/test/builtins/gen/floor/60d7ea.wgsl b/test/builtins/gen/floor/60d7ea.wgsl
new file mode 100644
index 0000000..6a0ab7e
--- /dev/null
+++ b/test/builtins/gen/floor/60d7ea.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn floor(vec<3, f32>) -> vec<3, f32>
+fn floor_60d7ea() {
+  var res: vec3<f32> = floor(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_60d7ea();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  floor_60d7ea();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  floor_60d7ea();
+}
diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.glsl b/test/builtins/gen/floor/60d7ea.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/floor/60d7ea.wgsl.expected.glsl
rename to test/builtins/gen/floor/60d7ea.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.hlsl b/test/builtins/gen/floor/60d7ea.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/floor/60d7ea.wgsl.expected.hlsl
rename to test/builtins/gen/floor/60d7ea.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.msl b/test/builtins/gen/floor/60d7ea.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/floor/60d7ea.wgsl.expected.msl
rename to test/builtins/gen/floor/60d7ea.wgsl.expected.msl
diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.spvasm b/test/builtins/gen/floor/60d7ea.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/floor/60d7ea.wgsl.expected.spvasm
rename to test/builtins/gen/floor/60d7ea.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.wgsl b/test/builtins/gen/floor/60d7ea.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/floor/60d7ea.wgsl.expected.wgsl
rename to test/builtins/gen/floor/60d7ea.wgsl.expected.wgsl
diff --git a/test/builtins/gen/floor/66f154.wgsl b/test/builtins/gen/floor/66f154.wgsl
new file mode 100644
index 0000000..c3d4592
--- /dev/null
+++ b/test/builtins/gen/floor/66f154.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn floor(f32) -> f32
+fn floor_66f154() {
+  var res: f32 = floor(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_66f154();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  floor_66f154();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  floor_66f154();
+}
diff --git a/test/intrinsics/gen/floor/66f154.wgsl.expected.glsl b/test/builtins/gen/floor/66f154.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/floor/66f154.wgsl.expected.glsl
rename to test/builtins/gen/floor/66f154.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/floor/66f154.wgsl.expected.hlsl b/test/builtins/gen/floor/66f154.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/floor/66f154.wgsl.expected.hlsl
rename to test/builtins/gen/floor/66f154.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/floor/66f154.wgsl.expected.msl b/test/builtins/gen/floor/66f154.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/floor/66f154.wgsl.expected.msl
rename to test/builtins/gen/floor/66f154.wgsl.expected.msl
diff --git a/test/intrinsics/gen/floor/66f154.wgsl.expected.spvasm b/test/builtins/gen/floor/66f154.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/floor/66f154.wgsl.expected.spvasm
rename to test/builtins/gen/floor/66f154.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/floor/66f154.wgsl.expected.wgsl b/test/builtins/gen/floor/66f154.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/floor/66f154.wgsl.expected.wgsl
rename to test/builtins/gen/floor/66f154.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fma/26a7a9.wgsl b/test/builtins/gen/fma/26a7a9.wgsl
new file mode 100644
index 0000000..2bb2903
--- /dev/null
+++ b/test/builtins/gen/fma/26a7a9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fma(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn fma_26a7a9() {
+  var res: vec2<f32> = fma(vec2<f32>(), vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_26a7a9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fma_26a7a9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  fma_26a7a9();
+}
diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.glsl b/test/builtins/gen/fma/26a7a9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fma/26a7a9.wgsl.expected.glsl
rename to test/builtins/gen/fma/26a7a9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.hlsl b/test/builtins/gen/fma/26a7a9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fma/26a7a9.wgsl.expected.hlsl
rename to test/builtins/gen/fma/26a7a9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.msl b/test/builtins/gen/fma/26a7a9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fma/26a7a9.wgsl.expected.msl
rename to test/builtins/gen/fma/26a7a9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.spvasm b/test/builtins/gen/fma/26a7a9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fma/26a7a9.wgsl.expected.spvasm
rename to test/builtins/gen/fma/26a7a9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.wgsl b/test/builtins/gen/fma/26a7a9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fma/26a7a9.wgsl.expected.wgsl
rename to test/builtins/gen/fma/26a7a9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fma/6a3283.wgsl b/test/builtins/gen/fma/6a3283.wgsl
new file mode 100644
index 0000000..ad45590
--- /dev/null
+++ b/test/builtins/gen/fma/6a3283.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fma(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn fma_6a3283() {
+  var res: vec4<f32> = fma(vec4<f32>(), vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_6a3283();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fma_6a3283();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  fma_6a3283();
+}
diff --git a/test/intrinsics/gen/fma/6a3283.wgsl.expected.glsl b/test/builtins/gen/fma/6a3283.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fma/6a3283.wgsl.expected.glsl
rename to test/builtins/gen/fma/6a3283.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fma/6a3283.wgsl.expected.hlsl b/test/builtins/gen/fma/6a3283.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fma/6a3283.wgsl.expected.hlsl
rename to test/builtins/gen/fma/6a3283.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fma/6a3283.wgsl.expected.msl b/test/builtins/gen/fma/6a3283.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fma/6a3283.wgsl.expected.msl
rename to test/builtins/gen/fma/6a3283.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fma/6a3283.wgsl.expected.spvasm b/test/builtins/gen/fma/6a3283.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fma/6a3283.wgsl.expected.spvasm
rename to test/builtins/gen/fma/6a3283.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fma/6a3283.wgsl.expected.wgsl b/test/builtins/gen/fma/6a3283.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fma/6a3283.wgsl.expected.wgsl
rename to test/builtins/gen/fma/6a3283.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fma/c10ba3.wgsl b/test/builtins/gen/fma/c10ba3.wgsl
new file mode 100644
index 0000000..1b0b477
--- /dev/null
+++ b/test/builtins/gen/fma/c10ba3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fma(f32, f32, f32) -> f32
+fn fma_c10ba3() {
+  var res: f32 = fma(1.0, 1.0, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_c10ba3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fma_c10ba3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  fma_c10ba3();
+}
diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.glsl b/test/builtins/gen/fma/c10ba3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fma/c10ba3.wgsl.expected.glsl
rename to test/builtins/gen/fma/c10ba3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.hlsl b/test/builtins/gen/fma/c10ba3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fma/c10ba3.wgsl.expected.hlsl
rename to test/builtins/gen/fma/c10ba3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.msl b/test/builtins/gen/fma/c10ba3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fma/c10ba3.wgsl.expected.msl
rename to test/builtins/gen/fma/c10ba3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.spvasm b/test/builtins/gen/fma/c10ba3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fma/c10ba3.wgsl.expected.spvasm
rename to test/builtins/gen/fma/c10ba3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.wgsl b/test/builtins/gen/fma/c10ba3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fma/c10ba3.wgsl.expected.wgsl
rename to test/builtins/gen/fma/c10ba3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fma/e17c5c.wgsl b/test/builtins/gen/fma/e17c5c.wgsl
new file mode 100644
index 0000000..ca7e621
--- /dev/null
+++ b/test/builtins/gen/fma/e17c5c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fma(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn fma_e17c5c() {
+  var res: vec3<f32> = fma(vec3<f32>(), vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_e17c5c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fma_e17c5c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  fma_e17c5c();
+}
diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.glsl b/test/builtins/gen/fma/e17c5c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fma/e17c5c.wgsl.expected.glsl
rename to test/builtins/gen/fma/e17c5c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.hlsl b/test/builtins/gen/fma/e17c5c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fma/e17c5c.wgsl.expected.hlsl
rename to test/builtins/gen/fma/e17c5c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.msl b/test/builtins/gen/fma/e17c5c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fma/e17c5c.wgsl.expected.msl
rename to test/builtins/gen/fma/e17c5c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.spvasm b/test/builtins/gen/fma/e17c5c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fma/e17c5c.wgsl.expected.spvasm
rename to test/builtins/gen/fma/e17c5c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.wgsl b/test/builtins/gen/fma/e17c5c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fma/e17c5c.wgsl.expected.wgsl
rename to test/builtins/gen/fma/e17c5c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fract/8bc1e9.wgsl b/test/builtins/gen/fract/8bc1e9.wgsl
new file mode 100644
index 0000000..5e0bd12
--- /dev/null
+++ b/test/builtins/gen/fract/8bc1e9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fract(vec<4, f32>) -> vec<4, f32>
+fn fract_8bc1e9() {
+  var res: vec4<f32> = fract(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_8bc1e9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fract_8bc1e9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  fract_8bc1e9();
+}
diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.glsl b/test/builtins/gen/fract/8bc1e9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fract/8bc1e9.wgsl.expected.glsl
rename to test/builtins/gen/fract/8bc1e9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.hlsl b/test/builtins/gen/fract/8bc1e9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fract/8bc1e9.wgsl.expected.hlsl
rename to test/builtins/gen/fract/8bc1e9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.msl b/test/builtins/gen/fract/8bc1e9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fract/8bc1e9.wgsl.expected.msl
rename to test/builtins/gen/fract/8bc1e9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.spvasm b/test/builtins/gen/fract/8bc1e9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fract/8bc1e9.wgsl.expected.spvasm
rename to test/builtins/gen/fract/8bc1e9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.wgsl b/test/builtins/gen/fract/8bc1e9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fract/8bc1e9.wgsl.expected.wgsl
rename to test/builtins/gen/fract/8bc1e9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fract/943cb1.wgsl b/test/builtins/gen/fract/943cb1.wgsl
new file mode 100644
index 0000000..b269c78
--- /dev/null
+++ b/test/builtins/gen/fract/943cb1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fract(vec<2, f32>) -> vec<2, f32>
+fn fract_943cb1() {
+  var res: vec2<f32> = fract(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_943cb1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fract_943cb1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  fract_943cb1();
+}
diff --git a/test/intrinsics/gen/fract/943cb1.wgsl.expected.glsl b/test/builtins/gen/fract/943cb1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fract/943cb1.wgsl.expected.glsl
rename to test/builtins/gen/fract/943cb1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fract/943cb1.wgsl.expected.hlsl b/test/builtins/gen/fract/943cb1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fract/943cb1.wgsl.expected.hlsl
rename to test/builtins/gen/fract/943cb1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fract/943cb1.wgsl.expected.msl b/test/builtins/gen/fract/943cb1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fract/943cb1.wgsl.expected.msl
rename to test/builtins/gen/fract/943cb1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fract/943cb1.wgsl.expected.spvasm b/test/builtins/gen/fract/943cb1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fract/943cb1.wgsl.expected.spvasm
rename to test/builtins/gen/fract/943cb1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fract/943cb1.wgsl.expected.wgsl b/test/builtins/gen/fract/943cb1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fract/943cb1.wgsl.expected.wgsl
rename to test/builtins/gen/fract/943cb1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fract/a49758.wgsl b/test/builtins/gen/fract/a49758.wgsl
new file mode 100644
index 0000000..fe560aa
--- /dev/null
+++ b/test/builtins/gen/fract/a49758.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fract(vec<3, f32>) -> vec<3, f32>
+fn fract_a49758() {
+  var res: vec3<f32> = fract(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_a49758();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fract_a49758();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  fract_a49758();
+}
diff --git a/test/intrinsics/gen/fract/a49758.wgsl.expected.glsl b/test/builtins/gen/fract/a49758.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fract/a49758.wgsl.expected.glsl
rename to test/builtins/gen/fract/a49758.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fract/a49758.wgsl.expected.hlsl b/test/builtins/gen/fract/a49758.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fract/a49758.wgsl.expected.hlsl
rename to test/builtins/gen/fract/a49758.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fract/a49758.wgsl.expected.msl b/test/builtins/gen/fract/a49758.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fract/a49758.wgsl.expected.msl
rename to test/builtins/gen/fract/a49758.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fract/a49758.wgsl.expected.spvasm b/test/builtins/gen/fract/a49758.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fract/a49758.wgsl.expected.spvasm
rename to test/builtins/gen/fract/a49758.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fract/a49758.wgsl.expected.wgsl b/test/builtins/gen/fract/a49758.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fract/a49758.wgsl.expected.wgsl
rename to test/builtins/gen/fract/a49758.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fract/fa5c71.wgsl b/test/builtins/gen/fract/fa5c71.wgsl
new file mode 100644
index 0000000..bd33eec
--- /dev/null
+++ b/test/builtins/gen/fract/fa5c71.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fract(f32) -> f32
+fn fract_fa5c71() {
+  var res: f32 = fract(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_fa5c71();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fract_fa5c71();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  fract_fa5c71();
+}
diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.glsl b/test/builtins/gen/fract/fa5c71.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fract/fa5c71.wgsl.expected.glsl
rename to test/builtins/gen/fract/fa5c71.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.hlsl b/test/builtins/gen/fract/fa5c71.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fract/fa5c71.wgsl.expected.hlsl
rename to test/builtins/gen/fract/fa5c71.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.msl b/test/builtins/gen/fract/fa5c71.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fract/fa5c71.wgsl.expected.msl
rename to test/builtins/gen/fract/fa5c71.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.spvasm b/test/builtins/gen/fract/fa5c71.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fract/fa5c71.wgsl.expected.spvasm
rename to test/builtins/gen/fract/fa5c71.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.wgsl b/test/builtins/gen/fract/fa5c71.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fract/fa5c71.wgsl.expected.wgsl
rename to test/builtins/gen/fract/fa5c71.wgsl.expected.wgsl
diff --git a/test/builtins/gen/frexp/368997.wgsl b/test/builtins/gen/frexp/368997.wgsl
new file mode 100644
index 0000000..231ffdc
--- /dev/null
+++ b/test/builtins/gen/frexp/368997.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn frexp(vec<3, f32>) -> __frexp_result_vec<3>
+fn frexp_368997() {
+  var res = frexp(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_368997();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  frexp_368997();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  frexp_368997();
+}
diff --git a/test/intrinsics/gen/frexp/368997.wgsl.expected.glsl b/test/builtins/gen/frexp/368997.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/frexp/368997.wgsl.expected.glsl
rename to test/builtins/gen/frexp/368997.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/frexp/368997.wgsl.expected.hlsl b/test/builtins/gen/frexp/368997.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/frexp/368997.wgsl.expected.hlsl
rename to test/builtins/gen/frexp/368997.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/frexp/368997.wgsl.expected.msl b/test/builtins/gen/frexp/368997.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/frexp/368997.wgsl.expected.msl
rename to test/builtins/gen/frexp/368997.wgsl.expected.msl
diff --git a/test/intrinsics/gen/frexp/368997.wgsl.expected.spvasm b/test/builtins/gen/frexp/368997.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/frexp/368997.wgsl.expected.spvasm
rename to test/builtins/gen/frexp/368997.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/frexp/368997.wgsl.expected.wgsl b/test/builtins/gen/frexp/368997.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/frexp/368997.wgsl.expected.wgsl
rename to test/builtins/gen/frexp/368997.wgsl.expected.wgsl
diff --git a/test/builtins/gen/frexp/3c4f48.wgsl b/test/builtins/gen/frexp/3c4f48.wgsl
new file mode 100644
index 0000000..cafc0f7
--- /dev/null
+++ b/test/builtins/gen/frexp/3c4f48.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn frexp(vec<4, f32>) -> __frexp_result_vec<4>
+fn frexp_3c4f48() {
+  var res = frexp(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_3c4f48();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  frexp_3c4f48();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  frexp_3c4f48();
+}
diff --git a/test/intrinsics/gen/frexp/3c4f48.wgsl.expected.glsl b/test/builtins/gen/frexp/3c4f48.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/frexp/3c4f48.wgsl.expected.glsl
rename to test/builtins/gen/frexp/3c4f48.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/frexp/3c4f48.wgsl.expected.hlsl b/test/builtins/gen/frexp/3c4f48.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/frexp/3c4f48.wgsl.expected.hlsl
rename to test/builtins/gen/frexp/3c4f48.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/frexp/3c4f48.wgsl.expected.msl b/test/builtins/gen/frexp/3c4f48.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/frexp/3c4f48.wgsl.expected.msl
rename to test/builtins/gen/frexp/3c4f48.wgsl.expected.msl
diff --git a/test/intrinsics/gen/frexp/3c4f48.wgsl.expected.spvasm b/test/builtins/gen/frexp/3c4f48.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/frexp/3c4f48.wgsl.expected.spvasm
rename to test/builtins/gen/frexp/3c4f48.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/frexp/3c4f48.wgsl.expected.wgsl b/test/builtins/gen/frexp/3c4f48.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/frexp/3c4f48.wgsl.expected.wgsl
rename to test/builtins/gen/frexp/3c4f48.wgsl.expected.wgsl
diff --git a/test/builtins/gen/frexp/4bdfc7.wgsl b/test/builtins/gen/frexp/4bdfc7.wgsl
new file mode 100644
index 0000000..81504c3
--- /dev/null
+++ b/test/builtins/gen/frexp/4bdfc7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn frexp(vec<2, f32>) -> __frexp_result_vec<2>
+fn frexp_4bdfc7() {
+  var res = frexp(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_4bdfc7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  frexp_4bdfc7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  frexp_4bdfc7();
+}
diff --git a/test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.glsl b/test/builtins/gen/frexp/4bdfc7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.glsl
rename to test/builtins/gen/frexp/4bdfc7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.hlsl b/test/builtins/gen/frexp/4bdfc7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.hlsl
rename to test/builtins/gen/frexp/4bdfc7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.msl b/test/builtins/gen/frexp/4bdfc7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.msl
rename to test/builtins/gen/frexp/4bdfc7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.spvasm b/test/builtins/gen/frexp/4bdfc7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.spvasm
rename to test/builtins/gen/frexp/4bdfc7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.wgsl b/test/builtins/gen/frexp/4bdfc7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.wgsl
rename to test/builtins/gen/frexp/4bdfc7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/frexp/eabd40.wgsl b/test/builtins/gen/frexp/eabd40.wgsl
new file mode 100644
index 0000000..3451539
--- /dev/null
+++ b/test/builtins/gen/frexp/eabd40.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn frexp(f32) -> __frexp_result
+fn frexp_eabd40() {
+  var res = frexp(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_eabd40();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  frexp_eabd40();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  frexp_eabd40();
+}
diff --git a/test/intrinsics/gen/frexp/eabd40.wgsl.expected.glsl b/test/builtins/gen/frexp/eabd40.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/frexp/eabd40.wgsl.expected.glsl
rename to test/builtins/gen/frexp/eabd40.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/frexp/eabd40.wgsl.expected.hlsl b/test/builtins/gen/frexp/eabd40.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/frexp/eabd40.wgsl.expected.hlsl
rename to test/builtins/gen/frexp/eabd40.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/frexp/eabd40.wgsl.expected.msl b/test/builtins/gen/frexp/eabd40.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/frexp/eabd40.wgsl.expected.msl
rename to test/builtins/gen/frexp/eabd40.wgsl.expected.msl
diff --git a/test/intrinsics/gen/frexp/eabd40.wgsl.expected.spvasm b/test/builtins/gen/frexp/eabd40.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/frexp/eabd40.wgsl.expected.spvasm
rename to test/builtins/gen/frexp/eabd40.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/frexp/eabd40.wgsl.expected.wgsl b/test/builtins/gen/frexp/eabd40.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/frexp/eabd40.wgsl.expected.wgsl
rename to test/builtins/gen/frexp/eabd40.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidth/5d1b39.wgsl b/test/builtins/gen/fwidth/5d1b39.wgsl
new file mode 100644
index 0000000..991a417
--- /dev/null
+++ b/test/builtins/gen/fwidth/5d1b39.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidth(vec<3, f32>) -> vec<3, f32>
+fn fwidth_5d1b39() {
+  var res: vec3<f32> = fwidth(vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidth_5d1b39();
+}
diff --git a/test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.glsl b/test/builtins/gen/fwidth/5d1b39.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.glsl
rename to test/builtins/gen/fwidth/5d1b39.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.hlsl b/test/builtins/gen/fwidth/5d1b39.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.hlsl
rename to test/builtins/gen/fwidth/5d1b39.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.msl b/test/builtins/gen/fwidth/5d1b39.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.msl
rename to test/builtins/gen/fwidth/5d1b39.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.spvasm b/test/builtins/gen/fwidth/5d1b39.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.spvasm
rename to test/builtins/gen/fwidth/5d1b39.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.wgsl b/test/builtins/gen/fwidth/5d1b39.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.wgsl
rename to test/builtins/gen/fwidth/5d1b39.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidth/b83ebb.wgsl b/test/builtins/gen/fwidth/b83ebb.wgsl
new file mode 100644
index 0000000..f616e2b
--- /dev/null
+++ b/test/builtins/gen/fwidth/b83ebb.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidth(vec<2, f32>) -> vec<2, f32>
+fn fwidth_b83ebb() {
+  var res: vec2<f32> = fwidth(vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidth_b83ebb();
+}
diff --git a/test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.glsl b/test/builtins/gen/fwidth/b83ebb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.glsl
rename to test/builtins/gen/fwidth/b83ebb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.hlsl b/test/builtins/gen/fwidth/b83ebb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.hlsl
rename to test/builtins/gen/fwidth/b83ebb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.msl b/test/builtins/gen/fwidth/b83ebb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.msl
rename to test/builtins/gen/fwidth/b83ebb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.spvasm b/test/builtins/gen/fwidth/b83ebb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.spvasm
rename to test/builtins/gen/fwidth/b83ebb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.wgsl b/test/builtins/gen/fwidth/b83ebb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.wgsl
rename to test/builtins/gen/fwidth/b83ebb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidth/d2ab9a.wgsl b/test/builtins/gen/fwidth/d2ab9a.wgsl
new file mode 100644
index 0000000..4e3e059
--- /dev/null
+++ b/test/builtins/gen/fwidth/d2ab9a.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidth(vec<4, f32>) -> vec<4, f32>
+fn fwidth_d2ab9a() {
+  var res: vec4<f32> = fwidth(vec4<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidth_d2ab9a();
+}
diff --git a/test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.glsl b/test/builtins/gen/fwidth/d2ab9a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.glsl
rename to test/builtins/gen/fwidth/d2ab9a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.hlsl b/test/builtins/gen/fwidth/d2ab9a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.hlsl
rename to test/builtins/gen/fwidth/d2ab9a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.msl b/test/builtins/gen/fwidth/d2ab9a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.msl
rename to test/builtins/gen/fwidth/d2ab9a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.spvasm b/test/builtins/gen/fwidth/d2ab9a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.spvasm
rename to test/builtins/gen/fwidth/d2ab9a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.wgsl b/test/builtins/gen/fwidth/d2ab9a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.wgsl
rename to test/builtins/gen/fwidth/d2ab9a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidth/df38ef.wgsl b/test/builtins/gen/fwidth/df38ef.wgsl
new file mode 100644
index 0000000..c38975d
--- /dev/null
+++ b/test/builtins/gen/fwidth/df38ef.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidth(f32) -> f32
+fn fwidth_df38ef() {
+  var res: f32 = fwidth(1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidth_df38ef();
+}
diff --git a/test/intrinsics/gen/fwidth/df38ef.wgsl.expected.glsl b/test/builtins/gen/fwidth/df38ef.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/df38ef.wgsl.expected.glsl
rename to test/builtins/gen/fwidth/df38ef.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidth/df38ef.wgsl.expected.hlsl b/test/builtins/gen/fwidth/df38ef.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/df38ef.wgsl.expected.hlsl
rename to test/builtins/gen/fwidth/df38ef.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidth/df38ef.wgsl.expected.msl b/test/builtins/gen/fwidth/df38ef.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidth/df38ef.wgsl.expected.msl
rename to test/builtins/gen/fwidth/df38ef.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidth/df38ef.wgsl.expected.spvasm b/test/builtins/gen/fwidth/df38ef.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidth/df38ef.wgsl.expected.spvasm
rename to test/builtins/gen/fwidth/df38ef.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidth/df38ef.wgsl.expected.wgsl b/test/builtins/gen/fwidth/df38ef.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidth/df38ef.wgsl.expected.wgsl
rename to test/builtins/gen/fwidth/df38ef.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidthCoarse/159c8a.wgsl b/test/builtins/gen/fwidthCoarse/159c8a.wgsl
new file mode 100644
index 0000000..eebdef6
--- /dev/null
+++ b/test/builtins/gen/fwidthCoarse/159c8a.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidthCoarse(f32) -> f32
+fn fwidthCoarse_159c8a() {
+  var res: f32 = fwidthCoarse(1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidthCoarse_159c8a();
+}
diff --git a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.glsl b/test/builtins/gen/fwidthCoarse/159c8a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.glsl
rename to test/builtins/gen/fwidthCoarse/159c8a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.hlsl b/test/builtins/gen/fwidthCoarse/159c8a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.hlsl
rename to test/builtins/gen/fwidthCoarse/159c8a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.msl b/test/builtins/gen/fwidthCoarse/159c8a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.msl
rename to test/builtins/gen/fwidthCoarse/159c8a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.spvasm b/test/builtins/gen/fwidthCoarse/159c8a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.spvasm
rename to test/builtins/gen/fwidthCoarse/159c8a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.wgsl b/test/builtins/gen/fwidthCoarse/159c8a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.wgsl
rename to test/builtins/gen/fwidthCoarse/159c8a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidthCoarse/1e59d9.wgsl b/test/builtins/gen/fwidthCoarse/1e59d9.wgsl
new file mode 100644
index 0000000..7416c8b
--- /dev/null
+++ b/test/builtins/gen/fwidthCoarse/1e59d9.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidthCoarse(vec<3, f32>) -> vec<3, f32>
+fn fwidthCoarse_1e59d9() {
+  var res: vec3<f32> = fwidthCoarse(vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidthCoarse_1e59d9();
+}
diff --git a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.glsl b/test/builtins/gen/fwidthCoarse/1e59d9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.glsl
rename to test/builtins/gen/fwidthCoarse/1e59d9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.hlsl b/test/builtins/gen/fwidthCoarse/1e59d9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.hlsl
rename to test/builtins/gen/fwidthCoarse/1e59d9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.msl b/test/builtins/gen/fwidthCoarse/1e59d9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.msl
rename to test/builtins/gen/fwidthCoarse/1e59d9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.spvasm b/test/builtins/gen/fwidthCoarse/1e59d9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.spvasm
rename to test/builtins/gen/fwidthCoarse/1e59d9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.wgsl b/test/builtins/gen/fwidthCoarse/1e59d9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.wgsl
rename to test/builtins/gen/fwidthCoarse/1e59d9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidthCoarse/4e4fc4.wgsl b/test/builtins/gen/fwidthCoarse/4e4fc4.wgsl
new file mode 100644
index 0000000..d1cbee8
--- /dev/null
+++ b/test/builtins/gen/fwidthCoarse/4e4fc4.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidthCoarse(vec<4, f32>) -> vec<4, f32>
+fn fwidthCoarse_4e4fc4() {
+  var res: vec4<f32> = fwidthCoarse(vec4<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidthCoarse_4e4fc4();
+}
diff --git a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.glsl b/test/builtins/gen/fwidthCoarse/4e4fc4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.glsl
rename to test/builtins/gen/fwidthCoarse/4e4fc4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.hlsl b/test/builtins/gen/fwidthCoarse/4e4fc4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.hlsl
rename to test/builtins/gen/fwidthCoarse/4e4fc4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.msl b/test/builtins/gen/fwidthCoarse/4e4fc4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.msl
rename to test/builtins/gen/fwidthCoarse/4e4fc4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.spvasm b/test/builtins/gen/fwidthCoarse/4e4fc4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.spvasm
rename to test/builtins/gen/fwidthCoarse/4e4fc4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.wgsl b/test/builtins/gen/fwidthCoarse/4e4fc4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.wgsl
rename to test/builtins/gen/fwidthCoarse/4e4fc4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidthCoarse/e653f7.wgsl b/test/builtins/gen/fwidthCoarse/e653f7.wgsl
new file mode 100644
index 0000000..5736185
--- /dev/null
+++ b/test/builtins/gen/fwidthCoarse/e653f7.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidthCoarse(vec<2, f32>) -> vec<2, f32>
+fn fwidthCoarse_e653f7() {
+  var res: vec2<f32> = fwidthCoarse(vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidthCoarse_e653f7();
+}
diff --git a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.glsl b/test/builtins/gen/fwidthCoarse/e653f7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.glsl
rename to test/builtins/gen/fwidthCoarse/e653f7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.hlsl b/test/builtins/gen/fwidthCoarse/e653f7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.hlsl
rename to test/builtins/gen/fwidthCoarse/e653f7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.msl b/test/builtins/gen/fwidthCoarse/e653f7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.msl
rename to test/builtins/gen/fwidthCoarse/e653f7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.spvasm b/test/builtins/gen/fwidthCoarse/e653f7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.spvasm
rename to test/builtins/gen/fwidthCoarse/e653f7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.wgsl b/test/builtins/gen/fwidthCoarse/e653f7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.wgsl
rename to test/builtins/gen/fwidthCoarse/e653f7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidthFine/523fdc.wgsl b/test/builtins/gen/fwidthFine/523fdc.wgsl
new file mode 100644
index 0000000..fe89ae7
--- /dev/null
+++ b/test/builtins/gen/fwidthFine/523fdc.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidthFine(vec<3, f32>) -> vec<3, f32>
+fn fwidthFine_523fdc() {
+  var res: vec3<f32> = fwidthFine(vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidthFine_523fdc();
+}
diff --git a/test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.glsl b/test/builtins/gen/fwidthFine/523fdc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.glsl
rename to test/builtins/gen/fwidthFine/523fdc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.hlsl b/test/builtins/gen/fwidthFine/523fdc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.hlsl
rename to test/builtins/gen/fwidthFine/523fdc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.msl b/test/builtins/gen/fwidthFine/523fdc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.msl
rename to test/builtins/gen/fwidthFine/523fdc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.spvasm b/test/builtins/gen/fwidthFine/523fdc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.spvasm
rename to test/builtins/gen/fwidthFine/523fdc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.wgsl b/test/builtins/gen/fwidthFine/523fdc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.wgsl
rename to test/builtins/gen/fwidthFine/523fdc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidthFine/68f4ef.wgsl b/test/builtins/gen/fwidthFine/68f4ef.wgsl
new file mode 100644
index 0000000..f53e145
--- /dev/null
+++ b/test/builtins/gen/fwidthFine/68f4ef.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidthFine(vec<4, f32>) -> vec<4, f32>
+fn fwidthFine_68f4ef() {
+  var res: vec4<f32> = fwidthFine(vec4<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidthFine_68f4ef();
+}
diff --git a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.glsl b/test/builtins/gen/fwidthFine/68f4ef.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.glsl
rename to test/builtins/gen/fwidthFine/68f4ef.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.hlsl b/test/builtins/gen/fwidthFine/68f4ef.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.hlsl
rename to test/builtins/gen/fwidthFine/68f4ef.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.msl b/test/builtins/gen/fwidthFine/68f4ef.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.msl
rename to test/builtins/gen/fwidthFine/68f4ef.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.spvasm b/test/builtins/gen/fwidthFine/68f4ef.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.spvasm
rename to test/builtins/gen/fwidthFine/68f4ef.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.wgsl b/test/builtins/gen/fwidthFine/68f4ef.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.wgsl
rename to test/builtins/gen/fwidthFine/68f4ef.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidthFine/f1742d.wgsl b/test/builtins/gen/fwidthFine/f1742d.wgsl
new file mode 100644
index 0000000..51c2e44
--- /dev/null
+++ b/test/builtins/gen/fwidthFine/f1742d.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidthFine(f32) -> f32
+fn fwidthFine_f1742d() {
+  var res: f32 = fwidthFine(1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidthFine_f1742d();
+}
diff --git a/test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.glsl b/test/builtins/gen/fwidthFine/f1742d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.glsl
rename to test/builtins/gen/fwidthFine/f1742d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.hlsl b/test/builtins/gen/fwidthFine/f1742d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.hlsl
rename to test/builtins/gen/fwidthFine/f1742d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.msl b/test/builtins/gen/fwidthFine/f1742d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.msl
rename to test/builtins/gen/fwidthFine/f1742d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.spvasm b/test/builtins/gen/fwidthFine/f1742d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.spvasm
rename to test/builtins/gen/fwidthFine/f1742d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.wgsl b/test/builtins/gen/fwidthFine/f1742d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.wgsl
rename to test/builtins/gen/fwidthFine/f1742d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/fwidthFine/ff6aa0.wgsl b/test/builtins/gen/fwidthFine/ff6aa0.wgsl
new file mode 100644
index 0000000..c30a97a
--- /dev/null
+++ b/test/builtins/gen/fwidthFine/ff6aa0.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn fwidthFine(vec<2, f32>) -> vec<2, f32>
+fn fwidthFine_ff6aa0() {
+  var res: vec2<f32> = fwidthFine(vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  fwidthFine_ff6aa0();
+}
diff --git a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.glsl b/test/builtins/gen/fwidthFine/ff6aa0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.glsl
rename to test/builtins/gen/fwidthFine/ff6aa0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.hlsl b/test/builtins/gen/fwidthFine/ff6aa0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.hlsl
rename to test/builtins/gen/fwidthFine/ff6aa0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.msl b/test/builtins/gen/fwidthFine/ff6aa0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.msl
rename to test/builtins/gen/fwidthFine/ff6aa0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.spvasm b/test/builtins/gen/fwidthFine/ff6aa0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.spvasm
rename to test/builtins/gen/fwidthFine/ff6aa0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.wgsl b/test/builtins/gen/fwidthFine/ff6aa0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.wgsl
rename to test/builtins/gen/fwidthFine/ff6aa0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/inverseSqrt/84407e.wgsl b/test/builtins/gen/inverseSqrt/84407e.wgsl
new file mode 100644
index 0000000..d46dfea
--- /dev/null
+++ b/test/builtins/gen/inverseSqrt/84407e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn inverseSqrt(f32) -> f32
+fn inverseSqrt_84407e() {
+  var res: f32 = inverseSqrt(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_84407e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  inverseSqrt_84407e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_84407e();
+}
diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.glsl b/test/builtins/gen/inverseSqrt/84407e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.glsl
rename to test/builtins/gen/inverseSqrt/84407e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.hlsl b/test/builtins/gen/inverseSqrt/84407e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.hlsl
rename to test/builtins/gen/inverseSqrt/84407e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.msl b/test/builtins/gen/inverseSqrt/84407e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.msl
rename to test/builtins/gen/inverseSqrt/84407e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.spvasm b/test/builtins/gen/inverseSqrt/84407e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.spvasm
rename to test/builtins/gen/inverseSqrt/84407e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.wgsl b/test/builtins/gen/inverseSqrt/84407e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.wgsl
rename to test/builtins/gen/inverseSqrt/84407e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/inverseSqrt/8f2bd2.wgsl b/test/builtins/gen/inverseSqrt/8f2bd2.wgsl
new file mode 100644
index 0000000..3cd7ac9
--- /dev/null
+++ b/test/builtins/gen/inverseSqrt/8f2bd2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn inverseSqrt(vec<2, f32>) -> vec<2, f32>
+fn inverseSqrt_8f2bd2() {
+  var res: vec2<f32> = inverseSqrt(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_8f2bd2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  inverseSqrt_8f2bd2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_8f2bd2();
+}
diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.glsl b/test/builtins/gen/inverseSqrt/8f2bd2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.glsl
rename to test/builtins/gen/inverseSqrt/8f2bd2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl b/test/builtins/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl
rename to test/builtins/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.msl b/test/builtins/gen/inverseSqrt/8f2bd2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.msl
rename to test/builtins/gen/inverseSqrt/8f2bd2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.spvasm b/test/builtins/gen/inverseSqrt/8f2bd2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.spvasm
rename to test/builtins/gen/inverseSqrt/8f2bd2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.wgsl b/test/builtins/gen/inverseSqrt/8f2bd2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.wgsl
rename to test/builtins/gen/inverseSqrt/8f2bd2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/inverseSqrt/b197b1.wgsl b/test/builtins/gen/inverseSqrt/b197b1.wgsl
new file mode 100644
index 0000000..a061520
--- /dev/null
+++ b/test/builtins/gen/inverseSqrt/b197b1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn inverseSqrt(vec<3, f32>) -> vec<3, f32>
+fn inverseSqrt_b197b1() {
+  var res: vec3<f32> = inverseSqrt(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_b197b1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  inverseSqrt_b197b1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_b197b1();
+}
diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.glsl b/test/builtins/gen/inverseSqrt/b197b1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.glsl
rename to test/builtins/gen/inverseSqrt/b197b1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.hlsl b/test/builtins/gen/inverseSqrt/b197b1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.hlsl
rename to test/builtins/gen/inverseSqrt/b197b1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.msl b/test/builtins/gen/inverseSqrt/b197b1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.msl
rename to test/builtins/gen/inverseSqrt/b197b1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.spvasm b/test/builtins/gen/inverseSqrt/b197b1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.spvasm
rename to test/builtins/gen/inverseSqrt/b197b1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.wgsl b/test/builtins/gen/inverseSqrt/b197b1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.wgsl
rename to test/builtins/gen/inverseSqrt/b197b1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/inverseSqrt/c22347.wgsl b/test/builtins/gen/inverseSqrt/c22347.wgsl
new file mode 100644
index 0000000..7a9d368
--- /dev/null
+++ b/test/builtins/gen/inverseSqrt/c22347.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn inverseSqrt(vec<4, f32>) -> vec<4, f32>
+fn inverseSqrt_c22347() {
+  var res: vec4<f32> = inverseSqrt(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_c22347();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  inverseSqrt_c22347();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_c22347();
+}
diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.glsl b/test/builtins/gen/inverseSqrt/c22347.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.glsl
rename to test/builtins/gen/inverseSqrt/c22347.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.hlsl b/test/builtins/gen/inverseSqrt/c22347.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.hlsl
rename to test/builtins/gen/inverseSqrt/c22347.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.msl b/test/builtins/gen/inverseSqrt/c22347.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.msl
rename to test/builtins/gen/inverseSqrt/c22347.wgsl.expected.msl
diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.spvasm b/test/builtins/gen/inverseSqrt/c22347.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.spvasm
rename to test/builtins/gen/inverseSqrt/c22347.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.wgsl b/test/builtins/gen/inverseSqrt/c22347.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.wgsl
rename to test/builtins/gen/inverseSqrt/c22347.wgsl.expected.wgsl
diff --git a/test/builtins/gen/isFinite/34d32b.wgsl b/test/builtins/gen/isFinite/34d32b.wgsl
new file mode 100644
index 0000000..ef5358d
--- /dev/null
+++ b/test/builtins/gen/isFinite/34d32b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isFinite(vec<2, f32>) -> vec<2, bool>
+fn isFinite_34d32b() {
+  var res: vec2<bool> = isFinite(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isFinite_34d32b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isFinite_34d32b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isFinite_34d32b();
+}
diff --git a/test/builtins/gen/isFinite/34d32b.wgsl.expected.glsl b/test/builtins/gen/isFinite/34d32b.wgsl.expected.glsl
new file mode 100644
index 0000000..6de5cd4
--- /dev/null
+++ b/test/builtins/gen/isFinite/34d32b.wgsl.expected.glsl
@@ -0,0 +1,80 @@
+SKIP: FAILED
+
+builtins/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isFinite(vec2<f32>());
+                        ^^^^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isFinite_34d32b() {
+  bvec2 res = isfinite(vec2(0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isFinite_34d32b();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 2-component vector of bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+void isFinite_34d32b() {
+  bvec2 res = isfinite(vec2(0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isFinite_34d32b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 2-component vector of bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+void isFinite_34d32b() {
+  bvec2 res = isfinite(vec2(0.0f, 0.0f));
+}
+
+void compute_main() {
+  isFinite_34d32b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 2-component vector of bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/builtins/gen/isFinite/34d32b.wgsl.expected.hlsl b/test/builtins/gen/isFinite/34d32b.wgsl.expected.hlsl
new file mode 100644
index 0000000..4301e88
--- /dev/null
+++ b/test/builtins/gen/isFinite/34d32b.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isFinite(vec2<f32>());
+                        ^^^^^^^^
+
+void isFinite_34d32b() {
+  bool2 res = isfinite(float2(0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isFinite_34d32b();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isFinite_34d32b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isFinite_34d32b();
+  return;
+}
diff --git a/test/builtins/gen/isFinite/34d32b.wgsl.expected.msl b/test/builtins/gen/isFinite/34d32b.wgsl.expected.msl
new file mode 100644
index 0000000..d482cc2
--- /dev/null
+++ b/test/builtins/gen/isFinite/34d32b.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isFinite(vec2<f32>());
+                        ^^^^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isFinite_34d32b() {
+  bool2 res = isfinite(float2());
+}
+
+float4 vertex_main_inner() {
+  isFinite_34d32b();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isFinite_34d32b();
+  return;
+}
+
+kernel void compute_main() {
+  isFinite_34d32b();
+  return;
+}
+
diff --git a/test/builtins/gen/isFinite/34d32b.wgsl.expected.spvasm b/test/builtins/gen/isFinite/34d32b.wgsl.expected.spvasm
new file mode 100644
index 0000000..f33dc85
--- /dev/null
+++ b/test/builtins/gen/isFinite/34d32b.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+builtins/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isFinite(vec2<f32>());
+                        ^^^^^^^^
+
+; 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 %isFinite_34d32b "isFinite_34d32b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v2bool = OpTypeVector %bool 2
+    %v2float = OpTypeVector %float 2
+         %17 = OpConstantNull %v2float
+%_ptr_Function_v2bool = OpTypePointer Function %v2bool
+         %23 = OpConstantNull %v2bool
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isFinite_34d32b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2bool Function %23
+         %18 = OpIsInf %v2bool %17
+         %19 = OpIsNan %v2bool %17
+         %20 = OpLogicalOr %v2bool %18 %19
+         %13 = OpLogicalNot %v2bool %20
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %isFinite_34d32b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %isFinite_34d32b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %isFinite_34d32b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isFinite/34d32b.wgsl.expected.wgsl b/test/builtins/gen/isFinite/34d32b.wgsl.expected.wgsl
new file mode 100644
index 0000000..17242cf
--- /dev/null
+++ b/test/builtins/gen/isFinite/34d32b.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isFinite(vec2<f32>());
+                        ^^^^^^^^
+
+fn isFinite_34d32b() {
+  var res : vec2<bool> = isFinite(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isFinite_34d32b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isFinite_34d32b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isFinite_34d32b();
+}
diff --git a/test/builtins/gen/isFinite/426f9f.wgsl b/test/builtins/gen/isFinite/426f9f.wgsl
new file mode 100644
index 0000000..43e2406
--- /dev/null
+++ b/test/builtins/gen/isFinite/426f9f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isFinite(f32) -> bool
+fn isFinite_426f9f() {
+  var res: bool = isFinite(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isFinite_426f9f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isFinite_426f9f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isFinite_426f9f();
+}
diff --git a/test/builtins/gen/isFinite/426f9f.wgsl.expected.glsl b/test/builtins/gen/isFinite/426f9f.wgsl.expected.glsl
new file mode 100644
index 0000000..51d1125
--- /dev/null
+++ b/test/builtins/gen/isFinite/426f9f.wgsl.expected.glsl
@@ -0,0 +1,80 @@
+SKIP: FAILED
+
+builtins/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isFinite(1.0);
+                  ^^^^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isFinite_426f9f() {
+  bool res = isfinite(1.0f);
+}
+
+vec4 vertex_main() {
+  isFinite_426f9f();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+void isFinite_426f9f() {
+  bool res = isfinite(1.0f);
+}
+
+void fragment_main() {
+  isFinite_426f9f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+void isFinite_426f9f() {
+  bool res = isfinite(1.0f);
+}
+
+void compute_main() {
+  isFinite_426f9f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/builtins/gen/isFinite/426f9f.wgsl.expected.hlsl b/test/builtins/gen/isFinite/426f9f.wgsl.expected.hlsl
new file mode 100644
index 0000000..8ba2451
--- /dev/null
+++ b/test/builtins/gen/isFinite/426f9f.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isFinite(1.0);
+                  ^^^^^^^^
+
+void isFinite_426f9f() {
+  bool res = isfinite(1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isFinite_426f9f();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isFinite_426f9f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isFinite_426f9f();
+  return;
+}
diff --git a/test/builtins/gen/isFinite/426f9f.wgsl.expected.msl b/test/builtins/gen/isFinite/426f9f.wgsl.expected.msl
new file mode 100644
index 0000000..eff348c
--- /dev/null
+++ b/test/builtins/gen/isFinite/426f9f.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isFinite(1.0);
+                  ^^^^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isFinite_426f9f() {
+  bool res = isfinite(1.0f);
+}
+
+float4 vertex_main_inner() {
+  isFinite_426f9f();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isFinite_426f9f();
+  return;
+}
+
+kernel void compute_main() {
+  isFinite_426f9f();
+  return;
+}
+
diff --git a/test/builtins/gen/isFinite/426f9f.wgsl.expected.spvasm b/test/builtins/gen/isFinite/426f9f.wgsl.expected.spvasm
new file mode 100644
index 0000000..6e64e7e
--- /dev/null
+++ b/test/builtins/gen/isFinite/426f9f.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+builtins/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isFinite(1.0);
+                  ^^^^^^^^
+
+; 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 %isFinite_426f9f "isFinite_426f9f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+    %float_1 = OpConstant %float 1
+%_ptr_Function_bool = OpTypePointer Function %bool
+         %21 = OpConstantNull %bool
+         %22 = OpTypeFunction %v4float
+%isFinite_426f9f = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_bool Function %21
+         %16 = OpIsInf %bool %float_1
+         %17 = OpIsNan %bool %float_1
+         %18 = OpLogicalOr %bool %16 %17
+         %13 = OpLogicalNot %bool %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %isFinite_426f9f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %isFinite_426f9f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %isFinite_426f9f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isFinite/426f9f.wgsl.expected.wgsl b/test/builtins/gen/isFinite/426f9f.wgsl.expected.wgsl
new file mode 100644
index 0000000..c532c74
--- /dev/null
+++ b/test/builtins/gen/isFinite/426f9f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isFinite(1.0);
+                  ^^^^^^^^
+
+fn isFinite_426f9f() {
+  var res : bool = isFinite(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isFinite_426f9f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isFinite_426f9f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isFinite_426f9f();
+}
diff --git a/test/builtins/gen/isFinite/8a23ad.wgsl b/test/builtins/gen/isFinite/8a23ad.wgsl
new file mode 100644
index 0000000..7f554c3
--- /dev/null
+++ b/test/builtins/gen/isFinite/8a23ad.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isFinite(vec<3, f32>) -> vec<3, bool>
+fn isFinite_8a23ad() {
+  var res: vec3<bool> = isFinite(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isFinite_8a23ad();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isFinite_8a23ad();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isFinite_8a23ad();
+}
diff --git a/test/builtins/gen/isFinite/8a23ad.wgsl.expected.glsl b/test/builtins/gen/isFinite/8a23ad.wgsl.expected.glsl
new file mode 100644
index 0000000..a4f158f
--- /dev/null
+++ b/test/builtins/gen/isFinite/8a23ad.wgsl.expected.glsl
@@ -0,0 +1,80 @@
+SKIP: FAILED
+
+builtins/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isFinite(vec3<f32>());
+                        ^^^^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isFinite_8a23ad() {
+  bvec3 res = isfinite(vec3(0.0f, 0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isFinite_8a23ad();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 3-component vector of bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+void isFinite_8a23ad() {
+  bvec3 res = isfinite(vec3(0.0f, 0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isFinite_8a23ad();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 3-component vector of bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+void isFinite_8a23ad() {
+  bvec3 res = isfinite(vec3(0.0f, 0.0f, 0.0f));
+}
+
+void compute_main() {
+  isFinite_8a23ad();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 3-component vector of bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/builtins/gen/isFinite/8a23ad.wgsl.expected.hlsl b/test/builtins/gen/isFinite/8a23ad.wgsl.expected.hlsl
new file mode 100644
index 0000000..b61ed9a
--- /dev/null
+++ b/test/builtins/gen/isFinite/8a23ad.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isFinite(vec3<f32>());
+                        ^^^^^^^^
+
+void isFinite_8a23ad() {
+  bool3 res = isfinite(float3(0.0f, 0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isFinite_8a23ad();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isFinite_8a23ad();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isFinite_8a23ad();
+  return;
+}
diff --git a/test/builtins/gen/isFinite/8a23ad.wgsl.expected.msl b/test/builtins/gen/isFinite/8a23ad.wgsl.expected.msl
new file mode 100644
index 0000000..e95e8b4
--- /dev/null
+++ b/test/builtins/gen/isFinite/8a23ad.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isFinite(vec3<f32>());
+                        ^^^^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isFinite_8a23ad() {
+  bool3 res = isfinite(float3());
+}
+
+float4 vertex_main_inner() {
+  isFinite_8a23ad();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isFinite_8a23ad();
+  return;
+}
+
+kernel void compute_main() {
+  isFinite_8a23ad();
+  return;
+}
+
diff --git a/test/builtins/gen/isFinite/8a23ad.wgsl.expected.spvasm b/test/builtins/gen/isFinite/8a23ad.wgsl.expected.spvasm
new file mode 100644
index 0000000..cd0fed3
--- /dev/null
+++ b/test/builtins/gen/isFinite/8a23ad.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+builtins/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isFinite(vec3<f32>());
+                        ^^^^^^^^
+
+; 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 %isFinite_8a23ad "isFinite_8a23ad"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+    %v3float = OpTypeVector %float 3
+         %17 = OpConstantNull %v3float
+%_ptr_Function_v3bool = OpTypePointer Function %v3bool
+         %23 = OpConstantNull %v3bool
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isFinite_8a23ad = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3bool Function %23
+         %18 = OpIsInf %v3bool %17
+         %19 = OpIsNan %v3bool %17
+         %20 = OpLogicalOr %v3bool %18 %19
+         %13 = OpLogicalNot %v3bool %20
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %isFinite_8a23ad
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %isFinite_8a23ad
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %isFinite_8a23ad
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isFinite/8a23ad.wgsl.expected.wgsl b/test/builtins/gen/isFinite/8a23ad.wgsl.expected.wgsl
new file mode 100644
index 0000000..5ac53aa
--- /dev/null
+++ b/test/builtins/gen/isFinite/8a23ad.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isFinite(vec3<f32>());
+                        ^^^^^^^^
+
+fn isFinite_8a23ad() {
+  var res : vec3<bool> = isFinite(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isFinite_8a23ad();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isFinite_8a23ad();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isFinite_8a23ad();
+}
diff --git a/test/builtins/gen/isFinite/f31987.wgsl b/test/builtins/gen/isFinite/f31987.wgsl
new file mode 100644
index 0000000..d2f5926
--- /dev/null
+++ b/test/builtins/gen/isFinite/f31987.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isFinite(vec<4, f32>) -> vec<4, bool>
+fn isFinite_f31987() {
+  var res: vec4<bool> = isFinite(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isFinite_f31987();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isFinite_f31987();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isFinite_f31987();
+}
diff --git a/test/builtins/gen/isFinite/f31987.wgsl.expected.glsl b/test/builtins/gen/isFinite/f31987.wgsl.expected.glsl
new file mode 100644
index 0000000..3d49f8e
--- /dev/null
+++ b/test/builtins/gen/isFinite/f31987.wgsl.expected.glsl
@@ -0,0 +1,80 @@
+SKIP: FAILED
+
+builtins/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isFinite(vec4<f32>());
+                        ^^^^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isFinite_f31987() {
+  bvec4 res = isfinite(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isFinite_f31987();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 4-component vector of bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+void isFinite_f31987() {
+  bvec4 res = isfinite(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isFinite_f31987();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 4-component vector of bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+void isFinite_f31987() {
+  bvec4 res = isfinite(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+void compute_main() {
+  isFinite_f31987();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'isfinite' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 4-component vector of bool'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/builtins/gen/isFinite/f31987.wgsl.expected.hlsl b/test/builtins/gen/isFinite/f31987.wgsl.expected.hlsl
new file mode 100644
index 0000000..ae6ac32
--- /dev/null
+++ b/test/builtins/gen/isFinite/f31987.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isFinite(vec4<f32>());
+                        ^^^^^^^^
+
+void isFinite_f31987() {
+  bool4 res = isfinite(float4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isFinite_f31987();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isFinite_f31987();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isFinite_f31987();
+  return;
+}
diff --git a/test/builtins/gen/isFinite/f31987.wgsl.expected.msl b/test/builtins/gen/isFinite/f31987.wgsl.expected.msl
new file mode 100644
index 0000000..4a0ac00
--- /dev/null
+++ b/test/builtins/gen/isFinite/f31987.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isFinite(vec4<f32>());
+                        ^^^^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isFinite_f31987() {
+  bool4 res = isfinite(float4());
+}
+
+float4 vertex_main_inner() {
+  isFinite_f31987();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isFinite_f31987();
+  return;
+}
+
+kernel void compute_main() {
+  isFinite_f31987();
+  return;
+}
+
diff --git a/test/builtins/gen/isFinite/f31987.wgsl.expected.spvasm b/test/builtins/gen/isFinite/f31987.wgsl.expected.spvasm
new file mode 100644
index 0000000..b6d6711
--- /dev/null
+++ b/test/builtins/gen/isFinite/f31987.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+builtins/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isFinite(vec4<f32>());
+                        ^^^^^^^^
+
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %isFinite_f31987 "isFinite_f31987"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+%_ptr_Function_v4bool = OpTypePointer Function %v4bool
+         %21 = OpConstantNull %v4bool
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isFinite_f31987 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4bool Function %21
+         %16 = OpIsInf %v4bool %5
+         %17 = OpIsNan %v4bool %5
+         %18 = OpLogicalOr %v4bool %16 %17
+         %13 = OpLogicalNot %v4bool %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %isFinite_f31987
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %isFinite_f31987
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %isFinite_f31987
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isFinite/f31987.wgsl.expected.wgsl b/test/builtins/gen/isFinite/f31987.wgsl.expected.wgsl
new file mode 100644
index 0000000..e13a8c9
--- /dev/null
+++ b/test/builtins/gen/isFinite/f31987.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isFinite(vec4<f32>());
+                        ^^^^^^^^
+
+fn isFinite_f31987() {
+  var res : vec4<bool> = isFinite(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isFinite_f31987();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isFinite_f31987();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isFinite_f31987();
+}
diff --git a/test/builtins/gen/isInf/666f2a.wgsl b/test/builtins/gen/isInf/666f2a.wgsl
new file mode 100644
index 0000000..c3e9927
--- /dev/null
+++ b/test/builtins/gen/isInf/666f2a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isInf(vec<3, f32>) -> vec<3, bool>
+fn isInf_666f2a() {
+  var res: vec3<bool> = isInf(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isInf_666f2a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isInf_666f2a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isInf_666f2a();
+}
diff --git a/test/builtins/gen/isInf/666f2a.wgsl.expected.glsl b/test/builtins/gen/isInf/666f2a.wgsl.expected.glsl
new file mode 100644
index 0000000..e0830f8
--- /dev/null
+++ b/test/builtins/gen/isInf/666f2a.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+builtins/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isInf(vec3<f32>());
+                        ^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isInf_666f2a() {
+  bvec3 res = isinf(vec3(0.0f, 0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isInf_666f2a();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = 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;
+
+void isInf_666f2a() {
+  bvec3 res = isinf(vec3(0.0f, 0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isInf_666f2a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+precision mediump float;
+
+void isInf_666f2a() {
+  bvec3 res = isinf(vec3(0.0f, 0.0f, 0.0f));
+}
+
+void compute_main() {
+  isInf_666f2a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/builtins/gen/isInf/666f2a.wgsl.expected.hlsl b/test/builtins/gen/isInf/666f2a.wgsl.expected.hlsl
new file mode 100644
index 0000000..8890a79
--- /dev/null
+++ b/test/builtins/gen/isInf/666f2a.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isInf(vec3<f32>());
+                        ^^^^^
+
+void isInf_666f2a() {
+  bool3 res = isinf(float3(0.0f, 0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isInf_666f2a();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isInf_666f2a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isInf_666f2a();
+  return;
+}
diff --git a/test/builtins/gen/isInf/666f2a.wgsl.expected.msl b/test/builtins/gen/isInf/666f2a.wgsl.expected.msl
new file mode 100644
index 0000000..4b65427
--- /dev/null
+++ b/test/builtins/gen/isInf/666f2a.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isInf(vec3<f32>());
+                        ^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isInf_666f2a() {
+  bool3 res = isinf(float3());
+}
+
+float4 vertex_main_inner() {
+  isInf_666f2a();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isInf_666f2a();
+  return;
+}
+
+kernel void compute_main() {
+  isInf_666f2a();
+  return;
+}
+
diff --git a/test/builtins/gen/isInf/666f2a.wgsl.expected.spvasm b/test/builtins/gen/isInf/666f2a.wgsl.expected.spvasm
new file mode 100644
index 0000000..6cea7ae
--- /dev/null
+++ b/test/builtins/gen/isInf/666f2a.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+builtins/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isInf(vec3<f32>());
+                        ^^^^^
+
+; 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 %isInf_666f2a "isInf_666f2a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+    %v3float = OpTypeVector %float 3
+         %17 = OpConstantNull %v3float
+%_ptr_Function_v3bool = OpTypePointer Function %v3bool
+         %20 = OpConstantNull %v3bool
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isInf_666f2a = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3bool Function %20
+         %13 = OpIsInf %v3bool %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %isInf_666f2a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %isInf_666f2a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %isInf_666f2a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isInf/666f2a.wgsl.expected.wgsl b/test/builtins/gen/isInf/666f2a.wgsl.expected.wgsl
new file mode 100644
index 0000000..a3f6c55
--- /dev/null
+++ b/test/builtins/gen/isInf/666f2a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isInf(vec3<f32>());
+                        ^^^^^
+
+fn isInf_666f2a() {
+  var res : vec3<bool> = isInf(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isInf_666f2a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isInf_666f2a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isInf_666f2a();
+}
diff --git a/test/builtins/gen/isInf/7bd98f.wgsl b/test/builtins/gen/isInf/7bd98f.wgsl
new file mode 100644
index 0000000..ce3683d
--- /dev/null
+++ b/test/builtins/gen/isInf/7bd98f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isInf(f32) -> bool
+fn isInf_7bd98f() {
+  var res: bool = isInf(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isInf_7bd98f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isInf_7bd98f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isInf_7bd98f();
+}
diff --git a/test/builtins/gen/isInf/7bd98f.wgsl.expected.glsl b/test/builtins/gen/isInf/7bd98f.wgsl.expected.glsl
new file mode 100644
index 0000000..09b1082
--- /dev/null
+++ b/test/builtins/gen/isInf/7bd98f.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+builtins/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isInf(1.0);
+                  ^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isInf_7bd98f() {
+  bool res = isinf(1.0f);
+}
+
+vec4 vertex_main() {
+  isInf_7bd98f();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = 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;
+
+void isInf_7bd98f() {
+  bool res = isinf(1.0f);
+}
+
+void fragment_main() {
+  isInf_7bd98f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+precision mediump float;
+
+void isInf_7bd98f() {
+  bool res = isinf(1.0f);
+}
+
+void compute_main() {
+  isInf_7bd98f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/builtins/gen/isInf/7bd98f.wgsl.expected.hlsl b/test/builtins/gen/isInf/7bd98f.wgsl.expected.hlsl
new file mode 100644
index 0000000..bfff65b
--- /dev/null
+++ b/test/builtins/gen/isInf/7bd98f.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isInf(1.0);
+                  ^^^^^
+
+void isInf_7bd98f() {
+  bool res = isinf(1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isInf_7bd98f();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isInf_7bd98f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isInf_7bd98f();
+  return;
+}
diff --git a/test/builtins/gen/isInf/7bd98f.wgsl.expected.msl b/test/builtins/gen/isInf/7bd98f.wgsl.expected.msl
new file mode 100644
index 0000000..d5894d2
--- /dev/null
+++ b/test/builtins/gen/isInf/7bd98f.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isInf(1.0);
+                  ^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isInf_7bd98f() {
+  bool res = isinf(1.0f);
+}
+
+float4 vertex_main_inner() {
+  isInf_7bd98f();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isInf_7bd98f();
+  return;
+}
+
+kernel void compute_main() {
+  isInf_7bd98f();
+  return;
+}
+
diff --git a/test/builtins/gen/isInf/7bd98f.wgsl.expected.spvasm b/test/builtins/gen/isInf/7bd98f.wgsl.expected.spvasm
new file mode 100644
index 0000000..b1f68c1
--- /dev/null
+++ b/test/builtins/gen/isInf/7bd98f.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+builtins/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isInf(1.0);
+                  ^^^^^
+
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %isInf_7bd98f "isInf_7bd98f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+    %float_1 = OpConstant %float 1
+%_ptr_Function_bool = OpTypePointer Function %bool
+         %18 = OpConstantNull %bool
+         %19 = OpTypeFunction %v4float
+%isInf_7bd98f = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_bool Function %18
+         %13 = OpIsInf %bool %float_1
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %isInf_7bd98f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %isInf_7bd98f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %isInf_7bd98f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isInf/7bd98f.wgsl.expected.wgsl b/test/builtins/gen/isInf/7bd98f.wgsl.expected.wgsl
new file mode 100644
index 0000000..c153269
--- /dev/null
+++ b/test/builtins/gen/isInf/7bd98f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isInf(1.0);
+                  ^^^^^
+
+fn isInf_7bd98f() {
+  var res : bool = isInf(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isInf_7bd98f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isInf_7bd98f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isInf_7bd98f();
+}
diff --git a/test/builtins/gen/isInf/7e81b5.wgsl b/test/builtins/gen/isInf/7e81b5.wgsl
new file mode 100644
index 0000000..4b077bd
--- /dev/null
+++ b/test/builtins/gen/isInf/7e81b5.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isInf(vec<4, f32>) -> vec<4, bool>
+fn isInf_7e81b5() {
+  var res: vec4<bool> = isInf(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isInf_7e81b5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isInf_7e81b5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isInf_7e81b5();
+}
diff --git a/test/builtins/gen/isInf/7e81b5.wgsl.expected.glsl b/test/builtins/gen/isInf/7e81b5.wgsl.expected.glsl
new file mode 100644
index 0000000..b2e3c87
--- /dev/null
+++ b/test/builtins/gen/isInf/7e81b5.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+builtins/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isInf(vec4<f32>());
+                        ^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isInf_7e81b5() {
+  bvec4 res = isinf(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isInf_7e81b5();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = 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;
+
+void isInf_7e81b5() {
+  bvec4 res = isinf(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isInf_7e81b5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+precision mediump float;
+
+void isInf_7e81b5() {
+  bvec4 res = isinf(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+void compute_main() {
+  isInf_7e81b5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/builtins/gen/isInf/7e81b5.wgsl.expected.hlsl b/test/builtins/gen/isInf/7e81b5.wgsl.expected.hlsl
new file mode 100644
index 0000000..4078ead
--- /dev/null
+++ b/test/builtins/gen/isInf/7e81b5.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isInf(vec4<f32>());
+                        ^^^^^
+
+void isInf_7e81b5() {
+  bool4 res = isinf(float4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isInf_7e81b5();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isInf_7e81b5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isInf_7e81b5();
+  return;
+}
diff --git a/test/builtins/gen/isInf/7e81b5.wgsl.expected.msl b/test/builtins/gen/isInf/7e81b5.wgsl.expected.msl
new file mode 100644
index 0000000..e41bafa
--- /dev/null
+++ b/test/builtins/gen/isInf/7e81b5.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isInf(vec4<f32>());
+                        ^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isInf_7e81b5() {
+  bool4 res = isinf(float4());
+}
+
+float4 vertex_main_inner() {
+  isInf_7e81b5();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isInf_7e81b5();
+  return;
+}
+
+kernel void compute_main() {
+  isInf_7e81b5();
+  return;
+}
+
diff --git a/test/builtins/gen/isInf/7e81b5.wgsl.expected.spvasm b/test/builtins/gen/isInf/7e81b5.wgsl.expected.spvasm
new file mode 100644
index 0000000..304a980
--- /dev/null
+++ b/test/builtins/gen/isInf/7e81b5.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+builtins/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isInf(vec4<f32>());
+                        ^^^^^
+
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %isInf_7e81b5 "isInf_7e81b5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+%_ptr_Function_v4bool = OpTypePointer Function %v4bool
+         %18 = OpConstantNull %v4bool
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isInf_7e81b5 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4bool Function %18
+         %13 = OpIsInf %v4bool %5
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %isInf_7e81b5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %isInf_7e81b5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %isInf_7e81b5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isInf/7e81b5.wgsl.expected.wgsl b/test/builtins/gen/isInf/7e81b5.wgsl.expected.wgsl
new file mode 100644
index 0000000..44f63a9
--- /dev/null
+++ b/test/builtins/gen/isInf/7e81b5.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isInf(vec4<f32>());
+                        ^^^^^
+
+fn isInf_7e81b5() {
+  var res : vec4<bool> = isInf(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isInf_7e81b5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isInf_7e81b5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isInf_7e81b5();
+}
diff --git a/test/builtins/gen/isInf/a46d6f.wgsl b/test/builtins/gen/isInf/a46d6f.wgsl
new file mode 100644
index 0000000..0d08ca2
--- /dev/null
+++ b/test/builtins/gen/isInf/a46d6f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isInf(vec<2, f32>) -> vec<2, bool>
+fn isInf_a46d6f() {
+  var res: vec2<bool> = isInf(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isInf_a46d6f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isInf_a46d6f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isInf_a46d6f();
+}
diff --git a/test/builtins/gen/isInf/a46d6f.wgsl.expected.glsl b/test/builtins/gen/isInf/a46d6f.wgsl.expected.glsl
new file mode 100644
index 0000000..d106427
--- /dev/null
+++ b/test/builtins/gen/isInf/a46d6f.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+builtins/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isInf(vec2<f32>());
+                        ^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isInf_a46d6f() {
+  bvec2 res = isinf(vec2(0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isInf_a46d6f();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = 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;
+
+void isInf_a46d6f() {
+  bvec2 res = isinf(vec2(0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isInf_a46d6f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+precision mediump float;
+
+void isInf_a46d6f() {
+  bvec2 res = isinf(vec2(0.0f, 0.0f));
+}
+
+void compute_main() {
+  isInf_a46d6f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/builtins/gen/isInf/a46d6f.wgsl.expected.hlsl b/test/builtins/gen/isInf/a46d6f.wgsl.expected.hlsl
new file mode 100644
index 0000000..c1d2bf2
--- /dev/null
+++ b/test/builtins/gen/isInf/a46d6f.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isInf(vec2<f32>());
+                        ^^^^^
+
+void isInf_a46d6f() {
+  bool2 res = isinf(float2(0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isInf_a46d6f();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isInf_a46d6f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isInf_a46d6f();
+  return;
+}
diff --git a/test/builtins/gen/isInf/a46d6f.wgsl.expected.msl b/test/builtins/gen/isInf/a46d6f.wgsl.expected.msl
new file mode 100644
index 0000000..50474b5
--- /dev/null
+++ b/test/builtins/gen/isInf/a46d6f.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isInf(vec2<f32>());
+                        ^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isInf_a46d6f() {
+  bool2 res = isinf(float2());
+}
+
+float4 vertex_main_inner() {
+  isInf_a46d6f();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isInf_a46d6f();
+  return;
+}
+
+kernel void compute_main() {
+  isInf_a46d6f();
+  return;
+}
+
diff --git a/test/builtins/gen/isInf/a46d6f.wgsl.expected.spvasm b/test/builtins/gen/isInf/a46d6f.wgsl.expected.spvasm
new file mode 100644
index 0000000..c0a8d72
--- /dev/null
+++ b/test/builtins/gen/isInf/a46d6f.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+builtins/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isInf(vec2<f32>());
+                        ^^^^^
+
+; 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 %isInf_a46d6f "isInf_a46d6f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v2bool = OpTypeVector %bool 2
+    %v2float = OpTypeVector %float 2
+         %17 = OpConstantNull %v2float
+%_ptr_Function_v2bool = OpTypePointer Function %v2bool
+         %20 = OpConstantNull %v2bool
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isInf_a46d6f = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2bool Function %20
+         %13 = OpIsInf %v2bool %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %isInf_a46d6f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %isInf_a46d6f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %isInf_a46d6f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isInf/a46d6f.wgsl.expected.wgsl b/test/builtins/gen/isInf/a46d6f.wgsl.expected.wgsl
new file mode 100644
index 0000000..d9b764d
--- /dev/null
+++ b/test/builtins/gen/isInf/a46d6f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isInf(vec2<f32>());
+                        ^^^^^
+
+fn isInf_a46d6f() {
+  var res : vec2<bool> = isInf(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isInf_a46d6f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isInf_a46d6f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isInf_a46d6f();
+}
diff --git a/test/builtins/gen/isNan/1280ab.wgsl b/test/builtins/gen/isNan/1280ab.wgsl
new file mode 100644
index 0000000..7495a29
--- /dev/null
+++ b/test/builtins/gen/isNan/1280ab.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isNan(vec<3, f32>) -> vec<3, bool>
+fn isNan_1280ab() {
+  var res: vec3<bool> = isNan(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNan_1280ab();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNan_1280ab();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNan_1280ab();
+}
diff --git a/test/builtins/gen/isNan/1280ab.wgsl.expected.glsl b/test/builtins/gen/isNan/1280ab.wgsl.expected.glsl
new file mode 100644
index 0000000..4336d68
--- /dev/null
+++ b/test/builtins/gen/isNan/1280ab.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+builtins/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isNan(vec3<f32>());
+                        ^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isNan_1280ab() {
+  bvec3 res = isnan(vec3(0.0f, 0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isNan_1280ab();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = 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;
+
+void isNan_1280ab() {
+  bvec3 res = isnan(vec3(0.0f, 0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isNan_1280ab();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+precision mediump float;
+
+void isNan_1280ab() {
+  bvec3 res = isnan(vec3(0.0f, 0.0f, 0.0f));
+}
+
+void compute_main() {
+  isNan_1280ab();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/builtins/gen/isNan/1280ab.wgsl.expected.hlsl b/test/builtins/gen/isNan/1280ab.wgsl.expected.hlsl
new file mode 100644
index 0000000..142d86d
--- /dev/null
+++ b/test/builtins/gen/isNan/1280ab.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isNan(vec3<f32>());
+                        ^^^^^
+
+void isNan_1280ab() {
+  bool3 res = isnan(float3(0.0f, 0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isNan_1280ab();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isNan_1280ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isNan_1280ab();
+  return;
+}
diff --git a/test/builtins/gen/isNan/1280ab.wgsl.expected.msl b/test/builtins/gen/isNan/1280ab.wgsl.expected.msl
new file mode 100644
index 0000000..ea4a124
--- /dev/null
+++ b/test/builtins/gen/isNan/1280ab.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isNan(vec3<f32>());
+                        ^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isNan_1280ab() {
+  bool3 res = isnan(float3());
+}
+
+float4 vertex_main_inner() {
+  isNan_1280ab();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isNan_1280ab();
+  return;
+}
+
+kernel void compute_main() {
+  isNan_1280ab();
+  return;
+}
+
diff --git a/test/builtins/gen/isNan/1280ab.wgsl.expected.spvasm b/test/builtins/gen/isNan/1280ab.wgsl.expected.spvasm
new file mode 100644
index 0000000..e12a050
--- /dev/null
+++ b/test/builtins/gen/isNan/1280ab.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+builtins/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isNan(vec3<f32>());
+                        ^^^^^
+
+; 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 %isNan_1280ab "isNan_1280ab"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+    %v3float = OpTypeVector %float 3
+         %17 = OpConstantNull %v3float
+%_ptr_Function_v3bool = OpTypePointer Function %v3bool
+         %20 = OpConstantNull %v3bool
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isNan_1280ab = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3bool Function %20
+         %13 = OpIsNan %v3bool %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %isNan_1280ab
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %isNan_1280ab
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %isNan_1280ab
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isNan/1280ab.wgsl.expected.wgsl b/test/builtins/gen/isNan/1280ab.wgsl.expected.wgsl
new file mode 100644
index 0000000..17dd287
--- /dev/null
+++ b/test/builtins/gen/isNan/1280ab.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isNan(vec3<f32>());
+                        ^^^^^
+
+fn isNan_1280ab() {
+  var res : vec3<bool> = isNan(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNan_1280ab();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNan_1280ab();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNan_1280ab();
+}
diff --git a/test/builtins/gen/isNan/4d280d.wgsl b/test/builtins/gen/isNan/4d280d.wgsl
new file mode 100644
index 0000000..a779709
--- /dev/null
+++ b/test/builtins/gen/isNan/4d280d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isNan(vec<4, f32>) -> vec<4, bool>
+fn isNan_4d280d() {
+  var res: vec4<bool> = isNan(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNan_4d280d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNan_4d280d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNan_4d280d();
+}
diff --git a/test/builtins/gen/isNan/4d280d.wgsl.expected.glsl b/test/builtins/gen/isNan/4d280d.wgsl.expected.glsl
new file mode 100644
index 0000000..ee19e9d
--- /dev/null
+++ b/test/builtins/gen/isNan/4d280d.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+builtins/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isNan(vec4<f32>());
+                        ^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isNan_4d280d() {
+  bvec4 res = isnan(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isNan_4d280d();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = 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;
+
+void isNan_4d280d() {
+  bvec4 res = isnan(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isNan_4d280d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+precision mediump float;
+
+void isNan_4d280d() {
+  bvec4 res = isnan(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+void compute_main() {
+  isNan_4d280d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/builtins/gen/isNan/4d280d.wgsl.expected.hlsl b/test/builtins/gen/isNan/4d280d.wgsl.expected.hlsl
new file mode 100644
index 0000000..724ec54
--- /dev/null
+++ b/test/builtins/gen/isNan/4d280d.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isNan(vec4<f32>());
+                        ^^^^^
+
+void isNan_4d280d() {
+  bool4 res = isnan(float4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isNan_4d280d();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isNan_4d280d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isNan_4d280d();
+  return;
+}
diff --git a/test/builtins/gen/isNan/4d280d.wgsl.expected.msl b/test/builtins/gen/isNan/4d280d.wgsl.expected.msl
new file mode 100644
index 0000000..3aeb871
--- /dev/null
+++ b/test/builtins/gen/isNan/4d280d.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isNan(vec4<f32>());
+                        ^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isNan_4d280d() {
+  bool4 res = isnan(float4());
+}
+
+float4 vertex_main_inner() {
+  isNan_4d280d();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isNan_4d280d();
+  return;
+}
+
+kernel void compute_main() {
+  isNan_4d280d();
+  return;
+}
+
diff --git a/test/builtins/gen/isNan/4d280d.wgsl.expected.spvasm b/test/builtins/gen/isNan/4d280d.wgsl.expected.spvasm
new file mode 100644
index 0000000..1fe2d27
--- /dev/null
+++ b/test/builtins/gen/isNan/4d280d.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+builtins/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isNan(vec4<f32>());
+                        ^^^^^
+
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %isNan_4d280d "isNan_4d280d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+%_ptr_Function_v4bool = OpTypePointer Function %v4bool
+         %18 = OpConstantNull %v4bool
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isNan_4d280d = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4bool Function %18
+         %13 = OpIsNan %v4bool %5
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %isNan_4d280d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %isNan_4d280d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %isNan_4d280d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isNan/4d280d.wgsl.expected.wgsl b/test/builtins/gen/isNan/4d280d.wgsl.expected.wgsl
new file mode 100644
index 0000000..61f41d4
--- /dev/null
+++ b/test/builtins/gen/isNan/4d280d.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isNan(vec4<f32>());
+                        ^^^^^
+
+fn isNan_4d280d() {
+  var res : vec4<bool> = isNan(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNan_4d280d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNan_4d280d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNan_4d280d();
+}
diff --git a/test/builtins/gen/isNan/67ecd3.wgsl b/test/builtins/gen/isNan/67ecd3.wgsl
new file mode 100644
index 0000000..6fa16a6
--- /dev/null
+++ b/test/builtins/gen/isNan/67ecd3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isNan(vec<2, f32>) -> vec<2, bool>
+fn isNan_67ecd3() {
+  var res: vec2<bool> = isNan(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNan_67ecd3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNan_67ecd3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNan_67ecd3();
+}
diff --git a/test/builtins/gen/isNan/67ecd3.wgsl.expected.glsl b/test/builtins/gen/isNan/67ecd3.wgsl.expected.glsl
new file mode 100644
index 0000000..d2b833b
--- /dev/null
+++ b/test/builtins/gen/isNan/67ecd3.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+builtins/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isNan(vec2<f32>());
+                        ^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isNan_67ecd3() {
+  bvec2 res = isnan(vec2(0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isNan_67ecd3();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = 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;
+
+void isNan_67ecd3() {
+  bvec2 res = isnan(vec2(0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isNan_67ecd3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+precision mediump float;
+
+void isNan_67ecd3() {
+  bvec2 res = isnan(vec2(0.0f, 0.0f));
+}
+
+void compute_main() {
+  isNan_67ecd3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/builtins/gen/isNan/67ecd3.wgsl.expected.hlsl b/test/builtins/gen/isNan/67ecd3.wgsl.expected.hlsl
new file mode 100644
index 0000000..f18e86a
--- /dev/null
+++ b/test/builtins/gen/isNan/67ecd3.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isNan(vec2<f32>());
+                        ^^^^^
+
+void isNan_67ecd3() {
+  bool2 res = isnan(float2(0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isNan_67ecd3();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isNan_67ecd3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isNan_67ecd3();
+  return;
+}
diff --git a/test/builtins/gen/isNan/67ecd3.wgsl.expected.msl b/test/builtins/gen/isNan/67ecd3.wgsl.expected.msl
new file mode 100644
index 0000000..b992e74
--- /dev/null
+++ b/test/builtins/gen/isNan/67ecd3.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isNan(vec2<f32>());
+                        ^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isNan_67ecd3() {
+  bool2 res = isnan(float2());
+}
+
+float4 vertex_main_inner() {
+  isNan_67ecd3();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isNan_67ecd3();
+  return;
+}
+
+kernel void compute_main() {
+  isNan_67ecd3();
+  return;
+}
+
diff --git a/test/builtins/gen/isNan/67ecd3.wgsl.expected.spvasm b/test/builtins/gen/isNan/67ecd3.wgsl.expected.spvasm
new file mode 100644
index 0000000..fd0ed88
--- /dev/null
+++ b/test/builtins/gen/isNan/67ecd3.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+builtins/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isNan(vec2<f32>());
+                        ^^^^^
+
+; 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 %isNan_67ecd3 "isNan_67ecd3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v2bool = OpTypeVector %bool 2
+    %v2float = OpTypeVector %float 2
+         %17 = OpConstantNull %v2float
+%_ptr_Function_v2bool = OpTypePointer Function %v2bool
+         %20 = OpConstantNull %v2bool
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isNan_67ecd3 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2bool Function %20
+         %13 = OpIsNan %v2bool %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %isNan_67ecd3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %isNan_67ecd3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %isNan_67ecd3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isNan/67ecd3.wgsl.expected.wgsl b/test/builtins/gen/isNan/67ecd3.wgsl.expected.wgsl
new file mode 100644
index 0000000..59069ab
--- /dev/null
+++ b/test/builtins/gen/isNan/67ecd3.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isNan(vec2<f32>());
+                        ^^^^^
+
+fn isNan_67ecd3() {
+  var res : vec2<bool> = isNan(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNan_67ecd3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNan_67ecd3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNan_67ecd3();
+}
diff --git a/test/builtins/gen/isNan/e4978e.wgsl b/test/builtins/gen/isNan/e4978e.wgsl
new file mode 100644
index 0000000..458f6c1
--- /dev/null
+++ b/test/builtins/gen/isNan/e4978e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isNan(f32) -> bool
+fn isNan_e4978e() {
+  var res: bool = isNan(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNan_e4978e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNan_e4978e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNan_e4978e();
+}
diff --git a/test/builtins/gen/isNan/e4978e.wgsl.expected.glsl b/test/builtins/gen/isNan/e4978e.wgsl.expected.glsl
new file mode 100644
index 0000000..a7f4ead
--- /dev/null
+++ b/test/builtins/gen/isNan/e4978e.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+builtins/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isNan(1.0);
+                  ^^^^^
+
+#version 310 es
+precision mediump float;
+
+void isNan_e4978e() {
+  bool res = isnan(1.0f);
+}
+
+vec4 vertex_main() {
+  isNan_e4978e();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = 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;
+
+void isNan_e4978e() {
+  bool res = isnan(1.0f);
+}
+
+void fragment_main() {
+  isNan_e4978e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+precision mediump float;
+
+void isNan_e4978e() {
+  bool res = isnan(1.0f);
+}
+
+void compute_main() {
+  isNan_e4978e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/builtins/gen/isNan/e4978e.wgsl.expected.hlsl b/test/builtins/gen/isNan/e4978e.wgsl.expected.hlsl
new file mode 100644
index 0000000..6e0a1fd
--- /dev/null
+++ b/test/builtins/gen/isNan/e4978e.wgsl.expected.hlsl
@@ -0,0 +1,34 @@
+builtins/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isNan(1.0);
+                  ^^^^^
+
+void isNan_e4978e() {
+  bool res = isnan(1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isNan_e4978e();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isNan_e4978e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isNan_e4978e();
+  return;
+}
diff --git a/test/builtins/gen/isNan/e4978e.wgsl.expected.msl b/test/builtins/gen/isNan/e4978e.wgsl.expected.msl
new file mode 100644
index 0000000..8ebb00d
--- /dev/null
+++ b/test/builtins/gen/isNan/e4978e.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isNan(1.0);
+                  ^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isNan_e4978e() {
+  bool res = isnan(1.0f);
+}
+
+float4 vertex_main_inner() {
+  isNan_e4978e();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isNan_e4978e();
+  return;
+}
+
+kernel void compute_main() {
+  isNan_e4978e();
+  return;
+}
+
diff --git a/test/builtins/gen/isNan/e4978e.wgsl.expected.spvasm b/test/builtins/gen/isNan/e4978e.wgsl.expected.spvasm
new file mode 100644
index 0000000..0d70048
--- /dev/null
+++ b/test/builtins/gen/isNan/e4978e.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+builtins/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isNan(1.0);
+                  ^^^^^
+
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %isNan_e4978e "isNan_e4978e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+    %float_1 = OpConstant %float 1
+%_ptr_Function_bool = OpTypePointer Function %bool
+         %18 = OpConstantNull %bool
+         %19 = OpTypeFunction %v4float
+%isNan_e4978e = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_bool Function %18
+         %13 = OpIsNan %bool %float_1
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %isNan_e4978e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %isNan_e4978e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %isNan_e4978e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isNan/e4978e.wgsl.expected.wgsl b/test/builtins/gen/isNan/e4978e.wgsl.expected.wgsl
new file mode 100644
index 0000000..840f21a
--- /dev/null
+++ b/test/builtins/gen/isNan/e4978e.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isNan(1.0);
+                  ^^^^^
+
+fn isNan_e4978e() {
+  var res : bool = isNan(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNan_e4978e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNan_e4978e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNan_e4978e();
+}
diff --git a/test/builtins/gen/isNormal/863dcd.wgsl b/test/builtins/gen/isNormal/863dcd.wgsl
new file mode 100644
index 0000000..207f3b6
--- /dev/null
+++ b/test/builtins/gen/isNormal/863dcd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isNormal(vec<4, f32>) -> vec<4, bool>
+fn isNormal_863dcd() {
+  var res: vec4<bool> = isNormal(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNormal_863dcd();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNormal_863dcd();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNormal_863dcd();
+}
diff --git a/test/builtins/gen/isNormal/863dcd.wgsl.expected.glsl b/test/builtins/gen/isNormal/863dcd.wgsl.expected.glsl
new file mode 100644
index 0000000..c33bf3e
--- /dev/null
+++ b/test/builtins/gen/isNormal/863dcd.wgsl.expected.glsl
@@ -0,0 +1,98 @@
+SKIP: FAILED
+
+builtins/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isNormal(vec4<f32>());
+                        ^^^^^^^^
+
+#version 310 es
+precision mediump float;
+
+bvec4 tint_isNormal(vec4 param_0) {
+  uint4 exponent = asuint(param_0) & 0x7f80000;
+  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_863dcd() {
+  bvec4 res = tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isNormal_863dcd();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'uint4' : undeclared identifier
+ERROR: 0:5: '' : compilation terminated
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+bvec4 tint_isNormal(vec4 param_0) {
+  uint4 exponent = asuint(param_0) & 0x7f80000;
+  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_863dcd() {
+  bvec4 res = tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isNormal_863dcd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'uint4' : undeclared identifier
+ERROR: 0:5: '' : compilation terminated
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+bvec4 tint_isNormal(vec4 param_0) {
+  uint4 exponent = asuint(param_0) & 0x7f80000;
+  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_863dcd() {
+  bvec4 res = tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+void compute_main() {
+  isNormal_863dcd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'uint4' : undeclared identifier
+ERROR: 0:5: '' : compilation terminated
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/builtins/gen/isNormal/863dcd.wgsl.expected.hlsl b/test/builtins/gen/isNormal/863dcd.wgsl.expected.hlsl
new file mode 100644
index 0000000..8573bd5
--- /dev/null
+++ b/test/builtins/gen/isNormal/863dcd.wgsl.expected.hlsl
@@ -0,0 +1,40 @@
+builtins/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isNormal(vec4<f32>());
+                        ^^^^^^^^
+
+bool4 tint_isNormal(float4 param_0) {
+  uint4 exponent = asuint(param_0) & 0x7f80000;
+  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+void isNormal_863dcd() {
+  bool4 res = tint_isNormal(float4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isNormal_863dcd();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isNormal_863dcd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isNormal_863dcd();
+  return;
+}
diff --git a/test/builtins/gen/isNormal/863dcd.wgsl.expected.msl b/test/builtins/gen/isNormal/863dcd.wgsl.expected.msl
new file mode 100644
index 0000000..5844ab9
--- /dev/null
+++ b/test/builtins/gen/isNormal/863dcd.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isNormal(vec4<f32>());
+                        ^^^^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isNormal_863dcd() {
+  bool4 res = isnormal(float4());
+}
+
+float4 vertex_main_inner() {
+  isNormal_863dcd();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isNormal_863dcd();
+  return;
+}
+
+kernel void compute_main() {
+  isNormal_863dcd();
+  return;
+}
+
diff --git a/test/builtins/gen/isNormal/863dcd.wgsl.expected.spvasm b/test/builtins/gen/isNormal/863dcd.wgsl.expected.spvasm
new file mode 100644
index 0000000..d776969
--- /dev/null
+++ b/test/builtins/gen/isNormal/863dcd.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+builtins/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isNormal(vec4<f32>());
+                        ^^^^^^^^
+
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+         %16 = 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 %isNormal_863dcd "isNormal_863dcd"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+       %uint = OpTypeInt 32 0
+%uint_133693440 = OpConstant %uint 133693440
+%uint_524288 = OpConstant %uint 524288
+%uint_133169152 = OpConstant %uint 133169152
+     %v4uint = OpTypeVector %uint 4
+%_ptr_Function_v4bool = OpTypePointer Function %v4bool
+         %30 = OpConstantNull %v4bool
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isNormal_863dcd = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4bool Function %30
+         %22 = OpCompositeConstruct %v4uint %uint_133693440 %uint_133693440 %uint_133693440 %uint_133693440
+         %23 = OpCompositeConstruct %v4uint %uint_524288 %uint_524288 %uint_524288 %uint_524288
+         %24 = OpCompositeConstruct %v4uint %uint_133169152 %uint_133169152 %uint_133169152 %uint_133169152
+         %25 = OpBitcast %v4uint %5
+         %26 = OpBitwiseAnd %v4uint %25 %22
+         %27 = OpExtInst %v4uint %16 UClamp %26 %23 %24
+         %13 = OpIEqual %v4bool %26 %27
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %isNormal_863dcd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %isNormal_863dcd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %isNormal_863dcd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isNormal/863dcd.wgsl.expected.wgsl b/test/builtins/gen/isNormal/863dcd.wgsl.expected.wgsl
new file mode 100644
index 0000000..d5c77bf
--- /dev/null
+++ b/test/builtins/gen/isNormal/863dcd.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec4<bool> = isNormal(vec4<f32>());
+                        ^^^^^^^^
+
+fn isNormal_863dcd() {
+  var res : vec4<bool> = isNormal(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNormal_863dcd();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNormal_863dcd();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNormal_863dcd();
+}
diff --git a/test/builtins/gen/isNormal/b00ab1.wgsl b/test/builtins/gen/isNormal/b00ab1.wgsl
new file mode 100644
index 0000000..3820c63
--- /dev/null
+++ b/test/builtins/gen/isNormal/b00ab1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isNormal(vec<2, f32>) -> vec<2, bool>
+fn isNormal_b00ab1() {
+  var res: vec2<bool> = isNormal(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNormal_b00ab1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNormal_b00ab1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNormal_b00ab1();
+}
diff --git a/test/builtins/gen/isNormal/b00ab1.wgsl.expected.glsl b/test/builtins/gen/isNormal/b00ab1.wgsl.expected.glsl
new file mode 100644
index 0000000..ed74f8e
--- /dev/null
+++ b/test/builtins/gen/isNormal/b00ab1.wgsl.expected.glsl
@@ -0,0 +1,98 @@
+SKIP: FAILED
+
+builtins/gen/isNormal/b00ab1.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isNormal(vec2<f32>());
+                        ^^^^^^^^
+
+#version 310 es
+precision mediump float;
+
+bvec2 tint_isNormal(vec2 param_0) {
+  uint2 exponent = asuint(param_0) & 0x7f80000;
+  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_b00ab1() {
+  bvec2 res = tint_isNormal(vec2(0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isNormal_b00ab1();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'uint2' : undeclared identifier
+ERROR: 0:5: '' : compilation terminated
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+bvec2 tint_isNormal(vec2 param_0) {
+  uint2 exponent = asuint(param_0) & 0x7f80000;
+  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_b00ab1() {
+  bvec2 res = tint_isNormal(vec2(0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isNormal_b00ab1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'uint2' : undeclared identifier
+ERROR: 0:5: '' : compilation terminated
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+bvec2 tint_isNormal(vec2 param_0) {
+  uint2 exponent = asuint(param_0) & 0x7f80000;
+  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_b00ab1() {
+  bvec2 res = tint_isNormal(vec2(0.0f, 0.0f));
+}
+
+void compute_main() {
+  isNormal_b00ab1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'uint2' : undeclared identifier
+ERROR: 0:5: '' : compilation terminated
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/builtins/gen/isNormal/b00ab1.wgsl.expected.hlsl b/test/builtins/gen/isNormal/b00ab1.wgsl.expected.hlsl
new file mode 100644
index 0000000..5bcbdb2
--- /dev/null
+++ b/test/builtins/gen/isNormal/b00ab1.wgsl.expected.hlsl
@@ -0,0 +1,40 @@
+builtins/gen/isNormal/b00ab1.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isNormal(vec2<f32>());
+                        ^^^^^^^^
+
+bool2 tint_isNormal(float2 param_0) {
+  uint2 exponent = asuint(param_0) & 0x7f80000;
+  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+void isNormal_b00ab1() {
+  bool2 res = tint_isNormal(float2(0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isNormal_b00ab1();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isNormal_b00ab1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isNormal_b00ab1();
+  return;
+}
diff --git a/test/builtins/gen/isNormal/b00ab1.wgsl.expected.msl b/test/builtins/gen/isNormal/b00ab1.wgsl.expected.msl
new file mode 100644
index 0000000..1203fa9
--- /dev/null
+++ b/test/builtins/gen/isNormal/b00ab1.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isNormal/b00ab1.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isNormal(vec2<f32>());
+                        ^^^^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isNormal_b00ab1() {
+  bool2 res = isnormal(float2());
+}
+
+float4 vertex_main_inner() {
+  isNormal_b00ab1();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isNormal_b00ab1();
+  return;
+}
+
+kernel void compute_main() {
+  isNormal_b00ab1();
+  return;
+}
+
diff --git a/test/builtins/gen/isNormal/b00ab1.wgsl.expected.spvasm b/test/builtins/gen/isNormal/b00ab1.wgsl.expected.spvasm
new file mode 100644
index 0000000..01b0b52
--- /dev/null
+++ b/test/builtins/gen/isNormal/b00ab1.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+builtins/gen/isNormal/b00ab1.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isNormal(vec2<f32>());
+                        ^^^^^^^^
+
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+         %18 = 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 %isNormal_b00ab1 "isNormal_b00ab1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v2bool = OpTypeVector %bool 2
+    %v2float = OpTypeVector %float 2
+         %17 = OpConstantNull %v2float
+       %uint = OpTypeInt 32 0
+%uint_133693440 = OpConstant %uint 133693440
+%uint_524288 = OpConstant %uint 524288
+%uint_133169152 = OpConstant %uint 133169152
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2bool = OpTypePointer Function %v2bool
+         %32 = OpConstantNull %v2bool
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isNormal_b00ab1 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2bool Function %32
+         %24 = OpCompositeConstruct %v2uint %uint_133693440 %uint_133693440
+         %25 = OpCompositeConstruct %v2uint %uint_524288 %uint_524288
+         %26 = OpCompositeConstruct %v2uint %uint_133169152 %uint_133169152
+         %27 = OpBitcast %v2uint %17
+         %28 = OpBitwiseAnd %v2uint %27 %24
+         %29 = OpExtInst %v2uint %18 UClamp %28 %25 %26
+         %13 = OpIEqual %v2bool %28 %29
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %isNormal_b00ab1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %isNormal_b00ab1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %isNormal_b00ab1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isNormal/b00ab1.wgsl.expected.wgsl b/test/builtins/gen/isNormal/b00ab1.wgsl.expected.wgsl
new file mode 100644
index 0000000..cc9832b
--- /dev/null
+++ b/test/builtins/gen/isNormal/b00ab1.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isNormal/b00ab1.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec2<bool> = isNormal(vec2<f32>());
+                        ^^^^^^^^
+
+fn isNormal_b00ab1() {
+  var res : vec2<bool> = isNormal(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNormal_b00ab1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNormal_b00ab1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNormal_b00ab1();
+}
diff --git a/test/builtins/gen/isNormal/c286b7.wgsl b/test/builtins/gen/isNormal/c286b7.wgsl
new file mode 100644
index 0000000..b7cecad
--- /dev/null
+++ b/test/builtins/gen/isNormal/c286b7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isNormal(vec<3, f32>) -> vec<3, bool>
+fn isNormal_c286b7() {
+  var res: vec3<bool> = isNormal(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNormal_c286b7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNormal_c286b7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNormal_c286b7();
+}
diff --git a/test/builtins/gen/isNormal/c286b7.wgsl.expected.glsl b/test/builtins/gen/isNormal/c286b7.wgsl.expected.glsl
new file mode 100644
index 0000000..79e52f6
--- /dev/null
+++ b/test/builtins/gen/isNormal/c286b7.wgsl.expected.glsl
@@ -0,0 +1,98 @@
+SKIP: FAILED
+
+builtins/gen/isNormal/c286b7.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isNormal(vec3<f32>());
+                        ^^^^^^^^
+
+#version 310 es
+precision mediump float;
+
+bvec3 tint_isNormal(vec3 param_0) {
+  uint3 exponent = asuint(param_0) & 0x7f80000;
+  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_c286b7() {
+  bvec3 res = tint_isNormal(vec3(0.0f, 0.0f, 0.0f));
+}
+
+vec4 vertex_main() {
+  isNormal_c286b7();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'uint3' : undeclared identifier
+ERROR: 0:5: '' : compilation terminated
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+bvec3 tint_isNormal(vec3 param_0) {
+  uint3 exponent = asuint(param_0) & 0x7f80000;
+  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_c286b7() {
+  bvec3 res = tint_isNormal(vec3(0.0f, 0.0f, 0.0f));
+}
+
+void fragment_main() {
+  isNormal_c286b7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'uint3' : undeclared identifier
+ERROR: 0:5: '' : compilation terminated
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+bvec3 tint_isNormal(vec3 param_0) {
+  uint3 exponent = asuint(param_0) & 0x7f80000;
+  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_c286b7() {
+  bvec3 res = tint_isNormal(vec3(0.0f, 0.0f, 0.0f));
+}
+
+void compute_main() {
+  isNormal_c286b7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'uint3' : undeclared identifier
+ERROR: 0:5: '' : compilation terminated
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/builtins/gen/isNormal/c286b7.wgsl.expected.hlsl b/test/builtins/gen/isNormal/c286b7.wgsl.expected.hlsl
new file mode 100644
index 0000000..a9061f3
--- /dev/null
+++ b/test/builtins/gen/isNormal/c286b7.wgsl.expected.hlsl
@@ -0,0 +1,40 @@
+builtins/gen/isNormal/c286b7.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isNormal(vec3<f32>());
+                        ^^^^^^^^
+
+bool3 tint_isNormal(float3 param_0) {
+  uint3 exponent = asuint(param_0) & 0x7f80000;
+  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+void isNormal_c286b7() {
+  bool3 res = tint_isNormal(float3(0.0f, 0.0f, 0.0f));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isNormal_c286b7();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isNormal_c286b7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isNormal_c286b7();
+  return;
+}
diff --git a/test/builtins/gen/isNormal/c286b7.wgsl.expected.msl b/test/builtins/gen/isNormal/c286b7.wgsl.expected.msl
new file mode 100644
index 0000000..e344161
--- /dev/null
+++ b/test/builtins/gen/isNormal/c286b7.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isNormal/c286b7.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isNormal(vec3<f32>());
+                        ^^^^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isNormal_c286b7() {
+  bool3 res = isnormal(float3());
+}
+
+float4 vertex_main_inner() {
+  isNormal_c286b7();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isNormal_c286b7();
+  return;
+}
+
+kernel void compute_main() {
+  isNormal_c286b7();
+  return;
+}
+
diff --git a/test/builtins/gen/isNormal/c286b7.wgsl.expected.spvasm b/test/builtins/gen/isNormal/c286b7.wgsl.expected.spvasm
new file mode 100644
index 0000000..2323fa5
--- /dev/null
+++ b/test/builtins/gen/isNormal/c286b7.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+builtins/gen/isNormal/c286b7.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isNormal(vec3<f32>());
+                        ^^^^^^^^
+
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+         %18 = 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 %isNormal_c286b7 "isNormal_c286b7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+    %v3float = OpTypeVector %float 3
+         %17 = OpConstantNull %v3float
+       %uint = OpTypeInt 32 0
+%uint_133693440 = OpConstant %uint 133693440
+%uint_524288 = OpConstant %uint 524288
+%uint_133169152 = OpConstant %uint 133169152
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3bool = OpTypePointer Function %v3bool
+         %32 = OpConstantNull %v3bool
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%isNormal_c286b7 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3bool Function %32
+         %24 = OpCompositeConstruct %v3uint %uint_133693440 %uint_133693440 %uint_133693440
+         %25 = OpCompositeConstruct %v3uint %uint_524288 %uint_524288 %uint_524288
+         %26 = OpCompositeConstruct %v3uint %uint_133169152 %uint_133169152 %uint_133169152
+         %27 = OpBitcast %v3uint %17
+         %28 = OpBitwiseAnd %v3uint %27 %24
+         %29 = OpExtInst %v3uint %18 UClamp %28 %25 %26
+         %13 = OpIEqual %v3bool %28 %29
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %isNormal_c286b7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %isNormal_c286b7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %isNormal_c286b7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isNormal/c286b7.wgsl.expected.wgsl b/test/builtins/gen/isNormal/c286b7.wgsl.expected.wgsl
new file mode 100644
index 0000000..cc68829
--- /dev/null
+++ b/test/builtins/gen/isNormal/c286b7.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isNormal/c286b7.wgsl:28:25 warning: use of deprecated builtin
+  var res: vec3<bool> = isNormal(vec3<f32>());
+                        ^^^^^^^^
+
+fn isNormal_c286b7() {
+  var res : vec3<bool> = isNormal(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNormal_c286b7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNormal_c286b7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNormal_c286b7();
+}
diff --git a/test/builtins/gen/isNormal/c6e880.wgsl b/test/builtins/gen/isNormal/c6e880.wgsl
new file mode 100644
index 0000000..25053e5
--- /dev/null
+++ b/test/builtins/gen/isNormal/c6e880.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn isNormal(f32) -> bool
+fn isNormal_c6e880() {
+  var res: bool = isNormal(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNormal_c6e880();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNormal_c6e880();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNormal_c6e880();
+}
diff --git a/test/builtins/gen/isNormal/c6e880.wgsl.expected.glsl b/test/builtins/gen/isNormal/c6e880.wgsl.expected.glsl
new file mode 100644
index 0000000..ef28761
--- /dev/null
+++ b/test/builtins/gen/isNormal/c6e880.wgsl.expected.glsl
@@ -0,0 +1,101 @@
+SKIP: FAILED
+
+builtins/gen/isNormal/c6e880.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isNormal(1.0);
+                  ^^^^^^^^
+
+#version 310 es
+precision mediump float;
+
+bool tint_isNormal(float param_0) {
+  uint exponent = asuint(param_0) & 0x7f80000;
+  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_c6e880() {
+  bool res = tint_isNormal(1.0f);
+}
+
+vec4 vertex_main() {
+  isNormal_c6e880();
+  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+void main() {
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'asuint' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp highp uint'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+bool tint_isNormal(float param_0) {
+  uint exponent = asuint(param_0) & 0x7f80000;
+  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_c6e880() {
+  bool res = tint_isNormal(1.0f);
+}
+
+void fragment_main() {
+  isNormal_c6e880();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'asuint' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp mediump uint'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+bool tint_isNormal(float param_0) {
+  uint exponent = asuint(param_0) & 0x7f80000;
+  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void isNormal_c6e880() {
+  bool res = tint_isNormal(1.0f);
+}
+
+void compute_main() {
+  isNormal_c6e880();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'asuint' : no matching overloaded function found
+ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp highp uint'
+ERROR: 0:5: '' : compilation terminated
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/builtins/gen/isNormal/c6e880.wgsl.expected.hlsl b/test/builtins/gen/isNormal/c6e880.wgsl.expected.hlsl
new file mode 100644
index 0000000..c54510c
--- /dev/null
+++ b/test/builtins/gen/isNormal/c6e880.wgsl.expected.hlsl
@@ -0,0 +1,40 @@
+builtins/gen/isNormal/c6e880.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isNormal(1.0);
+                  ^^^^^^^^
+
+bool tint_isNormal(float param_0) {
+  uint exponent = asuint(param_0) & 0x7f80000;
+  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+void isNormal_c6e880() {
+  bool res = tint_isNormal(1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  isNormal_c6e880();
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  isNormal_c6e880();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  isNormal_c6e880();
+  return;
+}
diff --git a/test/builtins/gen/isNormal/c6e880.wgsl.expected.msl b/test/builtins/gen/isNormal/c6e880.wgsl.expected.msl
new file mode 100644
index 0000000..94dd83f
--- /dev/null
+++ b/test/builtins/gen/isNormal/c6e880.wgsl.expected.msl
@@ -0,0 +1,37 @@
+builtins/gen/isNormal/c6e880.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isNormal(1.0);
+                  ^^^^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+void isNormal_c6e880() {
+  bool res = isnormal(1.0f);
+}
+
+float4 vertex_main_inner() {
+  isNormal_c6e880();
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  isNormal_c6e880();
+  return;
+}
+
+kernel void compute_main() {
+  isNormal_c6e880();
+  return;
+}
+
diff --git a/test/builtins/gen/isNormal/c6e880.wgsl.expected.spvasm b/test/builtins/gen/isNormal/c6e880.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e1e207
--- /dev/null
+++ b/test/builtins/gen/isNormal/c6e880.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+builtins/gen/isNormal/c6e880.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isNormal(1.0);
+                  ^^^^^^^^
+
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+         %16 = 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 %isNormal_c6e880 "isNormal_c6e880"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %bool = OpTypeBool
+    %float_1 = OpConstant %float 1
+       %uint = OpTypeInt 32 0
+%uint_133693440 = OpConstant %uint 133693440
+%uint_524288 = OpConstant %uint 524288
+%uint_133169152 = OpConstant %uint 133169152
+%_ptr_Function_bool = OpTypePointer Function %bool
+         %26 = OpConstantNull %bool
+         %27 = OpTypeFunction %v4float
+%isNormal_c6e880 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_bool Function %26
+         %21 = OpBitcast %uint %float_1
+         %22 = OpBitwiseAnd %uint %21 %uint_133693440
+         %23 = OpExtInst %uint %16 UClamp %22 %uint_524288 %uint_133169152
+         %13 = OpIEqual %bool %22 %23
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %isNormal_c6e880
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %isNormal_c6e880
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %isNormal_c6e880
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/gen/isNormal/c6e880.wgsl.expected.wgsl b/test/builtins/gen/isNormal/c6e880.wgsl.expected.wgsl
new file mode 100644
index 0000000..2f156b5
--- /dev/null
+++ b/test/builtins/gen/isNormal/c6e880.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+builtins/gen/isNormal/c6e880.wgsl:28:19 warning: use of deprecated builtin
+  var res: bool = isNormal(1.0);
+                  ^^^^^^^^
+
+fn isNormal_c6e880() {
+  var res : bool = isNormal(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  isNormal_c6e880();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  isNormal_c6e880();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  isNormal_c6e880();
+}
diff --git a/test/builtins/gen/ldexp/a31cdc.wgsl b/test/builtins/gen/ldexp/a31cdc.wgsl
new file mode 100644
index 0000000..575bcca
--- /dev/null
+++ b/test/builtins/gen/ldexp/a31cdc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn ldexp(vec<3, f32>, vec<3, i32>) -> vec<3, f32>
+fn ldexp_a31cdc() {
+  var res: vec3<f32> = ldexp(vec3<f32>(), vec3<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_a31cdc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  ldexp_a31cdc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  ldexp_a31cdc();
+}
diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.glsl b/test/builtins/gen/ldexp/a31cdc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.glsl
rename to test/builtins/gen/ldexp/a31cdc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.hlsl b/test/builtins/gen/ldexp/a31cdc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.hlsl
rename to test/builtins/gen/ldexp/a31cdc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.msl b/test/builtins/gen/ldexp/a31cdc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.msl
rename to test/builtins/gen/ldexp/a31cdc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.spvasm b/test/builtins/gen/ldexp/a31cdc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.spvasm
rename to test/builtins/gen/ldexp/a31cdc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.wgsl b/test/builtins/gen/ldexp/a31cdc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.wgsl
rename to test/builtins/gen/ldexp/a31cdc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/ldexp/abd718.wgsl b/test/builtins/gen/ldexp/abd718.wgsl
new file mode 100644
index 0000000..9d03bd8
--- /dev/null
+++ b/test/builtins/gen/ldexp/abd718.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn ldexp(vec<2, f32>, vec<2, i32>) -> vec<2, f32>
+fn ldexp_abd718() {
+  var res: vec2<f32> = ldexp(vec2<f32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_abd718();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  ldexp_abd718();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  ldexp_abd718();
+}
diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.glsl b/test/builtins/gen/ldexp/abd718.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/abd718.wgsl.expected.glsl
rename to test/builtins/gen/ldexp/abd718.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.hlsl b/test/builtins/gen/ldexp/abd718.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/abd718.wgsl.expected.hlsl
rename to test/builtins/gen/ldexp/abd718.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.msl b/test/builtins/gen/ldexp/abd718.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/ldexp/abd718.wgsl.expected.msl
rename to test/builtins/gen/ldexp/abd718.wgsl.expected.msl
diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.spvasm b/test/builtins/gen/ldexp/abd718.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/ldexp/abd718.wgsl.expected.spvasm
rename to test/builtins/gen/ldexp/abd718.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.wgsl b/test/builtins/gen/ldexp/abd718.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/abd718.wgsl.expected.wgsl
rename to test/builtins/gen/ldexp/abd718.wgsl.expected.wgsl
diff --git a/test/builtins/gen/ldexp/cc9cde.wgsl b/test/builtins/gen/ldexp/cc9cde.wgsl
new file mode 100644
index 0000000..aaed15c
--- /dev/null
+++ b/test/builtins/gen/ldexp/cc9cde.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn ldexp(vec<4, f32>, vec<4, i32>) -> vec<4, f32>
+fn ldexp_cc9cde() {
+  var res: vec4<f32> = ldexp(vec4<f32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_cc9cde();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  ldexp_cc9cde();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  ldexp_cc9cde();
+}
diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.glsl b/test/builtins/gen/ldexp/cc9cde.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.glsl
rename to test/builtins/gen/ldexp/cc9cde.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.hlsl b/test/builtins/gen/ldexp/cc9cde.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.hlsl
rename to test/builtins/gen/ldexp/cc9cde.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.msl b/test/builtins/gen/ldexp/cc9cde.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.msl
rename to test/builtins/gen/ldexp/cc9cde.wgsl.expected.msl
diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.spvasm b/test/builtins/gen/ldexp/cc9cde.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.spvasm
rename to test/builtins/gen/ldexp/cc9cde.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.wgsl b/test/builtins/gen/ldexp/cc9cde.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.wgsl
rename to test/builtins/gen/ldexp/cc9cde.wgsl.expected.wgsl
diff --git a/test/builtins/gen/ldexp/db8b49.wgsl b/test/builtins/gen/ldexp/db8b49.wgsl
new file mode 100644
index 0000000..18a79ea
--- /dev/null
+++ b/test/builtins/gen/ldexp/db8b49.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn ldexp(f32, i32) -> f32
+fn ldexp_db8b49() {
+  var res: f32 = ldexp(1.0, 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_db8b49();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  ldexp_db8b49();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  ldexp_db8b49();
+}
diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.glsl b/test/builtins/gen/ldexp/db8b49.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/db8b49.wgsl.expected.glsl
rename to test/builtins/gen/ldexp/db8b49.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.hlsl b/test/builtins/gen/ldexp/db8b49.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/db8b49.wgsl.expected.hlsl
rename to test/builtins/gen/ldexp/db8b49.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.msl b/test/builtins/gen/ldexp/db8b49.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/ldexp/db8b49.wgsl.expected.msl
rename to test/builtins/gen/ldexp/db8b49.wgsl.expected.msl
diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.spvasm b/test/builtins/gen/ldexp/db8b49.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/ldexp/db8b49.wgsl.expected.spvasm
rename to test/builtins/gen/ldexp/db8b49.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.wgsl b/test/builtins/gen/ldexp/db8b49.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/ldexp/db8b49.wgsl.expected.wgsl
rename to test/builtins/gen/ldexp/db8b49.wgsl.expected.wgsl
diff --git a/test/builtins/gen/length/056071.wgsl b/test/builtins/gen/length/056071.wgsl
new file mode 100644
index 0000000..dab742f
--- /dev/null
+++ b/test/builtins/gen/length/056071.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn length(vec<3, f32>) -> f32
+fn length_056071() {
+  var res: f32 = length(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_056071();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  length_056071();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  length_056071();
+}
diff --git a/test/intrinsics/gen/length/056071.wgsl.expected.glsl b/test/builtins/gen/length/056071.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/length/056071.wgsl.expected.glsl
rename to test/builtins/gen/length/056071.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/length/056071.wgsl.expected.hlsl b/test/builtins/gen/length/056071.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/length/056071.wgsl.expected.hlsl
rename to test/builtins/gen/length/056071.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/length/056071.wgsl.expected.msl b/test/builtins/gen/length/056071.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/length/056071.wgsl.expected.msl
rename to test/builtins/gen/length/056071.wgsl.expected.msl
diff --git a/test/intrinsics/gen/length/056071.wgsl.expected.spvasm b/test/builtins/gen/length/056071.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/length/056071.wgsl.expected.spvasm
rename to test/builtins/gen/length/056071.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/length/056071.wgsl.expected.wgsl b/test/builtins/gen/length/056071.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/length/056071.wgsl.expected.wgsl
rename to test/builtins/gen/length/056071.wgsl.expected.wgsl
diff --git a/test/builtins/gen/length/602a17.wgsl b/test/builtins/gen/length/602a17.wgsl
new file mode 100644
index 0000000..092a024
--- /dev/null
+++ b/test/builtins/gen/length/602a17.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn length(f32) -> f32
+fn length_602a17() {
+  var res: f32 = length(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_602a17();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  length_602a17();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  length_602a17();
+}
diff --git a/test/intrinsics/gen/length/602a17.wgsl.expected.glsl b/test/builtins/gen/length/602a17.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/length/602a17.wgsl.expected.glsl
rename to test/builtins/gen/length/602a17.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/length/602a17.wgsl.expected.hlsl b/test/builtins/gen/length/602a17.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/length/602a17.wgsl.expected.hlsl
rename to test/builtins/gen/length/602a17.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/length/602a17.wgsl.expected.msl b/test/builtins/gen/length/602a17.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/length/602a17.wgsl.expected.msl
rename to test/builtins/gen/length/602a17.wgsl.expected.msl
diff --git a/test/intrinsics/gen/length/602a17.wgsl.expected.spvasm b/test/builtins/gen/length/602a17.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/length/602a17.wgsl.expected.spvasm
rename to test/builtins/gen/length/602a17.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/length/602a17.wgsl.expected.wgsl b/test/builtins/gen/length/602a17.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/length/602a17.wgsl.expected.wgsl
rename to test/builtins/gen/length/602a17.wgsl.expected.wgsl
diff --git a/test/builtins/gen/length/afde8b.wgsl b/test/builtins/gen/length/afde8b.wgsl
new file mode 100644
index 0000000..eb77530
--- /dev/null
+++ b/test/builtins/gen/length/afde8b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn length(vec<2, f32>) -> f32
+fn length_afde8b() {
+  var res: f32 = length(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_afde8b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  length_afde8b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  length_afde8b();
+}
diff --git a/test/intrinsics/gen/length/afde8b.wgsl.expected.glsl b/test/builtins/gen/length/afde8b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/length/afde8b.wgsl.expected.glsl
rename to test/builtins/gen/length/afde8b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/length/afde8b.wgsl.expected.hlsl b/test/builtins/gen/length/afde8b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/length/afde8b.wgsl.expected.hlsl
rename to test/builtins/gen/length/afde8b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/length/afde8b.wgsl.expected.msl b/test/builtins/gen/length/afde8b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/length/afde8b.wgsl.expected.msl
rename to test/builtins/gen/length/afde8b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/length/afde8b.wgsl.expected.spvasm b/test/builtins/gen/length/afde8b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/length/afde8b.wgsl.expected.spvasm
rename to test/builtins/gen/length/afde8b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/length/afde8b.wgsl.expected.wgsl b/test/builtins/gen/length/afde8b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/length/afde8b.wgsl.expected.wgsl
rename to test/builtins/gen/length/afde8b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/length/becebf.wgsl b/test/builtins/gen/length/becebf.wgsl
new file mode 100644
index 0000000..ca992f1
--- /dev/null
+++ b/test/builtins/gen/length/becebf.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn length(vec<4, f32>) -> f32
+fn length_becebf() {
+  var res: f32 = length(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_becebf();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  length_becebf();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  length_becebf();
+}
diff --git a/test/intrinsics/gen/length/becebf.wgsl.expected.glsl b/test/builtins/gen/length/becebf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/length/becebf.wgsl.expected.glsl
rename to test/builtins/gen/length/becebf.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/length/becebf.wgsl.expected.hlsl b/test/builtins/gen/length/becebf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/length/becebf.wgsl.expected.hlsl
rename to test/builtins/gen/length/becebf.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/length/becebf.wgsl.expected.msl b/test/builtins/gen/length/becebf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/length/becebf.wgsl.expected.msl
rename to test/builtins/gen/length/becebf.wgsl.expected.msl
diff --git a/test/intrinsics/gen/length/becebf.wgsl.expected.spvasm b/test/builtins/gen/length/becebf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/length/becebf.wgsl.expected.spvasm
rename to test/builtins/gen/length/becebf.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/length/becebf.wgsl.expected.wgsl b/test/builtins/gen/length/becebf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/length/becebf.wgsl.expected.wgsl
rename to test/builtins/gen/length/becebf.wgsl.expected.wgsl
diff --git a/test/builtins/gen/log/3da25a.wgsl b/test/builtins/gen/log/3da25a.wgsl
new file mode 100644
index 0000000..6504dc1
--- /dev/null
+++ b/test/builtins/gen/log/3da25a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn log(vec<4, f32>) -> vec<4, f32>
+fn log_3da25a() {
+  var res: vec4<f32> = log(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_3da25a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  log_3da25a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  log_3da25a();
+}
diff --git a/test/intrinsics/gen/log/3da25a.wgsl.expected.glsl b/test/builtins/gen/log/3da25a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/log/3da25a.wgsl.expected.glsl
rename to test/builtins/gen/log/3da25a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/log/3da25a.wgsl.expected.hlsl b/test/builtins/gen/log/3da25a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/log/3da25a.wgsl.expected.hlsl
rename to test/builtins/gen/log/3da25a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/log/3da25a.wgsl.expected.msl b/test/builtins/gen/log/3da25a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/log/3da25a.wgsl.expected.msl
rename to test/builtins/gen/log/3da25a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/log/3da25a.wgsl.expected.spvasm b/test/builtins/gen/log/3da25a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/log/3da25a.wgsl.expected.spvasm
rename to test/builtins/gen/log/3da25a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/log/3da25a.wgsl.expected.wgsl b/test/builtins/gen/log/3da25a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/log/3da25a.wgsl.expected.wgsl
rename to test/builtins/gen/log/3da25a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/log/7114a6.wgsl b/test/builtins/gen/log/7114a6.wgsl
new file mode 100644
index 0000000..d37f9f9
--- /dev/null
+++ b/test/builtins/gen/log/7114a6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn log(f32) -> f32
+fn log_7114a6() {
+  var res: f32 = log(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_7114a6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  log_7114a6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  log_7114a6();
+}
diff --git a/test/intrinsics/gen/log/7114a6.wgsl.expected.glsl b/test/builtins/gen/log/7114a6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/log/7114a6.wgsl.expected.glsl
rename to test/builtins/gen/log/7114a6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/log/7114a6.wgsl.expected.hlsl b/test/builtins/gen/log/7114a6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/log/7114a6.wgsl.expected.hlsl
rename to test/builtins/gen/log/7114a6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/log/7114a6.wgsl.expected.msl b/test/builtins/gen/log/7114a6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/log/7114a6.wgsl.expected.msl
rename to test/builtins/gen/log/7114a6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/log/7114a6.wgsl.expected.spvasm b/test/builtins/gen/log/7114a6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/log/7114a6.wgsl.expected.spvasm
rename to test/builtins/gen/log/7114a6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/log/7114a6.wgsl.expected.wgsl b/test/builtins/gen/log/7114a6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/log/7114a6.wgsl.expected.wgsl
rename to test/builtins/gen/log/7114a6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/log/b2ce28.wgsl b/test/builtins/gen/log/b2ce28.wgsl
new file mode 100644
index 0000000..38e21d5c
--- /dev/null
+++ b/test/builtins/gen/log/b2ce28.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn log(vec<2, f32>) -> vec<2, f32>
+fn log_b2ce28() {
+  var res: vec2<f32> = log(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_b2ce28();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  log_b2ce28();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  log_b2ce28();
+}
diff --git a/test/intrinsics/gen/log/b2ce28.wgsl.expected.glsl b/test/builtins/gen/log/b2ce28.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/log/b2ce28.wgsl.expected.glsl
rename to test/builtins/gen/log/b2ce28.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/log/b2ce28.wgsl.expected.hlsl b/test/builtins/gen/log/b2ce28.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/log/b2ce28.wgsl.expected.hlsl
rename to test/builtins/gen/log/b2ce28.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/log/b2ce28.wgsl.expected.msl b/test/builtins/gen/log/b2ce28.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/log/b2ce28.wgsl.expected.msl
rename to test/builtins/gen/log/b2ce28.wgsl.expected.msl
diff --git a/test/intrinsics/gen/log/b2ce28.wgsl.expected.spvasm b/test/builtins/gen/log/b2ce28.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/log/b2ce28.wgsl.expected.spvasm
rename to test/builtins/gen/log/b2ce28.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/log/b2ce28.wgsl.expected.wgsl b/test/builtins/gen/log/b2ce28.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/log/b2ce28.wgsl.expected.wgsl
rename to test/builtins/gen/log/b2ce28.wgsl.expected.wgsl
diff --git a/test/builtins/gen/log/f4c570.wgsl b/test/builtins/gen/log/f4c570.wgsl
new file mode 100644
index 0000000..62edf13
--- /dev/null
+++ b/test/builtins/gen/log/f4c570.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn log(vec<3, f32>) -> vec<3, f32>
+fn log_f4c570() {
+  var res: vec3<f32> = log(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_f4c570();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  log_f4c570();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  log_f4c570();
+}
diff --git a/test/intrinsics/gen/log/f4c570.wgsl.expected.glsl b/test/builtins/gen/log/f4c570.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/log/f4c570.wgsl.expected.glsl
rename to test/builtins/gen/log/f4c570.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/log/f4c570.wgsl.expected.hlsl b/test/builtins/gen/log/f4c570.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/log/f4c570.wgsl.expected.hlsl
rename to test/builtins/gen/log/f4c570.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/log/f4c570.wgsl.expected.msl b/test/builtins/gen/log/f4c570.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/log/f4c570.wgsl.expected.msl
rename to test/builtins/gen/log/f4c570.wgsl.expected.msl
diff --git a/test/intrinsics/gen/log/f4c570.wgsl.expected.spvasm b/test/builtins/gen/log/f4c570.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/log/f4c570.wgsl.expected.spvasm
rename to test/builtins/gen/log/f4c570.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/log/f4c570.wgsl.expected.wgsl b/test/builtins/gen/log/f4c570.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/log/f4c570.wgsl.expected.wgsl
rename to test/builtins/gen/log/f4c570.wgsl.expected.wgsl
diff --git a/test/builtins/gen/log2/4036ed.wgsl b/test/builtins/gen/log2/4036ed.wgsl
new file mode 100644
index 0000000..9f08fb0
--- /dev/null
+++ b/test/builtins/gen/log2/4036ed.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn log2(f32) -> f32
+fn log2_4036ed() {
+  var res: f32 = log2(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_4036ed();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  log2_4036ed();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  log2_4036ed();
+}
diff --git a/test/intrinsics/gen/log2/4036ed.wgsl.expected.glsl b/test/builtins/gen/log2/4036ed.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/log2/4036ed.wgsl.expected.glsl
rename to test/builtins/gen/log2/4036ed.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/log2/4036ed.wgsl.expected.hlsl b/test/builtins/gen/log2/4036ed.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/log2/4036ed.wgsl.expected.hlsl
rename to test/builtins/gen/log2/4036ed.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/log2/4036ed.wgsl.expected.msl b/test/builtins/gen/log2/4036ed.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/log2/4036ed.wgsl.expected.msl
rename to test/builtins/gen/log2/4036ed.wgsl.expected.msl
diff --git a/test/intrinsics/gen/log2/4036ed.wgsl.expected.spvasm b/test/builtins/gen/log2/4036ed.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/log2/4036ed.wgsl.expected.spvasm
rename to test/builtins/gen/log2/4036ed.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/log2/4036ed.wgsl.expected.wgsl b/test/builtins/gen/log2/4036ed.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/log2/4036ed.wgsl.expected.wgsl
rename to test/builtins/gen/log2/4036ed.wgsl.expected.wgsl
diff --git a/test/builtins/gen/log2/902988.wgsl b/test/builtins/gen/log2/902988.wgsl
new file mode 100644
index 0000000..e3ed97f
--- /dev/null
+++ b/test/builtins/gen/log2/902988.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn log2(vec<4, f32>) -> vec<4, f32>
+fn log2_902988() {
+  var res: vec4<f32> = log2(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_902988();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  log2_902988();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  log2_902988();
+}
diff --git a/test/intrinsics/gen/log2/902988.wgsl.expected.glsl b/test/builtins/gen/log2/902988.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/log2/902988.wgsl.expected.glsl
rename to test/builtins/gen/log2/902988.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/log2/902988.wgsl.expected.hlsl b/test/builtins/gen/log2/902988.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/log2/902988.wgsl.expected.hlsl
rename to test/builtins/gen/log2/902988.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/log2/902988.wgsl.expected.msl b/test/builtins/gen/log2/902988.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/log2/902988.wgsl.expected.msl
rename to test/builtins/gen/log2/902988.wgsl.expected.msl
diff --git a/test/intrinsics/gen/log2/902988.wgsl.expected.spvasm b/test/builtins/gen/log2/902988.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/log2/902988.wgsl.expected.spvasm
rename to test/builtins/gen/log2/902988.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/log2/902988.wgsl.expected.wgsl b/test/builtins/gen/log2/902988.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/log2/902988.wgsl.expected.wgsl
rename to test/builtins/gen/log2/902988.wgsl.expected.wgsl
diff --git a/test/builtins/gen/log2/adb233.wgsl b/test/builtins/gen/log2/adb233.wgsl
new file mode 100644
index 0000000..07ea6c1
--- /dev/null
+++ b/test/builtins/gen/log2/adb233.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn log2(vec<3, f32>) -> vec<3, f32>
+fn log2_adb233() {
+  var res: vec3<f32> = log2(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_adb233();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  log2_adb233();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  log2_adb233();
+}
diff --git a/test/intrinsics/gen/log2/adb233.wgsl.expected.glsl b/test/builtins/gen/log2/adb233.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/log2/adb233.wgsl.expected.glsl
rename to test/builtins/gen/log2/adb233.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/log2/adb233.wgsl.expected.hlsl b/test/builtins/gen/log2/adb233.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/log2/adb233.wgsl.expected.hlsl
rename to test/builtins/gen/log2/adb233.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/log2/adb233.wgsl.expected.msl b/test/builtins/gen/log2/adb233.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/log2/adb233.wgsl.expected.msl
rename to test/builtins/gen/log2/adb233.wgsl.expected.msl
diff --git a/test/intrinsics/gen/log2/adb233.wgsl.expected.spvasm b/test/builtins/gen/log2/adb233.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/log2/adb233.wgsl.expected.spvasm
rename to test/builtins/gen/log2/adb233.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/log2/adb233.wgsl.expected.wgsl b/test/builtins/gen/log2/adb233.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/log2/adb233.wgsl.expected.wgsl
rename to test/builtins/gen/log2/adb233.wgsl.expected.wgsl
diff --git a/test/builtins/gen/log2/aea659.wgsl b/test/builtins/gen/log2/aea659.wgsl
new file mode 100644
index 0000000..6b91da2
--- /dev/null
+++ b/test/builtins/gen/log2/aea659.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn log2(vec<2, f32>) -> vec<2, f32>
+fn log2_aea659() {
+  var res: vec2<f32> = log2(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_aea659();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  log2_aea659();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  log2_aea659();
+}
diff --git a/test/intrinsics/gen/log2/aea659.wgsl.expected.glsl b/test/builtins/gen/log2/aea659.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/log2/aea659.wgsl.expected.glsl
rename to test/builtins/gen/log2/aea659.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/log2/aea659.wgsl.expected.hlsl b/test/builtins/gen/log2/aea659.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/log2/aea659.wgsl.expected.hlsl
rename to test/builtins/gen/log2/aea659.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/log2/aea659.wgsl.expected.msl b/test/builtins/gen/log2/aea659.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/log2/aea659.wgsl.expected.msl
rename to test/builtins/gen/log2/aea659.wgsl.expected.msl
diff --git a/test/intrinsics/gen/log2/aea659.wgsl.expected.spvasm b/test/builtins/gen/log2/aea659.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/log2/aea659.wgsl.expected.spvasm
rename to test/builtins/gen/log2/aea659.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/log2/aea659.wgsl.expected.wgsl b/test/builtins/gen/log2/aea659.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/log2/aea659.wgsl.expected.wgsl
rename to test/builtins/gen/log2/aea659.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/0c0aae.wgsl b/test/builtins/gen/max/0c0aae.wgsl
new file mode 100644
index 0000000..0f8c133
--- /dev/null
+++ b/test/builtins/gen/max/0c0aae.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(u32, u32) -> u32
+fn max_0c0aae() {
+  var res: u32 = max(1u, 1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_0c0aae();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_0c0aae();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_0c0aae();
+}
diff --git a/test/intrinsics/gen/max/0c0aae.wgsl.expected.glsl b/test/builtins/gen/max/0c0aae.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/0c0aae.wgsl.expected.glsl
rename to test/builtins/gen/max/0c0aae.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/0c0aae.wgsl.expected.hlsl b/test/builtins/gen/max/0c0aae.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/0c0aae.wgsl.expected.hlsl
rename to test/builtins/gen/max/0c0aae.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/0c0aae.wgsl.expected.msl b/test/builtins/gen/max/0c0aae.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/0c0aae.wgsl.expected.msl
rename to test/builtins/gen/max/0c0aae.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/0c0aae.wgsl.expected.spvasm b/test/builtins/gen/max/0c0aae.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/0c0aae.wgsl.expected.spvasm
rename to test/builtins/gen/max/0c0aae.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/0c0aae.wgsl.expected.wgsl b/test/builtins/gen/max/0c0aae.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/0c0aae.wgsl.expected.wgsl
rename to test/builtins/gen/max/0c0aae.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/25eafe.wgsl b/test/builtins/gen/max/25eafe.wgsl
new file mode 100644
index 0000000..ecc90be
--- /dev/null
+++ b/test/builtins/gen/max/25eafe.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(vec<3, i32>, vec<3, i32>) -> vec<3, i32>
+fn max_25eafe() {
+  var res: vec3<i32> = max(vec3<i32>(), vec3<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_25eafe();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_25eafe();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_25eafe();
+}
diff --git a/test/intrinsics/gen/max/25eafe.wgsl.expected.glsl b/test/builtins/gen/max/25eafe.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/25eafe.wgsl.expected.glsl
rename to test/builtins/gen/max/25eafe.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/25eafe.wgsl.expected.hlsl b/test/builtins/gen/max/25eafe.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/25eafe.wgsl.expected.hlsl
rename to test/builtins/gen/max/25eafe.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/25eafe.wgsl.expected.msl b/test/builtins/gen/max/25eafe.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/25eafe.wgsl.expected.msl
rename to test/builtins/gen/max/25eafe.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/25eafe.wgsl.expected.spvasm b/test/builtins/gen/max/25eafe.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/25eafe.wgsl.expected.spvasm
rename to test/builtins/gen/max/25eafe.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/25eafe.wgsl.expected.wgsl b/test/builtins/gen/max/25eafe.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/25eafe.wgsl.expected.wgsl
rename to test/builtins/gen/max/25eafe.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/320815.wgsl b/test/builtins/gen/max/320815.wgsl
new file mode 100644
index 0000000..c9e83eb
--- /dev/null
+++ b/test/builtins/gen/max/320815.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(vec<2, u32>, vec<2, u32>) -> vec<2, u32>
+fn max_320815() {
+  var res: vec2<u32> = max(vec2<u32>(), vec2<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_320815();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_320815();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_320815();
+}
diff --git a/test/intrinsics/gen/max/320815.wgsl.expected.glsl b/test/builtins/gen/max/320815.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/320815.wgsl.expected.glsl
rename to test/builtins/gen/max/320815.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/320815.wgsl.expected.hlsl b/test/builtins/gen/max/320815.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/320815.wgsl.expected.hlsl
rename to test/builtins/gen/max/320815.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/320815.wgsl.expected.msl b/test/builtins/gen/max/320815.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/320815.wgsl.expected.msl
rename to test/builtins/gen/max/320815.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/320815.wgsl.expected.spvasm b/test/builtins/gen/max/320815.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/320815.wgsl.expected.spvasm
rename to test/builtins/gen/max/320815.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/320815.wgsl.expected.wgsl b/test/builtins/gen/max/320815.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/320815.wgsl.expected.wgsl
rename to test/builtins/gen/max/320815.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/44a39d.wgsl b/test/builtins/gen/max/44a39d.wgsl
new file mode 100644
index 0000000..882e4e3
--- /dev/null
+++ b/test/builtins/gen/max/44a39d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(f32, f32) -> f32
+fn max_44a39d() {
+  var res: f32 = max(1.0, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_44a39d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_44a39d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_44a39d();
+}
diff --git a/test/intrinsics/gen/max/44a39d.wgsl.expected.glsl b/test/builtins/gen/max/44a39d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/44a39d.wgsl.expected.glsl
rename to test/builtins/gen/max/44a39d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/44a39d.wgsl.expected.hlsl b/test/builtins/gen/max/44a39d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/44a39d.wgsl.expected.hlsl
rename to test/builtins/gen/max/44a39d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/44a39d.wgsl.expected.msl b/test/builtins/gen/max/44a39d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/44a39d.wgsl.expected.msl
rename to test/builtins/gen/max/44a39d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/44a39d.wgsl.expected.spvasm b/test/builtins/gen/max/44a39d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/44a39d.wgsl.expected.spvasm
rename to test/builtins/gen/max/44a39d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/44a39d.wgsl.expected.wgsl b/test/builtins/gen/max/44a39d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/44a39d.wgsl.expected.wgsl
rename to test/builtins/gen/max/44a39d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/453e04.wgsl b/test/builtins/gen/max/453e04.wgsl
new file mode 100644
index 0000000..8b62913
--- /dev/null
+++ b/test/builtins/gen/max/453e04.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(vec<4, u32>, vec<4, u32>) -> vec<4, u32>
+fn max_453e04() {
+  var res: vec4<u32> = max(vec4<u32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_453e04();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_453e04();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_453e04();
+}
diff --git a/test/intrinsics/gen/max/453e04.wgsl.expected.glsl b/test/builtins/gen/max/453e04.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/453e04.wgsl.expected.glsl
rename to test/builtins/gen/max/453e04.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/453e04.wgsl.expected.hlsl b/test/builtins/gen/max/453e04.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/453e04.wgsl.expected.hlsl
rename to test/builtins/gen/max/453e04.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/453e04.wgsl.expected.msl b/test/builtins/gen/max/453e04.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/453e04.wgsl.expected.msl
rename to test/builtins/gen/max/453e04.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/453e04.wgsl.expected.spvasm b/test/builtins/gen/max/453e04.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/453e04.wgsl.expected.spvasm
rename to test/builtins/gen/max/453e04.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/453e04.wgsl.expected.wgsl b/test/builtins/gen/max/453e04.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/453e04.wgsl.expected.wgsl
rename to test/builtins/gen/max/453e04.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/462050.wgsl b/test/builtins/gen/max/462050.wgsl
new file mode 100644
index 0000000..2e2bcaf
--- /dev/null
+++ b/test/builtins/gen/max/462050.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn max_462050() {
+  var res: vec2<f32> = max(vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_462050();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_462050();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_462050();
+}
diff --git a/test/intrinsics/gen/max/462050.wgsl.expected.glsl b/test/builtins/gen/max/462050.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/462050.wgsl.expected.glsl
rename to test/builtins/gen/max/462050.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/462050.wgsl.expected.hlsl b/test/builtins/gen/max/462050.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/462050.wgsl.expected.hlsl
rename to test/builtins/gen/max/462050.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/462050.wgsl.expected.msl b/test/builtins/gen/max/462050.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/462050.wgsl.expected.msl
rename to test/builtins/gen/max/462050.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/462050.wgsl.expected.spvasm b/test/builtins/gen/max/462050.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/462050.wgsl.expected.spvasm
rename to test/builtins/gen/max/462050.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/462050.wgsl.expected.wgsl b/test/builtins/gen/max/462050.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/462050.wgsl.expected.wgsl
rename to test/builtins/gen/max/462050.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/4883ac.wgsl b/test/builtins/gen/max/4883ac.wgsl
new file mode 100644
index 0000000..b574471
--- /dev/null
+++ b/test/builtins/gen/max/4883ac.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn max_4883ac() {
+  var res: vec3<f32> = max(vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_4883ac();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_4883ac();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_4883ac();
+}
diff --git a/test/intrinsics/gen/max/4883ac.wgsl.expected.glsl b/test/builtins/gen/max/4883ac.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/4883ac.wgsl.expected.glsl
rename to test/builtins/gen/max/4883ac.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/4883ac.wgsl.expected.hlsl b/test/builtins/gen/max/4883ac.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/4883ac.wgsl.expected.hlsl
rename to test/builtins/gen/max/4883ac.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/4883ac.wgsl.expected.msl b/test/builtins/gen/max/4883ac.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/4883ac.wgsl.expected.msl
rename to test/builtins/gen/max/4883ac.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/4883ac.wgsl.expected.spvasm b/test/builtins/gen/max/4883ac.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/4883ac.wgsl.expected.spvasm
rename to test/builtins/gen/max/4883ac.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/4883ac.wgsl.expected.wgsl b/test/builtins/gen/max/4883ac.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/4883ac.wgsl.expected.wgsl
rename to test/builtins/gen/max/4883ac.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/85e6bc.wgsl b/test/builtins/gen/max/85e6bc.wgsl
new file mode 100644
index 0000000..c46eede
--- /dev/null
+++ b/test/builtins/gen/max/85e6bc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(vec<4, i32>, vec<4, i32>) -> vec<4, i32>
+fn max_85e6bc() {
+  var res: vec4<i32> = max(vec4<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_85e6bc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_85e6bc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_85e6bc();
+}
diff --git a/test/intrinsics/gen/max/85e6bc.wgsl.expected.glsl b/test/builtins/gen/max/85e6bc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/85e6bc.wgsl.expected.glsl
rename to test/builtins/gen/max/85e6bc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/85e6bc.wgsl.expected.hlsl b/test/builtins/gen/max/85e6bc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/85e6bc.wgsl.expected.hlsl
rename to test/builtins/gen/max/85e6bc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/85e6bc.wgsl.expected.msl b/test/builtins/gen/max/85e6bc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/85e6bc.wgsl.expected.msl
rename to test/builtins/gen/max/85e6bc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/85e6bc.wgsl.expected.spvasm b/test/builtins/gen/max/85e6bc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/85e6bc.wgsl.expected.spvasm
rename to test/builtins/gen/max/85e6bc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/85e6bc.wgsl.expected.wgsl b/test/builtins/gen/max/85e6bc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/85e6bc.wgsl.expected.wgsl
rename to test/builtins/gen/max/85e6bc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/a93419.wgsl b/test/builtins/gen/max/a93419.wgsl
new file mode 100644
index 0000000..a3c3d0d
--- /dev/null
+++ b/test/builtins/gen/max/a93419.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn max_a93419() {
+  var res: vec4<f32> = max(vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_a93419();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_a93419();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_a93419();
+}
diff --git a/test/intrinsics/gen/max/a93419.wgsl.expected.glsl b/test/builtins/gen/max/a93419.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/a93419.wgsl.expected.glsl
rename to test/builtins/gen/max/a93419.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/a93419.wgsl.expected.hlsl b/test/builtins/gen/max/a93419.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/a93419.wgsl.expected.hlsl
rename to test/builtins/gen/max/a93419.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/a93419.wgsl.expected.msl b/test/builtins/gen/max/a93419.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/a93419.wgsl.expected.msl
rename to test/builtins/gen/max/a93419.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/a93419.wgsl.expected.spvasm b/test/builtins/gen/max/a93419.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/a93419.wgsl.expected.spvasm
rename to test/builtins/gen/max/a93419.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/a93419.wgsl.expected.wgsl b/test/builtins/gen/max/a93419.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/a93419.wgsl.expected.wgsl
rename to test/builtins/gen/max/a93419.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/b1b73a.wgsl b/test/builtins/gen/max/b1b73a.wgsl
new file mode 100644
index 0000000..40cc26c
--- /dev/null
+++ b/test/builtins/gen/max/b1b73a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(vec<3, u32>, vec<3, u32>) -> vec<3, u32>
+fn max_b1b73a() {
+  var res: vec3<u32> = max(vec3<u32>(), vec3<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_b1b73a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_b1b73a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_b1b73a();
+}
diff --git a/test/intrinsics/gen/max/b1b73a.wgsl.expected.glsl b/test/builtins/gen/max/b1b73a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/b1b73a.wgsl.expected.glsl
rename to test/builtins/gen/max/b1b73a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/b1b73a.wgsl.expected.hlsl b/test/builtins/gen/max/b1b73a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/b1b73a.wgsl.expected.hlsl
rename to test/builtins/gen/max/b1b73a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/b1b73a.wgsl.expected.msl b/test/builtins/gen/max/b1b73a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/b1b73a.wgsl.expected.msl
rename to test/builtins/gen/max/b1b73a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/b1b73a.wgsl.expected.spvasm b/test/builtins/gen/max/b1b73a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/b1b73a.wgsl.expected.spvasm
rename to test/builtins/gen/max/b1b73a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/b1b73a.wgsl.expected.wgsl b/test/builtins/gen/max/b1b73a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/b1b73a.wgsl.expected.wgsl
rename to test/builtins/gen/max/b1b73a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/ce7c30.wgsl b/test/builtins/gen/max/ce7c30.wgsl
new file mode 100644
index 0000000..6673713
--- /dev/null
+++ b/test/builtins/gen/max/ce7c30.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(i32, i32) -> i32
+fn max_ce7c30() {
+  var res: i32 = max(1, 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_ce7c30();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_ce7c30();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_ce7c30();
+}
diff --git a/test/intrinsics/gen/max/ce7c30.wgsl.expected.glsl b/test/builtins/gen/max/ce7c30.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/ce7c30.wgsl.expected.glsl
rename to test/builtins/gen/max/ce7c30.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/ce7c30.wgsl.expected.hlsl b/test/builtins/gen/max/ce7c30.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/ce7c30.wgsl.expected.hlsl
rename to test/builtins/gen/max/ce7c30.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/ce7c30.wgsl.expected.msl b/test/builtins/gen/max/ce7c30.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/ce7c30.wgsl.expected.msl
rename to test/builtins/gen/max/ce7c30.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/ce7c30.wgsl.expected.spvasm b/test/builtins/gen/max/ce7c30.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/ce7c30.wgsl.expected.spvasm
rename to test/builtins/gen/max/ce7c30.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/ce7c30.wgsl.expected.wgsl b/test/builtins/gen/max/ce7c30.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/ce7c30.wgsl.expected.wgsl
rename to test/builtins/gen/max/ce7c30.wgsl.expected.wgsl
diff --git a/test/builtins/gen/max/e8192f.wgsl b/test/builtins/gen/max/e8192f.wgsl
new file mode 100644
index 0000000..cd111e3
--- /dev/null
+++ b/test/builtins/gen/max/e8192f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn max(vec<2, i32>, vec<2, i32>) -> vec<2, i32>
+fn max_e8192f() {
+  var res: vec2<i32> = max(vec2<i32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_e8192f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  max_e8192f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  max_e8192f();
+}
diff --git a/test/intrinsics/gen/max/e8192f.wgsl.expected.glsl b/test/builtins/gen/max/e8192f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/max/e8192f.wgsl.expected.glsl
rename to test/builtins/gen/max/e8192f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/max/e8192f.wgsl.expected.hlsl b/test/builtins/gen/max/e8192f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/max/e8192f.wgsl.expected.hlsl
rename to test/builtins/gen/max/e8192f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/max/e8192f.wgsl.expected.msl b/test/builtins/gen/max/e8192f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/max/e8192f.wgsl.expected.msl
rename to test/builtins/gen/max/e8192f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/max/e8192f.wgsl.expected.spvasm b/test/builtins/gen/max/e8192f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/max/e8192f.wgsl.expected.spvasm
rename to test/builtins/gen/max/e8192f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/max/e8192f.wgsl.expected.wgsl b/test/builtins/gen/max/e8192f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/max/e8192f.wgsl.expected.wgsl
rename to test/builtins/gen/max/e8192f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/03c7e3.wgsl b/test/builtins/gen/min/03c7e3.wgsl
new file mode 100644
index 0000000..7a2690f
--- /dev/null
+++ b/test/builtins/gen/min/03c7e3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(vec<2, i32>, vec<2, i32>) -> vec<2, i32>
+fn min_03c7e3() {
+  var res: vec2<i32> = min(vec2<i32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_03c7e3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_03c7e3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_03c7e3();
+}
diff --git a/test/intrinsics/gen/min/03c7e3.wgsl.expected.glsl b/test/builtins/gen/min/03c7e3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/03c7e3.wgsl.expected.glsl
rename to test/builtins/gen/min/03c7e3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/03c7e3.wgsl.expected.hlsl b/test/builtins/gen/min/03c7e3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/03c7e3.wgsl.expected.hlsl
rename to test/builtins/gen/min/03c7e3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/03c7e3.wgsl.expected.msl b/test/builtins/gen/min/03c7e3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/03c7e3.wgsl.expected.msl
rename to test/builtins/gen/min/03c7e3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/03c7e3.wgsl.expected.spvasm b/test/builtins/gen/min/03c7e3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/03c7e3.wgsl.expected.spvasm
rename to test/builtins/gen/min/03c7e3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/03c7e3.wgsl.expected.wgsl b/test/builtins/gen/min/03c7e3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/03c7e3.wgsl.expected.wgsl
rename to test/builtins/gen/min/03c7e3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/0dc614.wgsl b/test/builtins/gen/min/0dc614.wgsl
new file mode 100644
index 0000000..4b937bc
--- /dev/null
+++ b/test/builtins/gen/min/0dc614.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(vec<4, u32>, vec<4, u32>) -> vec<4, u32>
+fn min_0dc614() {
+  var res: vec4<u32> = min(vec4<u32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_0dc614();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_0dc614();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_0dc614();
+}
diff --git a/test/intrinsics/gen/min/0dc614.wgsl.expected.glsl b/test/builtins/gen/min/0dc614.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/0dc614.wgsl.expected.glsl
rename to test/builtins/gen/min/0dc614.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/0dc614.wgsl.expected.hlsl b/test/builtins/gen/min/0dc614.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/0dc614.wgsl.expected.hlsl
rename to test/builtins/gen/min/0dc614.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/0dc614.wgsl.expected.msl b/test/builtins/gen/min/0dc614.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/0dc614.wgsl.expected.msl
rename to test/builtins/gen/min/0dc614.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/0dc614.wgsl.expected.spvasm b/test/builtins/gen/min/0dc614.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/0dc614.wgsl.expected.spvasm
rename to test/builtins/gen/min/0dc614.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/0dc614.wgsl.expected.wgsl b/test/builtins/gen/min/0dc614.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/0dc614.wgsl.expected.wgsl
rename to test/builtins/gen/min/0dc614.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/3941e1.wgsl b/test/builtins/gen/min/3941e1.wgsl
new file mode 100644
index 0000000..2e263fe
--- /dev/null
+++ b/test/builtins/gen/min/3941e1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(vec<4, i32>, vec<4, i32>) -> vec<4, i32>
+fn min_3941e1() {
+  var res: vec4<i32> = min(vec4<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_3941e1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_3941e1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_3941e1();
+}
diff --git a/test/intrinsics/gen/min/3941e1.wgsl.expected.glsl b/test/builtins/gen/min/3941e1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/3941e1.wgsl.expected.glsl
rename to test/builtins/gen/min/3941e1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/3941e1.wgsl.expected.hlsl b/test/builtins/gen/min/3941e1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/3941e1.wgsl.expected.hlsl
rename to test/builtins/gen/min/3941e1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/3941e1.wgsl.expected.msl b/test/builtins/gen/min/3941e1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/3941e1.wgsl.expected.msl
rename to test/builtins/gen/min/3941e1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/3941e1.wgsl.expected.spvasm b/test/builtins/gen/min/3941e1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/3941e1.wgsl.expected.spvasm
rename to test/builtins/gen/min/3941e1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/3941e1.wgsl.expected.wgsl b/test/builtins/gen/min/3941e1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/3941e1.wgsl.expected.wgsl
rename to test/builtins/gen/min/3941e1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/46c5d3.wgsl b/test/builtins/gen/min/46c5d3.wgsl
new file mode 100644
index 0000000..730fe94
--- /dev/null
+++ b/test/builtins/gen/min/46c5d3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(u32, u32) -> u32
+fn min_46c5d3() {
+  var res: u32 = min(1u, 1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_46c5d3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_46c5d3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_46c5d3();
+}
diff --git a/test/intrinsics/gen/min/46c5d3.wgsl.expected.glsl b/test/builtins/gen/min/46c5d3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/46c5d3.wgsl.expected.glsl
rename to test/builtins/gen/min/46c5d3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/46c5d3.wgsl.expected.hlsl b/test/builtins/gen/min/46c5d3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/46c5d3.wgsl.expected.hlsl
rename to test/builtins/gen/min/46c5d3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/46c5d3.wgsl.expected.msl b/test/builtins/gen/min/46c5d3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/46c5d3.wgsl.expected.msl
rename to test/builtins/gen/min/46c5d3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/46c5d3.wgsl.expected.spvasm b/test/builtins/gen/min/46c5d3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/46c5d3.wgsl.expected.spvasm
rename to test/builtins/gen/min/46c5d3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/46c5d3.wgsl.expected.wgsl b/test/builtins/gen/min/46c5d3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/46c5d3.wgsl.expected.wgsl
rename to test/builtins/gen/min/46c5d3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/82b28f.wgsl b/test/builtins/gen/min/82b28f.wgsl
new file mode 100644
index 0000000..def0748
--- /dev/null
+++ b/test/builtins/gen/min/82b28f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(vec<2, u32>, vec<2, u32>) -> vec<2, u32>
+fn min_82b28f() {
+  var res: vec2<u32> = min(vec2<u32>(), vec2<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_82b28f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_82b28f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_82b28f();
+}
diff --git a/test/intrinsics/gen/min/82b28f.wgsl.expected.glsl b/test/builtins/gen/min/82b28f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/82b28f.wgsl.expected.glsl
rename to test/builtins/gen/min/82b28f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/82b28f.wgsl.expected.hlsl b/test/builtins/gen/min/82b28f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/82b28f.wgsl.expected.hlsl
rename to test/builtins/gen/min/82b28f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/82b28f.wgsl.expected.msl b/test/builtins/gen/min/82b28f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/82b28f.wgsl.expected.msl
rename to test/builtins/gen/min/82b28f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/82b28f.wgsl.expected.spvasm b/test/builtins/gen/min/82b28f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/82b28f.wgsl.expected.spvasm
rename to test/builtins/gen/min/82b28f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/82b28f.wgsl.expected.wgsl b/test/builtins/gen/min/82b28f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/82b28f.wgsl.expected.wgsl
rename to test/builtins/gen/min/82b28f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/93cfc4.wgsl b/test/builtins/gen/min/93cfc4.wgsl
new file mode 100644
index 0000000..66c46b7
--- /dev/null
+++ b/test/builtins/gen/min/93cfc4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn min_93cfc4() {
+  var res: vec3<f32> = min(vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_93cfc4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_93cfc4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_93cfc4();
+}
diff --git a/test/intrinsics/gen/min/93cfc4.wgsl.expected.glsl b/test/builtins/gen/min/93cfc4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/93cfc4.wgsl.expected.glsl
rename to test/builtins/gen/min/93cfc4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/93cfc4.wgsl.expected.hlsl b/test/builtins/gen/min/93cfc4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/93cfc4.wgsl.expected.hlsl
rename to test/builtins/gen/min/93cfc4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/93cfc4.wgsl.expected.msl b/test/builtins/gen/min/93cfc4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/93cfc4.wgsl.expected.msl
rename to test/builtins/gen/min/93cfc4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/93cfc4.wgsl.expected.spvasm b/test/builtins/gen/min/93cfc4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/93cfc4.wgsl.expected.spvasm
rename to test/builtins/gen/min/93cfc4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/93cfc4.wgsl.expected.wgsl b/test/builtins/gen/min/93cfc4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/93cfc4.wgsl.expected.wgsl
rename to test/builtins/gen/min/93cfc4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/a45171.wgsl b/test/builtins/gen/min/a45171.wgsl
new file mode 100644
index 0000000..eb640de
--- /dev/null
+++ b/test/builtins/gen/min/a45171.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(vec<3, i32>, vec<3, i32>) -> vec<3, i32>
+fn min_a45171() {
+  var res: vec3<i32> = min(vec3<i32>(), vec3<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_a45171();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_a45171();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_a45171();
+}
diff --git a/test/intrinsics/gen/min/a45171.wgsl.expected.glsl b/test/builtins/gen/min/a45171.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/a45171.wgsl.expected.glsl
rename to test/builtins/gen/min/a45171.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/a45171.wgsl.expected.hlsl b/test/builtins/gen/min/a45171.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/a45171.wgsl.expected.hlsl
rename to test/builtins/gen/min/a45171.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/a45171.wgsl.expected.msl b/test/builtins/gen/min/a45171.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/a45171.wgsl.expected.msl
rename to test/builtins/gen/min/a45171.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/a45171.wgsl.expected.spvasm b/test/builtins/gen/min/a45171.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/a45171.wgsl.expected.spvasm
rename to test/builtins/gen/min/a45171.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/a45171.wgsl.expected.wgsl b/test/builtins/gen/min/a45171.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/a45171.wgsl.expected.wgsl
rename to test/builtins/gen/min/a45171.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/aa28ad.wgsl b/test/builtins/gen/min/aa28ad.wgsl
new file mode 100644
index 0000000..9242dec
--- /dev/null
+++ b/test/builtins/gen/min/aa28ad.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn min_aa28ad() {
+  var res: vec2<f32> = min(vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_aa28ad();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_aa28ad();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_aa28ad();
+}
diff --git a/test/intrinsics/gen/min/aa28ad.wgsl.expected.glsl b/test/builtins/gen/min/aa28ad.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/aa28ad.wgsl.expected.glsl
rename to test/builtins/gen/min/aa28ad.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/aa28ad.wgsl.expected.hlsl b/test/builtins/gen/min/aa28ad.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/aa28ad.wgsl.expected.hlsl
rename to test/builtins/gen/min/aa28ad.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/aa28ad.wgsl.expected.msl b/test/builtins/gen/min/aa28ad.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/aa28ad.wgsl.expected.msl
rename to test/builtins/gen/min/aa28ad.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/aa28ad.wgsl.expected.spvasm b/test/builtins/gen/min/aa28ad.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/aa28ad.wgsl.expected.spvasm
rename to test/builtins/gen/min/aa28ad.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/aa28ad.wgsl.expected.wgsl b/test/builtins/gen/min/aa28ad.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/aa28ad.wgsl.expected.wgsl
rename to test/builtins/gen/min/aa28ad.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/af326d.wgsl b/test/builtins/gen/min/af326d.wgsl
new file mode 100644
index 0000000..d603bcb
--- /dev/null
+++ b/test/builtins/gen/min/af326d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(f32, f32) -> f32
+fn min_af326d() {
+  var res: f32 = min(1.0, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_af326d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_af326d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_af326d();
+}
diff --git a/test/intrinsics/gen/min/af326d.wgsl.expected.glsl b/test/builtins/gen/min/af326d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/af326d.wgsl.expected.glsl
rename to test/builtins/gen/min/af326d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/af326d.wgsl.expected.hlsl b/test/builtins/gen/min/af326d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/af326d.wgsl.expected.hlsl
rename to test/builtins/gen/min/af326d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/af326d.wgsl.expected.msl b/test/builtins/gen/min/af326d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/af326d.wgsl.expected.msl
rename to test/builtins/gen/min/af326d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/af326d.wgsl.expected.spvasm b/test/builtins/gen/min/af326d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/af326d.wgsl.expected.spvasm
rename to test/builtins/gen/min/af326d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/af326d.wgsl.expected.wgsl b/test/builtins/gen/min/af326d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/af326d.wgsl.expected.wgsl
rename to test/builtins/gen/min/af326d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/c70bb7.wgsl b/test/builtins/gen/min/c70bb7.wgsl
new file mode 100644
index 0000000..5440784
--- /dev/null
+++ b/test/builtins/gen/min/c70bb7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(vec<3, u32>, vec<3, u32>) -> vec<3, u32>
+fn min_c70bb7() {
+  var res: vec3<u32> = min(vec3<u32>(), vec3<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_c70bb7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_c70bb7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_c70bb7();
+}
diff --git a/test/intrinsics/gen/min/c70bb7.wgsl.expected.glsl b/test/builtins/gen/min/c70bb7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/c70bb7.wgsl.expected.glsl
rename to test/builtins/gen/min/c70bb7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/c70bb7.wgsl.expected.hlsl b/test/builtins/gen/min/c70bb7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/c70bb7.wgsl.expected.hlsl
rename to test/builtins/gen/min/c70bb7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/c70bb7.wgsl.expected.msl b/test/builtins/gen/min/c70bb7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/c70bb7.wgsl.expected.msl
rename to test/builtins/gen/min/c70bb7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/c70bb7.wgsl.expected.spvasm b/test/builtins/gen/min/c70bb7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/c70bb7.wgsl.expected.spvasm
rename to test/builtins/gen/min/c70bb7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/c70bb7.wgsl.expected.wgsl b/test/builtins/gen/min/c70bb7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/c70bb7.wgsl.expected.wgsl
rename to test/builtins/gen/min/c70bb7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/c73147.wgsl b/test/builtins/gen/min/c73147.wgsl
new file mode 100644
index 0000000..bb48303
--- /dev/null
+++ b/test/builtins/gen/min/c73147.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(i32, i32) -> i32
+fn min_c73147() {
+  var res: i32 = min(1, 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_c73147();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_c73147();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_c73147();
+}
diff --git a/test/intrinsics/gen/min/c73147.wgsl.expected.glsl b/test/builtins/gen/min/c73147.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/c73147.wgsl.expected.glsl
rename to test/builtins/gen/min/c73147.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/c73147.wgsl.expected.hlsl b/test/builtins/gen/min/c73147.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/c73147.wgsl.expected.hlsl
rename to test/builtins/gen/min/c73147.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/c73147.wgsl.expected.msl b/test/builtins/gen/min/c73147.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/c73147.wgsl.expected.msl
rename to test/builtins/gen/min/c73147.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/c73147.wgsl.expected.spvasm b/test/builtins/gen/min/c73147.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/c73147.wgsl.expected.spvasm
rename to test/builtins/gen/min/c73147.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/c73147.wgsl.expected.wgsl b/test/builtins/gen/min/c73147.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/c73147.wgsl.expected.wgsl
rename to test/builtins/gen/min/c73147.wgsl.expected.wgsl
diff --git a/test/builtins/gen/min/c76fa6.wgsl b/test/builtins/gen/min/c76fa6.wgsl
new file mode 100644
index 0000000..d4a831a
--- /dev/null
+++ b/test/builtins/gen/min/c76fa6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn min(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn min_c76fa6() {
+  var res: vec4<f32> = min(vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_c76fa6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  min_c76fa6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  min_c76fa6();
+}
diff --git a/test/intrinsics/gen/min/c76fa6.wgsl.expected.glsl b/test/builtins/gen/min/c76fa6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/min/c76fa6.wgsl.expected.glsl
rename to test/builtins/gen/min/c76fa6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/min/c76fa6.wgsl.expected.hlsl b/test/builtins/gen/min/c76fa6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/min/c76fa6.wgsl.expected.hlsl
rename to test/builtins/gen/min/c76fa6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/min/c76fa6.wgsl.expected.msl b/test/builtins/gen/min/c76fa6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/min/c76fa6.wgsl.expected.msl
rename to test/builtins/gen/min/c76fa6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/min/c76fa6.wgsl.expected.spvasm b/test/builtins/gen/min/c76fa6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/min/c76fa6.wgsl.expected.spvasm
rename to test/builtins/gen/min/c76fa6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/min/c76fa6.wgsl.expected.wgsl b/test/builtins/gen/min/c76fa6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/min/c76fa6.wgsl.expected.wgsl
rename to test/builtins/gen/min/c76fa6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/mix/0c8c33.wgsl b/test/builtins/gen/mix/0c8c33.wgsl
new file mode 100644
index 0000000..16f9a64
--- /dev/null
+++ b/test/builtins/gen/mix/0c8c33.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn mix(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn mix_0c8c33() {
+  var res: vec3<f32> = mix(vec3<f32>(), vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_0c8c33();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  mix_0c8c33();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  mix_0c8c33();
+}
diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.glsl b/test/builtins/gen/mix/0c8c33.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/mix/0c8c33.wgsl.expected.glsl
rename to test/builtins/gen/mix/0c8c33.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.hlsl b/test/builtins/gen/mix/0c8c33.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/mix/0c8c33.wgsl.expected.hlsl
rename to test/builtins/gen/mix/0c8c33.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.msl b/test/builtins/gen/mix/0c8c33.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/mix/0c8c33.wgsl.expected.msl
rename to test/builtins/gen/mix/0c8c33.wgsl.expected.msl
diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.spvasm b/test/builtins/gen/mix/0c8c33.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/mix/0c8c33.wgsl.expected.spvasm
rename to test/builtins/gen/mix/0c8c33.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.wgsl b/test/builtins/gen/mix/0c8c33.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/mix/0c8c33.wgsl.expected.wgsl
rename to test/builtins/gen/mix/0c8c33.wgsl.expected.wgsl
diff --git a/test/builtins/gen/mix/1faeb1.wgsl b/test/builtins/gen/mix/1faeb1.wgsl
new file mode 100644
index 0000000..4777805
--- /dev/null
+++ b/test/builtins/gen/mix/1faeb1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn mix(vec<4, f32>, vec<4, f32>, f32) -> vec<4, f32>
+fn mix_1faeb1() {
+  var res: vec4<f32> = mix(vec4<f32>(), vec4<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_1faeb1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  mix_1faeb1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  mix_1faeb1();
+}
diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.glsl b/test/builtins/gen/mix/1faeb1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/mix/1faeb1.wgsl.expected.glsl
rename to test/builtins/gen/mix/1faeb1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.hlsl b/test/builtins/gen/mix/1faeb1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/mix/1faeb1.wgsl.expected.hlsl
rename to test/builtins/gen/mix/1faeb1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.msl b/test/builtins/gen/mix/1faeb1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/mix/1faeb1.wgsl.expected.msl
rename to test/builtins/gen/mix/1faeb1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.spvasm b/test/builtins/gen/mix/1faeb1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/mix/1faeb1.wgsl.expected.spvasm
rename to test/builtins/gen/mix/1faeb1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.wgsl b/test/builtins/gen/mix/1faeb1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/mix/1faeb1.wgsl.expected.wgsl
rename to test/builtins/gen/mix/1faeb1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/mix/2fadab.wgsl b/test/builtins/gen/mix/2fadab.wgsl
new file mode 100644
index 0000000..a89fb83
--- /dev/null
+++ b/test/builtins/gen/mix/2fadab.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn mix(vec<2, f32>, vec<2, f32>, f32) -> vec<2, f32>
+fn mix_2fadab() {
+  var res: vec2<f32> = mix(vec2<f32>(), vec2<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_2fadab();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  mix_2fadab();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  mix_2fadab();
+}
diff --git a/test/intrinsics/gen/mix/2fadab.wgsl.expected.glsl b/test/builtins/gen/mix/2fadab.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/mix/2fadab.wgsl.expected.glsl
rename to test/builtins/gen/mix/2fadab.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/mix/2fadab.wgsl.expected.hlsl b/test/builtins/gen/mix/2fadab.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/mix/2fadab.wgsl.expected.hlsl
rename to test/builtins/gen/mix/2fadab.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/mix/2fadab.wgsl.expected.msl b/test/builtins/gen/mix/2fadab.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/mix/2fadab.wgsl.expected.msl
rename to test/builtins/gen/mix/2fadab.wgsl.expected.msl
diff --git a/test/intrinsics/gen/mix/2fadab.wgsl.expected.spvasm b/test/builtins/gen/mix/2fadab.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/mix/2fadab.wgsl.expected.spvasm
rename to test/builtins/gen/mix/2fadab.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/mix/2fadab.wgsl.expected.wgsl b/test/builtins/gen/mix/2fadab.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/mix/2fadab.wgsl.expected.wgsl
rename to test/builtins/gen/mix/2fadab.wgsl.expected.wgsl
diff --git a/test/builtins/gen/mix/315264.wgsl b/test/builtins/gen/mix/315264.wgsl
new file mode 100644
index 0000000..ae2dca3
--- /dev/null
+++ b/test/builtins/gen/mix/315264.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn mix(vec<3, f32>, vec<3, f32>, f32) -> vec<3, f32>
+fn mix_315264() {
+  var res: vec3<f32> = mix(vec3<f32>(), vec3<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_315264();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  mix_315264();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  mix_315264();
+}
diff --git a/test/intrinsics/gen/mix/315264.wgsl.expected.glsl b/test/builtins/gen/mix/315264.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/mix/315264.wgsl.expected.glsl
rename to test/builtins/gen/mix/315264.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/mix/315264.wgsl.expected.hlsl b/test/builtins/gen/mix/315264.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/mix/315264.wgsl.expected.hlsl
rename to test/builtins/gen/mix/315264.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/mix/315264.wgsl.expected.msl b/test/builtins/gen/mix/315264.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/mix/315264.wgsl.expected.msl
rename to test/builtins/gen/mix/315264.wgsl.expected.msl
diff --git a/test/intrinsics/gen/mix/315264.wgsl.expected.spvasm b/test/builtins/gen/mix/315264.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/mix/315264.wgsl.expected.spvasm
rename to test/builtins/gen/mix/315264.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/mix/315264.wgsl.expected.wgsl b/test/builtins/gen/mix/315264.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/mix/315264.wgsl.expected.wgsl
rename to test/builtins/gen/mix/315264.wgsl.expected.wgsl
diff --git a/test/builtins/gen/mix/4f0b5e.wgsl b/test/builtins/gen/mix/4f0b5e.wgsl
new file mode 100644
index 0000000..22eea63
--- /dev/null
+++ b/test/builtins/gen/mix/4f0b5e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn mix(f32, f32, f32) -> f32
+fn mix_4f0b5e() {
+  var res: f32 = mix(1.0, 1.0, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_4f0b5e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  mix_4f0b5e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  mix_4f0b5e();
+}
diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.glsl b/test/builtins/gen/mix/4f0b5e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/mix/4f0b5e.wgsl.expected.glsl
rename to test/builtins/gen/mix/4f0b5e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.hlsl b/test/builtins/gen/mix/4f0b5e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/mix/4f0b5e.wgsl.expected.hlsl
rename to test/builtins/gen/mix/4f0b5e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.msl b/test/builtins/gen/mix/4f0b5e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/mix/4f0b5e.wgsl.expected.msl
rename to test/builtins/gen/mix/4f0b5e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.spvasm b/test/builtins/gen/mix/4f0b5e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/mix/4f0b5e.wgsl.expected.spvasm
rename to test/builtins/gen/mix/4f0b5e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.wgsl b/test/builtins/gen/mix/4f0b5e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/mix/4f0b5e.wgsl.expected.wgsl
rename to test/builtins/gen/mix/4f0b5e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/mix/6f8adc.wgsl b/test/builtins/gen/mix/6f8adc.wgsl
new file mode 100644
index 0000000..a024424
--- /dev/null
+++ b/test/builtins/gen/mix/6f8adc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn mix(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn mix_6f8adc() {
+  var res: vec2<f32> = mix(vec2<f32>(), vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_6f8adc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  mix_6f8adc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  mix_6f8adc();
+}
diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.glsl b/test/builtins/gen/mix/6f8adc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/mix/6f8adc.wgsl.expected.glsl
rename to test/builtins/gen/mix/6f8adc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.hlsl b/test/builtins/gen/mix/6f8adc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/mix/6f8adc.wgsl.expected.hlsl
rename to test/builtins/gen/mix/6f8adc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.msl b/test/builtins/gen/mix/6f8adc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/mix/6f8adc.wgsl.expected.msl
rename to test/builtins/gen/mix/6f8adc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.spvasm b/test/builtins/gen/mix/6f8adc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/mix/6f8adc.wgsl.expected.spvasm
rename to test/builtins/gen/mix/6f8adc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.wgsl b/test/builtins/gen/mix/6f8adc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/mix/6f8adc.wgsl.expected.wgsl
rename to test/builtins/gen/mix/6f8adc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/mix/c37ede.wgsl b/test/builtins/gen/mix/c37ede.wgsl
new file mode 100644
index 0000000..47aa83a
--- /dev/null
+++ b/test/builtins/gen/mix/c37ede.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn mix(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn mix_c37ede() {
+  var res: vec4<f32> = mix(vec4<f32>(), vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_c37ede();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  mix_c37ede();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  mix_c37ede();
+}
diff --git a/test/intrinsics/gen/mix/c37ede.wgsl.expected.glsl b/test/builtins/gen/mix/c37ede.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/mix/c37ede.wgsl.expected.glsl
rename to test/builtins/gen/mix/c37ede.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/mix/c37ede.wgsl.expected.hlsl b/test/builtins/gen/mix/c37ede.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/mix/c37ede.wgsl.expected.hlsl
rename to test/builtins/gen/mix/c37ede.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/mix/c37ede.wgsl.expected.msl b/test/builtins/gen/mix/c37ede.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/mix/c37ede.wgsl.expected.msl
rename to test/builtins/gen/mix/c37ede.wgsl.expected.msl
diff --git a/test/intrinsics/gen/mix/c37ede.wgsl.expected.spvasm b/test/builtins/gen/mix/c37ede.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/mix/c37ede.wgsl.expected.spvasm
rename to test/builtins/gen/mix/c37ede.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/mix/c37ede.wgsl.expected.wgsl b/test/builtins/gen/mix/c37ede.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/mix/c37ede.wgsl.expected.wgsl
rename to test/builtins/gen/mix/c37ede.wgsl.expected.wgsl
diff --git a/test/builtins/gen/modf/180fed.wgsl b/test/builtins/gen/modf/180fed.wgsl
new file mode 100644
index 0000000..2280611
--- /dev/null
+++ b/test/builtins/gen/modf/180fed.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn modf(f32) -> __modf_result
+fn modf_180fed() {
+  var res = modf(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_180fed();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  modf_180fed();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  modf_180fed();
+}
diff --git a/test/intrinsics/gen/modf/180fed.wgsl.expected.glsl b/test/builtins/gen/modf/180fed.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/modf/180fed.wgsl.expected.glsl
rename to test/builtins/gen/modf/180fed.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/modf/180fed.wgsl.expected.hlsl b/test/builtins/gen/modf/180fed.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/modf/180fed.wgsl.expected.hlsl
rename to test/builtins/gen/modf/180fed.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/modf/180fed.wgsl.expected.msl b/test/builtins/gen/modf/180fed.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/modf/180fed.wgsl.expected.msl
rename to test/builtins/gen/modf/180fed.wgsl.expected.msl
diff --git a/test/intrinsics/gen/modf/180fed.wgsl.expected.spvasm b/test/builtins/gen/modf/180fed.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/modf/180fed.wgsl.expected.spvasm
rename to test/builtins/gen/modf/180fed.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/modf/180fed.wgsl.expected.wgsl b/test/builtins/gen/modf/180fed.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/modf/180fed.wgsl.expected.wgsl
rename to test/builtins/gen/modf/180fed.wgsl.expected.wgsl
diff --git a/test/builtins/gen/modf/9b75f7.wgsl b/test/builtins/gen/modf/9b75f7.wgsl
new file mode 100644
index 0000000..f18546c
--- /dev/null
+++ b/test/builtins/gen/modf/9b75f7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn modf(vec<3, f32>) -> __modf_result_vec<3>
+fn modf_9b75f7() {
+  var res = modf(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_9b75f7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  modf_9b75f7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  modf_9b75f7();
+}
diff --git a/test/intrinsics/gen/modf/9b75f7.wgsl.expected.glsl b/test/builtins/gen/modf/9b75f7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/modf/9b75f7.wgsl.expected.glsl
rename to test/builtins/gen/modf/9b75f7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/modf/9b75f7.wgsl.expected.hlsl b/test/builtins/gen/modf/9b75f7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/modf/9b75f7.wgsl.expected.hlsl
rename to test/builtins/gen/modf/9b75f7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/modf/9b75f7.wgsl.expected.msl b/test/builtins/gen/modf/9b75f7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/modf/9b75f7.wgsl.expected.msl
rename to test/builtins/gen/modf/9b75f7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/modf/9b75f7.wgsl.expected.spvasm b/test/builtins/gen/modf/9b75f7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/modf/9b75f7.wgsl.expected.spvasm
rename to test/builtins/gen/modf/9b75f7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/modf/9b75f7.wgsl.expected.wgsl b/test/builtins/gen/modf/9b75f7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/modf/9b75f7.wgsl.expected.wgsl
rename to test/builtins/gen/modf/9b75f7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/modf/ec2dbc.wgsl b/test/builtins/gen/modf/ec2dbc.wgsl
new file mode 100644
index 0000000..da66827
--- /dev/null
+++ b/test/builtins/gen/modf/ec2dbc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn modf(vec<4, f32>) -> __modf_result_vec<4>
+fn modf_ec2dbc() {
+  var res = modf(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_ec2dbc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  modf_ec2dbc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  modf_ec2dbc();
+}
diff --git a/test/intrinsics/gen/modf/ec2dbc.wgsl.expected.glsl b/test/builtins/gen/modf/ec2dbc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/modf/ec2dbc.wgsl.expected.glsl
rename to test/builtins/gen/modf/ec2dbc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/modf/ec2dbc.wgsl.expected.hlsl b/test/builtins/gen/modf/ec2dbc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/modf/ec2dbc.wgsl.expected.hlsl
rename to test/builtins/gen/modf/ec2dbc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/modf/ec2dbc.wgsl.expected.msl b/test/builtins/gen/modf/ec2dbc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/modf/ec2dbc.wgsl.expected.msl
rename to test/builtins/gen/modf/ec2dbc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/modf/ec2dbc.wgsl.expected.spvasm b/test/builtins/gen/modf/ec2dbc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/modf/ec2dbc.wgsl.expected.spvasm
rename to test/builtins/gen/modf/ec2dbc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/modf/ec2dbc.wgsl.expected.wgsl b/test/builtins/gen/modf/ec2dbc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/modf/ec2dbc.wgsl.expected.wgsl
rename to test/builtins/gen/modf/ec2dbc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/modf/f5f20d.wgsl b/test/builtins/gen/modf/f5f20d.wgsl
new file mode 100644
index 0000000..1070fb7
--- /dev/null
+++ b/test/builtins/gen/modf/f5f20d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn modf(vec<2, f32>) -> __modf_result_vec<2>
+fn modf_f5f20d() {
+  var res = modf(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_f5f20d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  modf_f5f20d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  modf_f5f20d();
+}
diff --git a/test/intrinsics/gen/modf/f5f20d.wgsl.expected.glsl b/test/builtins/gen/modf/f5f20d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/modf/f5f20d.wgsl.expected.glsl
rename to test/builtins/gen/modf/f5f20d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/modf/f5f20d.wgsl.expected.hlsl b/test/builtins/gen/modf/f5f20d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/modf/f5f20d.wgsl.expected.hlsl
rename to test/builtins/gen/modf/f5f20d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/modf/f5f20d.wgsl.expected.msl b/test/builtins/gen/modf/f5f20d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/modf/f5f20d.wgsl.expected.msl
rename to test/builtins/gen/modf/f5f20d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/modf/f5f20d.wgsl.expected.spvasm b/test/builtins/gen/modf/f5f20d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/modf/f5f20d.wgsl.expected.spvasm
rename to test/builtins/gen/modf/f5f20d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/modf/f5f20d.wgsl.expected.wgsl b/test/builtins/gen/modf/f5f20d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/modf/f5f20d.wgsl.expected.wgsl
rename to test/builtins/gen/modf/f5f20d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/normalize/64d8c0.wgsl b/test/builtins/gen/normalize/64d8c0.wgsl
new file mode 100644
index 0000000..0c32b91
--- /dev/null
+++ b/test/builtins/gen/normalize/64d8c0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn normalize(vec<3, f32>) -> vec<3, f32>
+fn normalize_64d8c0() {
+  var res: vec3<f32> = normalize(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  normalize_64d8c0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  normalize_64d8c0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  normalize_64d8c0();
+}
diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.glsl b/test/builtins/gen/normalize/64d8c0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/normalize/64d8c0.wgsl.expected.glsl
rename to test/builtins/gen/normalize/64d8c0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.hlsl b/test/builtins/gen/normalize/64d8c0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/normalize/64d8c0.wgsl.expected.hlsl
rename to test/builtins/gen/normalize/64d8c0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.msl b/test/builtins/gen/normalize/64d8c0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/normalize/64d8c0.wgsl.expected.msl
rename to test/builtins/gen/normalize/64d8c0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.spvasm b/test/builtins/gen/normalize/64d8c0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/normalize/64d8c0.wgsl.expected.spvasm
rename to test/builtins/gen/normalize/64d8c0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.wgsl b/test/builtins/gen/normalize/64d8c0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/normalize/64d8c0.wgsl.expected.wgsl
rename to test/builtins/gen/normalize/64d8c0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/normalize/9a0aab.wgsl b/test/builtins/gen/normalize/9a0aab.wgsl
new file mode 100644
index 0000000..5560b20
--- /dev/null
+++ b/test/builtins/gen/normalize/9a0aab.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn normalize(vec<4, f32>) -> vec<4, f32>
+fn normalize_9a0aab() {
+  var res: vec4<f32> = normalize(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  normalize_9a0aab();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  normalize_9a0aab();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  normalize_9a0aab();
+}
diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.glsl b/test/builtins/gen/normalize/9a0aab.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/normalize/9a0aab.wgsl.expected.glsl
rename to test/builtins/gen/normalize/9a0aab.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.hlsl b/test/builtins/gen/normalize/9a0aab.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/normalize/9a0aab.wgsl.expected.hlsl
rename to test/builtins/gen/normalize/9a0aab.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.msl b/test/builtins/gen/normalize/9a0aab.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/normalize/9a0aab.wgsl.expected.msl
rename to test/builtins/gen/normalize/9a0aab.wgsl.expected.msl
diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.spvasm b/test/builtins/gen/normalize/9a0aab.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/normalize/9a0aab.wgsl.expected.spvasm
rename to test/builtins/gen/normalize/9a0aab.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.wgsl b/test/builtins/gen/normalize/9a0aab.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/normalize/9a0aab.wgsl.expected.wgsl
rename to test/builtins/gen/normalize/9a0aab.wgsl.expected.wgsl
diff --git a/test/builtins/gen/normalize/fc2ef1.wgsl b/test/builtins/gen/normalize/fc2ef1.wgsl
new file mode 100644
index 0000000..2c70e6d
--- /dev/null
+++ b/test/builtins/gen/normalize/fc2ef1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn normalize(vec<2, f32>) -> vec<2, f32>
+fn normalize_fc2ef1() {
+  var res: vec2<f32> = normalize(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  normalize_fc2ef1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  normalize_fc2ef1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  normalize_fc2ef1();
+}
diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.glsl b/test/builtins/gen/normalize/fc2ef1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.glsl
rename to test/builtins/gen/normalize/fc2ef1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.hlsl b/test/builtins/gen/normalize/fc2ef1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.hlsl
rename to test/builtins/gen/normalize/fc2ef1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.msl b/test/builtins/gen/normalize/fc2ef1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.msl
rename to test/builtins/gen/normalize/fc2ef1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.spvasm b/test/builtins/gen/normalize/fc2ef1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.spvasm
rename to test/builtins/gen/normalize/fc2ef1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.wgsl b/test/builtins/gen/normalize/fc2ef1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.wgsl
rename to test/builtins/gen/normalize/fc2ef1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/pack2x16float/0e97b3.wgsl b/test/builtins/gen/pack2x16float/0e97b3.wgsl
new file mode 100644
index 0000000..92252ef
--- /dev/null
+++ b/test/builtins/gen/pack2x16float/0e97b3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn pack2x16float(vec2<f32>) -> u32
+fn pack2x16float_0e97b3() {
+  var res: u32 = pack2x16float(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pack2x16float_0e97b3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  pack2x16float_0e97b3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  pack2x16float_0e97b3();
+}
diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.glsl b/test/builtins/gen/pack2x16float/0e97b3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.glsl
rename to test/builtins/gen/pack2x16float/0e97b3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.hlsl b/test/builtins/gen/pack2x16float/0e97b3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.hlsl
rename to test/builtins/gen/pack2x16float/0e97b3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.msl b/test/builtins/gen/pack2x16float/0e97b3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.msl
rename to test/builtins/gen/pack2x16float/0e97b3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.spvasm b/test/builtins/gen/pack2x16float/0e97b3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.spvasm
rename to test/builtins/gen/pack2x16float/0e97b3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.wgsl b/test/builtins/gen/pack2x16float/0e97b3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.wgsl
rename to test/builtins/gen/pack2x16float/0e97b3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/pack2x16snorm/6c169b.wgsl b/test/builtins/gen/pack2x16snorm/6c169b.wgsl
new file mode 100644
index 0000000..ce748f8
--- /dev/null
+++ b/test/builtins/gen/pack2x16snorm/6c169b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn pack2x16snorm(vec2<f32>) -> u32
+fn pack2x16snorm_6c169b() {
+  var res: u32 = pack2x16snorm(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pack2x16snorm_6c169b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  pack2x16snorm_6c169b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  pack2x16snorm_6c169b();
+}
diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.glsl b/test/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.glsl
rename to test/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl b/test/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl
rename to test/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.msl b/test/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.msl
rename to test/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.spvasm b/test/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.spvasm
rename to test/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.wgsl b/test/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.wgsl
rename to test/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/pack2x16unorm/0f08e4.wgsl b/test/builtins/gen/pack2x16unorm/0f08e4.wgsl
new file mode 100644
index 0000000..9f58257
--- /dev/null
+++ b/test/builtins/gen/pack2x16unorm/0f08e4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn pack2x16unorm(vec2<f32>) -> u32
+fn pack2x16unorm_0f08e4() {
+  var res: u32 = pack2x16unorm(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pack2x16unorm_0f08e4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  pack2x16unorm_0f08e4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  pack2x16unorm_0f08e4();
+}
diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.glsl b/test/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.glsl
rename to test/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl b/test/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl
rename to test/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.msl b/test/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.msl
rename to test/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.spvasm b/test/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.spvasm
rename to test/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.wgsl b/test/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.wgsl
rename to test/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/pack4x8snorm/4d22e7.wgsl b/test/builtins/gen/pack4x8snorm/4d22e7.wgsl
new file mode 100644
index 0000000..cebba85
--- /dev/null
+++ b/test/builtins/gen/pack4x8snorm/4d22e7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn pack4x8snorm(vec4<f32>) -> u32
+fn pack4x8snorm_4d22e7() {
+  var res: u32 = pack4x8snorm(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pack4x8snorm_4d22e7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  pack4x8snorm_4d22e7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  pack4x8snorm_4d22e7();
+}
diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.glsl b/test/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.glsl
rename to test/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl b/test/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl
rename to test/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.msl b/test/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.msl
rename to test/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.spvasm b/test/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.spvasm
rename to test/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.wgsl b/test/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.wgsl
rename to test/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/pack4x8unorm/95c456.wgsl b/test/builtins/gen/pack4x8unorm/95c456.wgsl
new file mode 100644
index 0000000..f7f20ab
--- /dev/null
+++ b/test/builtins/gen/pack4x8unorm/95c456.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn pack4x8unorm(vec4<f32>) -> u32
+fn pack4x8unorm_95c456() {
+  var res: u32 = pack4x8unorm(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pack4x8unorm_95c456();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  pack4x8unorm_95c456();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  pack4x8unorm_95c456();
+}
diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.glsl b/test/builtins/gen/pack4x8unorm/95c456.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.glsl
rename to test/builtins/gen/pack4x8unorm/95c456.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.hlsl b/test/builtins/gen/pack4x8unorm/95c456.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.hlsl
rename to test/builtins/gen/pack4x8unorm/95c456.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.msl b/test/builtins/gen/pack4x8unorm/95c456.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.msl
rename to test/builtins/gen/pack4x8unorm/95c456.wgsl.expected.msl
diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.spvasm b/test/builtins/gen/pack4x8unorm/95c456.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.spvasm
rename to test/builtins/gen/pack4x8unorm/95c456.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.wgsl b/test/builtins/gen/pack4x8unorm/95c456.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.wgsl
rename to test/builtins/gen/pack4x8unorm/95c456.wgsl.expected.wgsl
diff --git a/test/builtins/gen/pow/04a908.wgsl b/test/builtins/gen/pow/04a908.wgsl
new file mode 100644
index 0000000..87e649b
--- /dev/null
+++ b/test/builtins/gen/pow/04a908.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn pow(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn pow_04a908() {
+  var res: vec4<f32> = pow(vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_04a908();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  pow_04a908();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  pow_04a908();
+}
diff --git a/test/intrinsics/gen/pow/04a908.wgsl.expected.glsl b/test/builtins/gen/pow/04a908.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/pow/04a908.wgsl.expected.glsl
rename to test/builtins/gen/pow/04a908.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/pow/04a908.wgsl.expected.hlsl b/test/builtins/gen/pow/04a908.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/pow/04a908.wgsl.expected.hlsl
rename to test/builtins/gen/pow/04a908.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/pow/04a908.wgsl.expected.msl b/test/builtins/gen/pow/04a908.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/pow/04a908.wgsl.expected.msl
rename to test/builtins/gen/pow/04a908.wgsl.expected.msl
diff --git a/test/intrinsics/gen/pow/04a908.wgsl.expected.spvasm b/test/builtins/gen/pow/04a908.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/pow/04a908.wgsl.expected.spvasm
rename to test/builtins/gen/pow/04a908.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/pow/04a908.wgsl.expected.wgsl b/test/builtins/gen/pow/04a908.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/pow/04a908.wgsl.expected.wgsl
rename to test/builtins/gen/pow/04a908.wgsl.expected.wgsl
diff --git a/test/builtins/gen/pow/46e029.wgsl b/test/builtins/gen/pow/46e029.wgsl
new file mode 100644
index 0000000..030f087
--- /dev/null
+++ b/test/builtins/gen/pow/46e029.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn pow(f32, f32) -> f32
+fn pow_46e029() {
+  var res: f32 = pow(1.0, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_46e029();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  pow_46e029();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  pow_46e029();
+}
diff --git a/test/intrinsics/gen/pow/46e029.wgsl.expected.glsl b/test/builtins/gen/pow/46e029.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/pow/46e029.wgsl.expected.glsl
rename to test/builtins/gen/pow/46e029.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/pow/46e029.wgsl.expected.hlsl b/test/builtins/gen/pow/46e029.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/pow/46e029.wgsl.expected.hlsl
rename to test/builtins/gen/pow/46e029.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/pow/46e029.wgsl.expected.msl b/test/builtins/gen/pow/46e029.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/pow/46e029.wgsl.expected.msl
rename to test/builtins/gen/pow/46e029.wgsl.expected.msl
diff --git a/test/intrinsics/gen/pow/46e029.wgsl.expected.spvasm b/test/builtins/gen/pow/46e029.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/pow/46e029.wgsl.expected.spvasm
rename to test/builtins/gen/pow/46e029.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/pow/46e029.wgsl.expected.wgsl b/test/builtins/gen/pow/46e029.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/pow/46e029.wgsl.expected.wgsl
rename to test/builtins/gen/pow/46e029.wgsl.expected.wgsl
diff --git a/test/builtins/gen/pow/4a46c9.wgsl b/test/builtins/gen/pow/4a46c9.wgsl
new file mode 100644
index 0000000..8d31659
--- /dev/null
+++ b/test/builtins/gen/pow/4a46c9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn pow(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn pow_4a46c9() {
+  var res: vec3<f32> = pow(vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_4a46c9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  pow_4a46c9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  pow_4a46c9();
+}
diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.glsl b/test/builtins/gen/pow/4a46c9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/pow/4a46c9.wgsl.expected.glsl
rename to test/builtins/gen/pow/4a46c9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.hlsl b/test/builtins/gen/pow/4a46c9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/pow/4a46c9.wgsl.expected.hlsl
rename to test/builtins/gen/pow/4a46c9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.msl b/test/builtins/gen/pow/4a46c9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/pow/4a46c9.wgsl.expected.msl
rename to test/builtins/gen/pow/4a46c9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.spvasm b/test/builtins/gen/pow/4a46c9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/pow/4a46c9.wgsl.expected.spvasm
rename to test/builtins/gen/pow/4a46c9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.wgsl b/test/builtins/gen/pow/4a46c9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/pow/4a46c9.wgsl.expected.wgsl
rename to test/builtins/gen/pow/4a46c9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/pow/e60ea5.wgsl b/test/builtins/gen/pow/e60ea5.wgsl
new file mode 100644
index 0000000..266bc05
--- /dev/null
+++ b/test/builtins/gen/pow/e60ea5.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn pow(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn pow_e60ea5() {
+  var res: vec2<f32> = pow(vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_e60ea5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  pow_e60ea5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  pow_e60ea5();
+}
diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.glsl b/test/builtins/gen/pow/e60ea5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/pow/e60ea5.wgsl.expected.glsl
rename to test/builtins/gen/pow/e60ea5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.hlsl b/test/builtins/gen/pow/e60ea5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/pow/e60ea5.wgsl.expected.hlsl
rename to test/builtins/gen/pow/e60ea5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.msl b/test/builtins/gen/pow/e60ea5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/pow/e60ea5.wgsl.expected.msl
rename to test/builtins/gen/pow/e60ea5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.spvasm b/test/builtins/gen/pow/e60ea5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/pow/e60ea5.wgsl.expected.spvasm
rename to test/builtins/gen/pow/e60ea5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.wgsl b/test/builtins/gen/pow/e60ea5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/pow/e60ea5.wgsl.expected.wgsl
rename to test/builtins/gen/pow/e60ea5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/radians/09b7fc.wgsl b/test/builtins/gen/radians/09b7fc.wgsl
new file mode 100644
index 0000000..d0617db
--- /dev/null
+++ b/test/builtins/gen/radians/09b7fc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn radians(vec<4, f32>) -> vec<4, f32>
+fn radians_09b7fc() {
+  var res: vec4<f32> = radians(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_09b7fc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  radians_09b7fc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  radians_09b7fc();
+}
diff --git a/test/intrinsics/gen/radians/09b7fc.wgsl.expected.glsl b/test/builtins/gen/radians/09b7fc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/radians/09b7fc.wgsl.expected.glsl
rename to test/builtins/gen/radians/09b7fc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/radians/09b7fc.wgsl.expected.hlsl b/test/builtins/gen/radians/09b7fc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/radians/09b7fc.wgsl.expected.hlsl
rename to test/builtins/gen/radians/09b7fc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/radians/09b7fc.wgsl.expected.msl b/test/builtins/gen/radians/09b7fc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/radians/09b7fc.wgsl.expected.msl
rename to test/builtins/gen/radians/09b7fc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/radians/09b7fc.wgsl.expected.spvasm b/test/builtins/gen/radians/09b7fc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/radians/09b7fc.wgsl.expected.spvasm
rename to test/builtins/gen/radians/09b7fc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/radians/09b7fc.wgsl.expected.wgsl b/test/builtins/gen/radians/09b7fc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/radians/09b7fc.wgsl.expected.wgsl
rename to test/builtins/gen/radians/09b7fc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/radians/61687a.wgsl b/test/builtins/gen/radians/61687a.wgsl
new file mode 100644
index 0000000..d1e80df
--- /dev/null
+++ b/test/builtins/gen/radians/61687a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn radians(vec<2, f32>) -> vec<2, f32>
+fn radians_61687a() {
+  var res: vec2<f32> = radians(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_61687a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  radians_61687a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  radians_61687a();
+}
diff --git a/test/intrinsics/gen/radians/61687a.wgsl.expected.glsl b/test/builtins/gen/radians/61687a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/radians/61687a.wgsl.expected.glsl
rename to test/builtins/gen/radians/61687a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/radians/61687a.wgsl.expected.hlsl b/test/builtins/gen/radians/61687a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/radians/61687a.wgsl.expected.hlsl
rename to test/builtins/gen/radians/61687a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/radians/61687a.wgsl.expected.msl b/test/builtins/gen/radians/61687a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/radians/61687a.wgsl.expected.msl
rename to test/builtins/gen/radians/61687a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/radians/61687a.wgsl.expected.spvasm b/test/builtins/gen/radians/61687a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/radians/61687a.wgsl.expected.spvasm
rename to test/builtins/gen/radians/61687a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/radians/61687a.wgsl.expected.wgsl b/test/builtins/gen/radians/61687a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/radians/61687a.wgsl.expected.wgsl
rename to test/builtins/gen/radians/61687a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/radians/6b0ff2.wgsl b/test/builtins/gen/radians/6b0ff2.wgsl
new file mode 100644
index 0000000..4ba7942
--- /dev/null
+++ b/test/builtins/gen/radians/6b0ff2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn radians(f32) -> f32
+fn radians_6b0ff2() {
+  var res: f32 = radians(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_6b0ff2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  radians_6b0ff2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  radians_6b0ff2();
+}
diff --git a/test/intrinsics/gen/radians/6b0ff2.wgsl.expected.glsl b/test/builtins/gen/radians/6b0ff2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/radians/6b0ff2.wgsl.expected.glsl
rename to test/builtins/gen/radians/6b0ff2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/radians/6b0ff2.wgsl.expected.hlsl b/test/builtins/gen/radians/6b0ff2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/radians/6b0ff2.wgsl.expected.hlsl
rename to test/builtins/gen/radians/6b0ff2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/radians/6b0ff2.wgsl.expected.msl b/test/builtins/gen/radians/6b0ff2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/radians/6b0ff2.wgsl.expected.msl
rename to test/builtins/gen/radians/6b0ff2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/radians/6b0ff2.wgsl.expected.spvasm b/test/builtins/gen/radians/6b0ff2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/radians/6b0ff2.wgsl.expected.spvasm
rename to test/builtins/gen/radians/6b0ff2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/radians/6b0ff2.wgsl.expected.wgsl b/test/builtins/gen/radians/6b0ff2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/radians/6b0ff2.wgsl.expected.wgsl
rename to test/builtins/gen/radians/6b0ff2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/radians/f96258.wgsl b/test/builtins/gen/radians/f96258.wgsl
new file mode 100644
index 0000000..5f96335
--- /dev/null
+++ b/test/builtins/gen/radians/f96258.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn radians(vec<3, f32>) -> vec<3, f32>
+fn radians_f96258() {
+  var res: vec3<f32> = radians(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_f96258();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  radians_f96258();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  radians_f96258();
+}
diff --git a/test/intrinsics/gen/radians/f96258.wgsl.expected.glsl b/test/builtins/gen/radians/f96258.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/radians/f96258.wgsl.expected.glsl
rename to test/builtins/gen/radians/f96258.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/radians/f96258.wgsl.expected.hlsl b/test/builtins/gen/radians/f96258.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/radians/f96258.wgsl.expected.hlsl
rename to test/builtins/gen/radians/f96258.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/radians/f96258.wgsl.expected.msl b/test/builtins/gen/radians/f96258.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/radians/f96258.wgsl.expected.msl
rename to test/builtins/gen/radians/f96258.wgsl.expected.msl
diff --git a/test/intrinsics/gen/radians/f96258.wgsl.expected.spvasm b/test/builtins/gen/radians/f96258.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/radians/f96258.wgsl.expected.spvasm
rename to test/builtins/gen/radians/f96258.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/radians/f96258.wgsl.expected.wgsl b/test/builtins/gen/radians/f96258.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/radians/f96258.wgsl.expected.wgsl
rename to test/builtins/gen/radians/f96258.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reflect/05357e.wgsl b/test/builtins/gen/reflect/05357e.wgsl
new file mode 100644
index 0000000..cbf045d
--- /dev/null
+++ b/test/builtins/gen/reflect/05357e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reflect(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn reflect_05357e() {
+  var res: vec4<f32> = reflect(vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reflect_05357e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reflect_05357e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reflect_05357e();
+}
diff --git a/test/intrinsics/gen/reflect/05357e.wgsl.expected.glsl b/test/builtins/gen/reflect/05357e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reflect/05357e.wgsl.expected.glsl
rename to test/builtins/gen/reflect/05357e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reflect/05357e.wgsl.expected.hlsl b/test/builtins/gen/reflect/05357e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reflect/05357e.wgsl.expected.hlsl
rename to test/builtins/gen/reflect/05357e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reflect/05357e.wgsl.expected.msl b/test/builtins/gen/reflect/05357e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reflect/05357e.wgsl.expected.msl
rename to test/builtins/gen/reflect/05357e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reflect/05357e.wgsl.expected.spvasm b/test/builtins/gen/reflect/05357e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reflect/05357e.wgsl.expected.spvasm
rename to test/builtins/gen/reflect/05357e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reflect/05357e.wgsl.expected.wgsl b/test/builtins/gen/reflect/05357e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reflect/05357e.wgsl.expected.wgsl
rename to test/builtins/gen/reflect/05357e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reflect/b61e10.wgsl b/test/builtins/gen/reflect/b61e10.wgsl
new file mode 100644
index 0000000..15e1ec7
--- /dev/null
+++ b/test/builtins/gen/reflect/b61e10.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reflect(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn reflect_b61e10() {
+  var res: vec2<f32> = reflect(vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reflect_b61e10();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reflect_b61e10();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reflect_b61e10();
+}
diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.glsl b/test/builtins/gen/reflect/b61e10.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reflect/b61e10.wgsl.expected.glsl
rename to test/builtins/gen/reflect/b61e10.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.hlsl b/test/builtins/gen/reflect/b61e10.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reflect/b61e10.wgsl.expected.hlsl
rename to test/builtins/gen/reflect/b61e10.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.msl b/test/builtins/gen/reflect/b61e10.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reflect/b61e10.wgsl.expected.msl
rename to test/builtins/gen/reflect/b61e10.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.spvasm b/test/builtins/gen/reflect/b61e10.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reflect/b61e10.wgsl.expected.spvasm
rename to test/builtins/gen/reflect/b61e10.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.wgsl b/test/builtins/gen/reflect/b61e10.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reflect/b61e10.wgsl.expected.wgsl
rename to test/builtins/gen/reflect/b61e10.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reflect/f47fdb.wgsl b/test/builtins/gen/reflect/f47fdb.wgsl
new file mode 100644
index 0000000..86290aa
--- /dev/null
+++ b/test/builtins/gen/reflect/f47fdb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reflect(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn reflect_f47fdb() {
+  var res: vec3<f32> = reflect(vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reflect_f47fdb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reflect_f47fdb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reflect_f47fdb();
+}
diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.glsl b/test/builtins/gen/reflect/f47fdb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reflect/f47fdb.wgsl.expected.glsl
rename to test/builtins/gen/reflect/f47fdb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.hlsl b/test/builtins/gen/reflect/f47fdb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reflect/f47fdb.wgsl.expected.hlsl
rename to test/builtins/gen/reflect/f47fdb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.msl b/test/builtins/gen/reflect/f47fdb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reflect/f47fdb.wgsl.expected.msl
rename to test/builtins/gen/reflect/f47fdb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.spvasm b/test/builtins/gen/reflect/f47fdb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reflect/f47fdb.wgsl.expected.spvasm
rename to test/builtins/gen/reflect/f47fdb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.wgsl b/test/builtins/gen/reflect/f47fdb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reflect/f47fdb.wgsl.expected.wgsl
rename to test/builtins/gen/reflect/f47fdb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/refract/7e02e6.wgsl b/test/builtins/gen/refract/7e02e6.wgsl
new file mode 100644
index 0000000..e49ccde
--- /dev/null
+++ b/test/builtins/gen/refract/7e02e6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn refract(vec<4, f32>, vec<4, f32>, f32) -> vec<4, f32>
+fn refract_7e02e6() {
+  var res: vec4<f32> = refract(vec4<f32>(), vec4<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  refract_7e02e6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  refract_7e02e6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  refract_7e02e6();
+}
diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.glsl b/test/builtins/gen/refract/7e02e6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/refract/7e02e6.wgsl.expected.glsl
rename to test/builtins/gen/refract/7e02e6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.hlsl b/test/builtins/gen/refract/7e02e6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/refract/7e02e6.wgsl.expected.hlsl
rename to test/builtins/gen/refract/7e02e6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.msl b/test/builtins/gen/refract/7e02e6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/refract/7e02e6.wgsl.expected.msl
rename to test/builtins/gen/refract/7e02e6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.spvasm b/test/builtins/gen/refract/7e02e6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/refract/7e02e6.wgsl.expected.spvasm
rename to test/builtins/gen/refract/7e02e6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.wgsl b/test/builtins/gen/refract/7e02e6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/refract/7e02e6.wgsl.expected.wgsl
rename to test/builtins/gen/refract/7e02e6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/refract/cbc1d2.wgsl b/test/builtins/gen/refract/cbc1d2.wgsl
new file mode 100644
index 0000000..6abdc6e
--- /dev/null
+++ b/test/builtins/gen/refract/cbc1d2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn refract(vec<3, f32>, vec<3, f32>, f32) -> vec<3, f32>
+fn refract_cbc1d2() {
+  var res: vec3<f32> = refract(vec3<f32>(), vec3<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  refract_cbc1d2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  refract_cbc1d2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  refract_cbc1d2();
+}
diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.glsl b/test/builtins/gen/refract/cbc1d2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/refract/cbc1d2.wgsl.expected.glsl
rename to test/builtins/gen/refract/cbc1d2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.hlsl b/test/builtins/gen/refract/cbc1d2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/refract/cbc1d2.wgsl.expected.hlsl
rename to test/builtins/gen/refract/cbc1d2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.msl b/test/builtins/gen/refract/cbc1d2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/refract/cbc1d2.wgsl.expected.msl
rename to test/builtins/gen/refract/cbc1d2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.spvasm b/test/builtins/gen/refract/cbc1d2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/refract/cbc1d2.wgsl.expected.spvasm
rename to test/builtins/gen/refract/cbc1d2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.wgsl b/test/builtins/gen/refract/cbc1d2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/refract/cbc1d2.wgsl.expected.wgsl
rename to test/builtins/gen/refract/cbc1d2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/refract/cd905f.wgsl b/test/builtins/gen/refract/cd905f.wgsl
new file mode 100644
index 0000000..44d4e1b
--- /dev/null
+++ b/test/builtins/gen/refract/cd905f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn refract(vec<2, f32>, vec<2, f32>, f32) -> vec<2, f32>
+fn refract_cd905f() {
+  var res: vec2<f32> = refract(vec2<f32>(), vec2<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  refract_cd905f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  refract_cd905f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  refract_cd905f();
+}
diff --git a/test/intrinsics/gen/refract/cd905f.wgsl.expected.glsl b/test/builtins/gen/refract/cd905f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/refract/cd905f.wgsl.expected.glsl
rename to test/builtins/gen/refract/cd905f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/refract/cd905f.wgsl.expected.hlsl b/test/builtins/gen/refract/cd905f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/refract/cd905f.wgsl.expected.hlsl
rename to test/builtins/gen/refract/cd905f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/refract/cd905f.wgsl.expected.msl b/test/builtins/gen/refract/cd905f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/refract/cd905f.wgsl.expected.msl
rename to test/builtins/gen/refract/cd905f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/refract/cd905f.wgsl.expected.spvasm b/test/builtins/gen/refract/cd905f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/refract/cd905f.wgsl.expected.spvasm
rename to test/builtins/gen/refract/cd905f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/refract/cd905f.wgsl.expected.wgsl b/test/builtins/gen/refract/cd905f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/refract/cd905f.wgsl.expected.wgsl
rename to test/builtins/gen/refract/cd905f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reverseBits/222177.wgsl b/test/builtins/gen/reverseBits/222177.wgsl
new file mode 100644
index 0000000..467bc9f
--- /dev/null
+++ b/test/builtins/gen/reverseBits/222177.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reverseBits(vec<2, i32>) -> vec<2, i32>
+fn reverseBits_222177() {
+  var res: vec2<i32> = reverseBits(vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reverseBits_222177();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reverseBits_222177();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reverseBits_222177();
+}
diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.glsl b/test/builtins/gen/reverseBits/222177.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/222177.wgsl.expected.glsl
rename to test/builtins/gen/reverseBits/222177.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.hlsl b/test/builtins/gen/reverseBits/222177.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/222177.wgsl.expected.hlsl
rename to test/builtins/gen/reverseBits/222177.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.msl b/test/builtins/gen/reverseBits/222177.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/222177.wgsl.expected.msl
rename to test/builtins/gen/reverseBits/222177.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.spvasm b/test/builtins/gen/reverseBits/222177.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reverseBits/222177.wgsl.expected.spvasm
rename to test/builtins/gen/reverseBits/222177.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.wgsl b/test/builtins/gen/reverseBits/222177.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/222177.wgsl.expected.wgsl
rename to test/builtins/gen/reverseBits/222177.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reverseBits/35fea9.wgsl b/test/builtins/gen/reverseBits/35fea9.wgsl
new file mode 100644
index 0000000..61ba539
--- /dev/null
+++ b/test/builtins/gen/reverseBits/35fea9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reverseBits(vec<4, u32>) -> vec<4, u32>
+fn reverseBits_35fea9() {
+  var res: vec4<u32> = reverseBits(vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reverseBits_35fea9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reverseBits_35fea9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reverseBits_35fea9();
+}
diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.glsl b/test/builtins/gen/reverseBits/35fea9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.glsl
rename to test/builtins/gen/reverseBits/35fea9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.hlsl b/test/builtins/gen/reverseBits/35fea9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.hlsl
rename to test/builtins/gen/reverseBits/35fea9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.msl b/test/builtins/gen/reverseBits/35fea9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.msl
rename to test/builtins/gen/reverseBits/35fea9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.spvasm b/test/builtins/gen/reverseBits/35fea9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.spvasm
rename to test/builtins/gen/reverseBits/35fea9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.wgsl b/test/builtins/gen/reverseBits/35fea9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.wgsl
rename to test/builtins/gen/reverseBits/35fea9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reverseBits/4dbd6f.wgsl b/test/builtins/gen/reverseBits/4dbd6f.wgsl
new file mode 100644
index 0000000..ff3d4f8
--- /dev/null
+++ b/test/builtins/gen/reverseBits/4dbd6f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reverseBits(vec<4, i32>) -> vec<4, i32>
+fn reverseBits_4dbd6f() {
+  var res: vec4<i32> = reverseBits(vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reverseBits_4dbd6f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reverseBits_4dbd6f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reverseBits_4dbd6f();
+}
diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.glsl b/test/builtins/gen/reverseBits/4dbd6f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.glsl
rename to test/builtins/gen/reverseBits/4dbd6f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.hlsl b/test/builtins/gen/reverseBits/4dbd6f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.hlsl
rename to test/builtins/gen/reverseBits/4dbd6f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.msl b/test/builtins/gen/reverseBits/4dbd6f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.msl
rename to test/builtins/gen/reverseBits/4dbd6f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.spvasm b/test/builtins/gen/reverseBits/4dbd6f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.spvasm
rename to test/builtins/gen/reverseBits/4dbd6f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.wgsl b/test/builtins/gen/reverseBits/4dbd6f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.wgsl
rename to test/builtins/gen/reverseBits/4dbd6f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reverseBits/7c4269.wgsl b/test/builtins/gen/reverseBits/7c4269.wgsl
new file mode 100644
index 0000000..699344a
--- /dev/null
+++ b/test/builtins/gen/reverseBits/7c4269.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reverseBits(i32) -> i32
+fn reverseBits_7c4269() {
+  var res: i32 = reverseBits(1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reverseBits_7c4269();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reverseBits_7c4269();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reverseBits_7c4269();
+}
diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.glsl b/test/builtins/gen/reverseBits/7c4269.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.glsl
rename to test/builtins/gen/reverseBits/7c4269.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.hlsl b/test/builtins/gen/reverseBits/7c4269.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.hlsl
rename to test/builtins/gen/reverseBits/7c4269.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.msl b/test/builtins/gen/reverseBits/7c4269.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.msl
rename to test/builtins/gen/reverseBits/7c4269.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.spvasm b/test/builtins/gen/reverseBits/7c4269.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.spvasm
rename to test/builtins/gen/reverseBits/7c4269.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.wgsl b/test/builtins/gen/reverseBits/7c4269.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.wgsl
rename to test/builtins/gen/reverseBits/7c4269.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reverseBits/a6ccd4.wgsl b/test/builtins/gen/reverseBits/a6ccd4.wgsl
new file mode 100644
index 0000000..6b1c244
--- /dev/null
+++ b/test/builtins/gen/reverseBits/a6ccd4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reverseBits(vec<3, u32>) -> vec<3, u32>
+fn reverseBits_a6ccd4() {
+  var res: vec3<u32> = reverseBits(vec3<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reverseBits_a6ccd4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reverseBits_a6ccd4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reverseBits_a6ccd4();
+}
diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.glsl b/test/builtins/gen/reverseBits/a6ccd4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.glsl
rename to test/builtins/gen/reverseBits/a6ccd4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.hlsl b/test/builtins/gen/reverseBits/a6ccd4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.hlsl
rename to test/builtins/gen/reverseBits/a6ccd4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.msl b/test/builtins/gen/reverseBits/a6ccd4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.msl
rename to test/builtins/gen/reverseBits/a6ccd4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.spvasm b/test/builtins/gen/reverseBits/a6ccd4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.spvasm
rename to test/builtins/gen/reverseBits/a6ccd4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.wgsl b/test/builtins/gen/reverseBits/a6ccd4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.wgsl
rename to test/builtins/gen/reverseBits/a6ccd4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reverseBits/c21bc1.wgsl b/test/builtins/gen/reverseBits/c21bc1.wgsl
new file mode 100644
index 0000000..cb6f8e3
--- /dev/null
+++ b/test/builtins/gen/reverseBits/c21bc1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reverseBits(vec<3, i32>) -> vec<3, i32>
+fn reverseBits_c21bc1() {
+  var res: vec3<i32> = reverseBits(vec3<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reverseBits_c21bc1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reverseBits_c21bc1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reverseBits_c21bc1();
+}
diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.glsl b/test/builtins/gen/reverseBits/c21bc1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.glsl
rename to test/builtins/gen/reverseBits/c21bc1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.hlsl b/test/builtins/gen/reverseBits/c21bc1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.hlsl
rename to test/builtins/gen/reverseBits/c21bc1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.msl b/test/builtins/gen/reverseBits/c21bc1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.msl
rename to test/builtins/gen/reverseBits/c21bc1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.spvasm b/test/builtins/gen/reverseBits/c21bc1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.spvasm
rename to test/builtins/gen/reverseBits/c21bc1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.wgsl b/test/builtins/gen/reverseBits/c21bc1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.wgsl
rename to test/builtins/gen/reverseBits/c21bc1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reverseBits/e1f4c1.wgsl b/test/builtins/gen/reverseBits/e1f4c1.wgsl
new file mode 100644
index 0000000..5076c6f
--- /dev/null
+++ b/test/builtins/gen/reverseBits/e1f4c1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reverseBits(vec<2, u32>) -> vec<2, u32>
+fn reverseBits_e1f4c1() {
+  var res: vec2<u32> = reverseBits(vec2<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reverseBits_e1f4c1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reverseBits_e1f4c1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reverseBits_e1f4c1();
+}
diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.glsl b/test/builtins/gen/reverseBits/e1f4c1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.glsl
rename to test/builtins/gen/reverseBits/e1f4c1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.hlsl b/test/builtins/gen/reverseBits/e1f4c1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.hlsl
rename to test/builtins/gen/reverseBits/e1f4c1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.msl b/test/builtins/gen/reverseBits/e1f4c1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.msl
rename to test/builtins/gen/reverseBits/e1f4c1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.spvasm b/test/builtins/gen/reverseBits/e1f4c1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.spvasm
rename to test/builtins/gen/reverseBits/e1f4c1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.wgsl b/test/builtins/gen/reverseBits/e1f4c1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.wgsl
rename to test/builtins/gen/reverseBits/e1f4c1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/reverseBits/e31adf.wgsl b/test/builtins/gen/reverseBits/e31adf.wgsl
new file mode 100644
index 0000000..3b31bae
--- /dev/null
+++ b/test/builtins/gen/reverseBits/e31adf.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn reverseBits(u32) -> u32
+fn reverseBits_e31adf() {
+  var res: u32 = reverseBits(1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reverseBits_e31adf();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  reverseBits_e31adf();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  reverseBits_e31adf();
+}
diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.glsl b/test/builtins/gen/reverseBits/e31adf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.glsl
rename to test/builtins/gen/reverseBits/e31adf.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.hlsl b/test/builtins/gen/reverseBits/e31adf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.hlsl
rename to test/builtins/gen/reverseBits/e31adf.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.msl b/test/builtins/gen/reverseBits/e31adf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.msl
rename to test/builtins/gen/reverseBits/e31adf.wgsl.expected.msl
diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.spvasm b/test/builtins/gen/reverseBits/e31adf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.spvasm
rename to test/builtins/gen/reverseBits/e31adf.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.wgsl b/test/builtins/gen/reverseBits/e31adf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.wgsl
rename to test/builtins/gen/reverseBits/e31adf.wgsl.expected.wgsl
diff --git a/test/builtins/gen/round/106c0b.wgsl b/test/builtins/gen/round/106c0b.wgsl
new file mode 100644
index 0000000..5d684ce
--- /dev/null
+++ b/test/builtins/gen/round/106c0b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn round(vec<4, f32>) -> vec<4, f32>
+fn round_106c0b() {
+  var res: vec4<f32> = round(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_106c0b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  round_106c0b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  round_106c0b();
+}
diff --git a/test/intrinsics/gen/round/106c0b.wgsl.expected.glsl b/test/builtins/gen/round/106c0b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/round/106c0b.wgsl.expected.glsl
rename to test/builtins/gen/round/106c0b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/round/106c0b.wgsl.expected.hlsl b/test/builtins/gen/round/106c0b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/round/106c0b.wgsl.expected.hlsl
rename to test/builtins/gen/round/106c0b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/round/106c0b.wgsl.expected.msl b/test/builtins/gen/round/106c0b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/round/106c0b.wgsl.expected.msl
rename to test/builtins/gen/round/106c0b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/round/106c0b.wgsl.expected.spvasm b/test/builtins/gen/round/106c0b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/round/106c0b.wgsl.expected.spvasm
rename to test/builtins/gen/round/106c0b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/round/106c0b.wgsl.expected.wgsl b/test/builtins/gen/round/106c0b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/round/106c0b.wgsl.expected.wgsl
rename to test/builtins/gen/round/106c0b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/round/1c7897.wgsl b/test/builtins/gen/round/1c7897.wgsl
new file mode 100644
index 0000000..8e9898b
--- /dev/null
+++ b/test/builtins/gen/round/1c7897.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn round(vec<3, f32>) -> vec<3, f32>
+fn round_1c7897() {
+  var res: vec3<f32> = round(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_1c7897();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  round_1c7897();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  round_1c7897();
+}
diff --git a/test/intrinsics/gen/round/1c7897.wgsl.expected.glsl b/test/builtins/gen/round/1c7897.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/round/1c7897.wgsl.expected.glsl
rename to test/builtins/gen/round/1c7897.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/round/1c7897.wgsl.expected.hlsl b/test/builtins/gen/round/1c7897.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/round/1c7897.wgsl.expected.hlsl
rename to test/builtins/gen/round/1c7897.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/round/1c7897.wgsl.expected.msl b/test/builtins/gen/round/1c7897.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/round/1c7897.wgsl.expected.msl
rename to test/builtins/gen/round/1c7897.wgsl.expected.msl
diff --git a/test/intrinsics/gen/round/1c7897.wgsl.expected.spvasm b/test/builtins/gen/round/1c7897.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/round/1c7897.wgsl.expected.spvasm
rename to test/builtins/gen/round/1c7897.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/round/1c7897.wgsl.expected.wgsl b/test/builtins/gen/round/1c7897.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/round/1c7897.wgsl.expected.wgsl
rename to test/builtins/gen/round/1c7897.wgsl.expected.wgsl
diff --git a/test/builtins/gen/round/52c84d.wgsl b/test/builtins/gen/round/52c84d.wgsl
new file mode 100644
index 0000000..f3bc8bf
--- /dev/null
+++ b/test/builtins/gen/round/52c84d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn round(vec<2, f32>) -> vec<2, f32>
+fn round_52c84d() {
+  var res: vec2<f32> = round(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_52c84d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  round_52c84d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  round_52c84d();
+}
diff --git a/test/intrinsics/gen/round/52c84d.wgsl.expected.glsl b/test/builtins/gen/round/52c84d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/round/52c84d.wgsl.expected.glsl
rename to test/builtins/gen/round/52c84d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/round/52c84d.wgsl.expected.hlsl b/test/builtins/gen/round/52c84d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/round/52c84d.wgsl.expected.hlsl
rename to test/builtins/gen/round/52c84d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/round/52c84d.wgsl.expected.msl b/test/builtins/gen/round/52c84d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/round/52c84d.wgsl.expected.msl
rename to test/builtins/gen/round/52c84d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/round/52c84d.wgsl.expected.spvasm b/test/builtins/gen/round/52c84d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/round/52c84d.wgsl.expected.spvasm
rename to test/builtins/gen/round/52c84d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/round/52c84d.wgsl.expected.wgsl b/test/builtins/gen/round/52c84d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/round/52c84d.wgsl.expected.wgsl
rename to test/builtins/gen/round/52c84d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/round/9edc38.wgsl b/test/builtins/gen/round/9edc38.wgsl
new file mode 100644
index 0000000..010071b
--- /dev/null
+++ b/test/builtins/gen/round/9edc38.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn round(f32) -> f32
+fn round_9edc38() {
+  var res: f32 = round(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_9edc38();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  round_9edc38();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  round_9edc38();
+}
diff --git a/test/intrinsics/gen/round/9edc38.wgsl.expected.glsl b/test/builtins/gen/round/9edc38.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/round/9edc38.wgsl.expected.glsl
rename to test/builtins/gen/round/9edc38.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/round/9edc38.wgsl.expected.hlsl b/test/builtins/gen/round/9edc38.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/round/9edc38.wgsl.expected.hlsl
rename to test/builtins/gen/round/9edc38.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/round/9edc38.wgsl.expected.msl b/test/builtins/gen/round/9edc38.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/round/9edc38.wgsl.expected.msl
rename to test/builtins/gen/round/9edc38.wgsl.expected.msl
diff --git a/test/intrinsics/gen/round/9edc38.wgsl.expected.spvasm b/test/builtins/gen/round/9edc38.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/round/9edc38.wgsl.expected.spvasm
rename to test/builtins/gen/round/9edc38.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/round/9edc38.wgsl.expected.wgsl b/test/builtins/gen/round/9edc38.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/round/9edc38.wgsl.expected.wgsl
rename to test/builtins/gen/round/9edc38.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/00b848.wgsl b/test/builtins/gen/select/00b848.wgsl
new file mode 100644
index 0000000..32c7ffb
--- /dev/null
+++ b/test/builtins/gen/select/00b848.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<2, i32>, vec<2, i32>, vec<2, bool>) -> vec<2, i32>
+fn select_00b848() {
+  var res: vec2<i32> = select(vec2<i32>(), vec2<i32>(), vec2<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_00b848();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_00b848();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_00b848();
+}
diff --git a/test/intrinsics/gen/select/00b848.wgsl.expected.glsl b/test/builtins/gen/select/00b848.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/00b848.wgsl.expected.glsl
rename to test/builtins/gen/select/00b848.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/00b848.wgsl.expected.hlsl b/test/builtins/gen/select/00b848.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/00b848.wgsl.expected.hlsl
rename to test/builtins/gen/select/00b848.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/00b848.wgsl.expected.msl b/test/builtins/gen/select/00b848.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/00b848.wgsl.expected.msl
rename to test/builtins/gen/select/00b848.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/00b848.wgsl.expected.spvasm b/test/builtins/gen/select/00b848.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/00b848.wgsl.expected.spvasm
rename to test/builtins/gen/select/00b848.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/00b848.wgsl.expected.wgsl b/test/builtins/gen/select/00b848.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/00b848.wgsl.expected.wgsl
rename to test/builtins/gen/select/00b848.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/01e2cd.wgsl b/test/builtins/gen/select/01e2cd.wgsl
new file mode 100644
index 0000000..7715860
--- /dev/null
+++ b/test/builtins/gen/select/01e2cd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<3, i32>, vec<3, i32>, vec<3, bool>) -> vec<3, i32>
+fn select_01e2cd() {
+  var res: vec3<i32> = select(vec3<i32>(), vec3<i32>(), vec3<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_01e2cd();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_01e2cd();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_01e2cd();
+}
diff --git a/test/intrinsics/gen/select/01e2cd.wgsl.expected.glsl b/test/builtins/gen/select/01e2cd.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/01e2cd.wgsl.expected.glsl
rename to test/builtins/gen/select/01e2cd.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/01e2cd.wgsl.expected.hlsl b/test/builtins/gen/select/01e2cd.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/01e2cd.wgsl.expected.hlsl
rename to test/builtins/gen/select/01e2cd.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/01e2cd.wgsl.expected.msl b/test/builtins/gen/select/01e2cd.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/01e2cd.wgsl.expected.msl
rename to test/builtins/gen/select/01e2cd.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/01e2cd.wgsl.expected.spvasm b/test/builtins/gen/select/01e2cd.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/01e2cd.wgsl.expected.spvasm
rename to test/builtins/gen/select/01e2cd.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/01e2cd.wgsl.expected.wgsl b/test/builtins/gen/select/01e2cd.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/01e2cd.wgsl.expected.wgsl
rename to test/builtins/gen/select/01e2cd.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/087ea4.wgsl b/test/builtins/gen/select/087ea4.wgsl
new file mode 100644
index 0000000..a2fcf56
--- /dev/null
+++ b/test/builtins/gen/select/087ea4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<4, u32>, vec<4, u32>, bool) -> vec<4, u32>
+fn select_087ea4() {
+  var res: vec4<u32> = select(vec4<u32>(), vec4<u32>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_087ea4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_087ea4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_087ea4();
+}
diff --git a/test/intrinsics/gen/select/087ea4.wgsl.expected.glsl b/test/builtins/gen/select/087ea4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/087ea4.wgsl.expected.glsl
rename to test/builtins/gen/select/087ea4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/087ea4.wgsl.expected.hlsl b/test/builtins/gen/select/087ea4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/087ea4.wgsl.expected.hlsl
rename to test/builtins/gen/select/087ea4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/087ea4.wgsl.expected.msl b/test/builtins/gen/select/087ea4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/087ea4.wgsl.expected.msl
rename to test/builtins/gen/select/087ea4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/087ea4.wgsl.expected.spvasm b/test/builtins/gen/select/087ea4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/087ea4.wgsl.expected.spvasm
rename to test/builtins/gen/select/087ea4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/087ea4.wgsl.expected.wgsl b/test/builtins/gen/select/087ea4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/087ea4.wgsl.expected.wgsl
rename to test/builtins/gen/select/087ea4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/1e960b.wgsl b/test/builtins/gen/select/1e960b.wgsl
new file mode 100644
index 0000000..6594ce1
--- /dev/null
+++ b/test/builtins/gen/select/1e960b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<2, u32>, vec<2, u32>, vec<2, bool>) -> vec<2, u32>
+fn select_1e960b() {
+  var res: vec2<u32> = select(vec2<u32>(), vec2<u32>(), vec2<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_1e960b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_1e960b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_1e960b();
+}
diff --git a/test/intrinsics/gen/select/1e960b.wgsl.expected.glsl b/test/builtins/gen/select/1e960b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/1e960b.wgsl.expected.glsl
rename to test/builtins/gen/select/1e960b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/1e960b.wgsl.expected.hlsl b/test/builtins/gen/select/1e960b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/1e960b.wgsl.expected.hlsl
rename to test/builtins/gen/select/1e960b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/1e960b.wgsl.expected.msl b/test/builtins/gen/select/1e960b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/1e960b.wgsl.expected.msl
rename to test/builtins/gen/select/1e960b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/1e960b.wgsl.expected.spvasm b/test/builtins/gen/select/1e960b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/1e960b.wgsl.expected.spvasm
rename to test/builtins/gen/select/1e960b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/1e960b.wgsl.expected.wgsl b/test/builtins/gen/select/1e960b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/1e960b.wgsl.expected.wgsl
rename to test/builtins/gen/select/1e960b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/266aff.wgsl b/test/builtins/gen/select/266aff.wgsl
new file mode 100644
index 0000000..56e311a
--- /dev/null
+++ b/test/builtins/gen/select/266aff.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<2, f32>, vec<2, f32>, vec<2, bool>) -> vec<2, f32>
+fn select_266aff() {
+  var res: vec2<f32> = select(vec2<f32>(), vec2<f32>(), vec2<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_266aff();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_266aff();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_266aff();
+}
diff --git a/test/intrinsics/gen/select/266aff.wgsl.expected.glsl b/test/builtins/gen/select/266aff.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/266aff.wgsl.expected.glsl
rename to test/builtins/gen/select/266aff.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/266aff.wgsl.expected.hlsl b/test/builtins/gen/select/266aff.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/266aff.wgsl.expected.hlsl
rename to test/builtins/gen/select/266aff.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/266aff.wgsl.expected.msl b/test/builtins/gen/select/266aff.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/266aff.wgsl.expected.msl
rename to test/builtins/gen/select/266aff.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/266aff.wgsl.expected.spvasm b/test/builtins/gen/select/266aff.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/266aff.wgsl.expected.spvasm
rename to test/builtins/gen/select/266aff.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/266aff.wgsl.expected.wgsl b/test/builtins/gen/select/266aff.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/266aff.wgsl.expected.wgsl
rename to test/builtins/gen/select/266aff.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/28a27e.wgsl b/test/builtins/gen/select/28a27e.wgsl
new file mode 100644
index 0000000..42151b5
--- /dev/null
+++ b/test/builtins/gen/select/28a27e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<3, u32>, vec<3, u32>, vec<3, bool>) -> vec<3, u32>
+fn select_28a27e() {
+  var res: vec3<u32> = select(vec3<u32>(), vec3<u32>(), vec3<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_28a27e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_28a27e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_28a27e();
+}
diff --git a/test/intrinsics/gen/select/28a27e.wgsl.expected.glsl b/test/builtins/gen/select/28a27e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/28a27e.wgsl.expected.glsl
rename to test/builtins/gen/select/28a27e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/28a27e.wgsl.expected.hlsl b/test/builtins/gen/select/28a27e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/28a27e.wgsl.expected.hlsl
rename to test/builtins/gen/select/28a27e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/28a27e.wgsl.expected.msl b/test/builtins/gen/select/28a27e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/28a27e.wgsl.expected.msl
rename to test/builtins/gen/select/28a27e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/28a27e.wgsl.expected.spvasm b/test/builtins/gen/select/28a27e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/28a27e.wgsl.expected.spvasm
rename to test/builtins/gen/select/28a27e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/28a27e.wgsl.expected.wgsl b/test/builtins/gen/select/28a27e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/28a27e.wgsl.expected.wgsl
rename to test/builtins/gen/select/28a27e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/3c25ce.wgsl b/test/builtins/gen/select/3c25ce.wgsl
new file mode 100644
index 0000000..3670bd6
--- /dev/null
+++ b/test/builtins/gen/select/3c25ce.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<3, bool>, vec<3, bool>, bool) -> vec<3, bool>
+fn select_3c25ce() {
+  var res: vec3<bool> = select(vec3<bool>(), vec3<bool>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_3c25ce();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_3c25ce();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_3c25ce();
+}
diff --git a/test/intrinsics/gen/select/3c25ce.wgsl.expected.glsl b/test/builtins/gen/select/3c25ce.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/3c25ce.wgsl.expected.glsl
rename to test/builtins/gen/select/3c25ce.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/3c25ce.wgsl.expected.hlsl b/test/builtins/gen/select/3c25ce.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/3c25ce.wgsl.expected.hlsl
rename to test/builtins/gen/select/3c25ce.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/3c25ce.wgsl.expected.msl b/test/builtins/gen/select/3c25ce.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/3c25ce.wgsl.expected.msl
rename to test/builtins/gen/select/3c25ce.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/3c25ce.wgsl.expected.spvasm b/test/builtins/gen/select/3c25ce.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/3c25ce.wgsl.expected.spvasm
rename to test/builtins/gen/select/3c25ce.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/3c25ce.wgsl.expected.wgsl b/test/builtins/gen/select/3c25ce.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/3c25ce.wgsl.expected.wgsl
rename to test/builtins/gen/select/3c25ce.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/416e14.wgsl b/test/builtins/gen/select/416e14.wgsl
new file mode 100644
index 0000000..78d799d
--- /dev/null
+++ b/test/builtins/gen/select/416e14.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(f32, f32, bool) -> f32
+fn select_416e14() {
+  var res: f32 = select(1.0, 1.0, bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_416e14();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_416e14();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_416e14();
+}
diff --git a/test/intrinsics/gen/select/416e14.wgsl.expected.glsl b/test/builtins/gen/select/416e14.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/416e14.wgsl.expected.glsl
rename to test/builtins/gen/select/416e14.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/416e14.wgsl.expected.hlsl b/test/builtins/gen/select/416e14.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/416e14.wgsl.expected.hlsl
rename to test/builtins/gen/select/416e14.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/416e14.wgsl.expected.msl b/test/builtins/gen/select/416e14.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/416e14.wgsl.expected.msl
rename to test/builtins/gen/select/416e14.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/416e14.wgsl.expected.spvasm b/test/builtins/gen/select/416e14.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/416e14.wgsl.expected.spvasm
rename to test/builtins/gen/select/416e14.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/416e14.wgsl.expected.wgsl b/test/builtins/gen/select/416e14.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/416e14.wgsl.expected.wgsl
rename to test/builtins/gen/select/416e14.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/51b047.wgsl b/test/builtins/gen/select/51b047.wgsl
new file mode 100644
index 0000000..63c6e77
--- /dev/null
+++ b/test/builtins/gen/select/51b047.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<2, u32>, vec<2, u32>, bool) -> vec<2, u32>
+fn select_51b047() {
+  var res: vec2<u32> = select(vec2<u32>(), vec2<u32>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_51b047();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_51b047();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_51b047();
+}
diff --git a/test/intrinsics/gen/select/51b047.wgsl.expected.glsl b/test/builtins/gen/select/51b047.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/51b047.wgsl.expected.glsl
rename to test/builtins/gen/select/51b047.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/51b047.wgsl.expected.hlsl b/test/builtins/gen/select/51b047.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/51b047.wgsl.expected.hlsl
rename to test/builtins/gen/select/51b047.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/51b047.wgsl.expected.msl b/test/builtins/gen/select/51b047.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/51b047.wgsl.expected.msl
rename to test/builtins/gen/select/51b047.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/51b047.wgsl.expected.spvasm b/test/builtins/gen/select/51b047.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/51b047.wgsl.expected.spvasm
rename to test/builtins/gen/select/51b047.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/51b047.wgsl.expected.wgsl b/test/builtins/gen/select/51b047.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/51b047.wgsl.expected.wgsl
rename to test/builtins/gen/select/51b047.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/713567.wgsl b/test/builtins/gen/select/713567.wgsl
new file mode 100644
index 0000000..1e3b646
--- /dev/null
+++ b/test/builtins/gen/select/713567.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<4, f32>, vec<4, f32>, bool) -> vec<4, f32>
+fn select_713567() {
+  var res: vec4<f32> = select(vec4<f32>(), vec4<f32>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_713567();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_713567();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_713567();
+}
diff --git a/test/intrinsics/gen/select/713567.wgsl.expected.glsl b/test/builtins/gen/select/713567.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/713567.wgsl.expected.glsl
rename to test/builtins/gen/select/713567.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/713567.wgsl.expected.hlsl b/test/builtins/gen/select/713567.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/713567.wgsl.expected.hlsl
rename to test/builtins/gen/select/713567.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/713567.wgsl.expected.msl b/test/builtins/gen/select/713567.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/713567.wgsl.expected.msl
rename to test/builtins/gen/select/713567.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/713567.wgsl.expected.spvasm b/test/builtins/gen/select/713567.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/713567.wgsl.expected.spvasm
rename to test/builtins/gen/select/713567.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/713567.wgsl.expected.wgsl b/test/builtins/gen/select/713567.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/713567.wgsl.expected.wgsl
rename to test/builtins/gen/select/713567.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/78be5f.wgsl b/test/builtins/gen/select/78be5f.wgsl
new file mode 100644
index 0000000..59b5f04
--- /dev/null
+++ b/test/builtins/gen/select/78be5f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<3, f32>, vec<3, f32>, bool) -> vec<3, f32>
+fn select_78be5f() {
+  var res: vec3<f32> = select(vec3<f32>(), vec3<f32>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_78be5f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_78be5f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_78be5f();
+}
diff --git a/test/intrinsics/gen/select/78be5f.wgsl.expected.glsl b/test/builtins/gen/select/78be5f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/78be5f.wgsl.expected.glsl
rename to test/builtins/gen/select/78be5f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/78be5f.wgsl.expected.hlsl b/test/builtins/gen/select/78be5f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/78be5f.wgsl.expected.hlsl
rename to test/builtins/gen/select/78be5f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/78be5f.wgsl.expected.msl b/test/builtins/gen/select/78be5f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/78be5f.wgsl.expected.msl
rename to test/builtins/gen/select/78be5f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/78be5f.wgsl.expected.spvasm b/test/builtins/gen/select/78be5f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/78be5f.wgsl.expected.spvasm
rename to test/builtins/gen/select/78be5f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/78be5f.wgsl.expected.wgsl b/test/builtins/gen/select/78be5f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/78be5f.wgsl.expected.wgsl
rename to test/builtins/gen/select/78be5f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/80a9a9.wgsl b/test/builtins/gen/select/80a9a9.wgsl
new file mode 100644
index 0000000..5e1fc6c
--- /dev/null
+++ b/test/builtins/gen/select/80a9a9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<3, bool>, vec<3, bool>, vec<3, bool>) -> vec<3, bool>
+fn select_80a9a9() {
+  var res: vec3<bool> = select(vec3<bool>(), vec3<bool>(), vec3<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_80a9a9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_80a9a9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_80a9a9();
+}
diff --git a/test/intrinsics/gen/select/80a9a9.wgsl.expected.glsl b/test/builtins/gen/select/80a9a9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/80a9a9.wgsl.expected.glsl
rename to test/builtins/gen/select/80a9a9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/80a9a9.wgsl.expected.hlsl b/test/builtins/gen/select/80a9a9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/80a9a9.wgsl.expected.hlsl
rename to test/builtins/gen/select/80a9a9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/80a9a9.wgsl.expected.msl b/test/builtins/gen/select/80a9a9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/80a9a9.wgsl.expected.msl
rename to test/builtins/gen/select/80a9a9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/80a9a9.wgsl.expected.spvasm b/test/builtins/gen/select/80a9a9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/80a9a9.wgsl.expected.spvasm
rename to test/builtins/gen/select/80a9a9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/80a9a9.wgsl.expected.wgsl b/test/builtins/gen/select/80a9a9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/80a9a9.wgsl.expected.wgsl
rename to test/builtins/gen/select/80a9a9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/8fa62c.wgsl b/test/builtins/gen/select/8fa62c.wgsl
new file mode 100644
index 0000000..97a8fe7
--- /dev/null
+++ b/test/builtins/gen/select/8fa62c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<3, i32>, vec<3, i32>, bool) -> vec<3, i32>
+fn select_8fa62c() {
+  var res: vec3<i32> = select(vec3<i32>(), vec3<i32>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_8fa62c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_8fa62c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_8fa62c();
+}
diff --git a/test/intrinsics/gen/select/8fa62c.wgsl.expected.glsl b/test/builtins/gen/select/8fa62c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/8fa62c.wgsl.expected.glsl
rename to test/builtins/gen/select/8fa62c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/8fa62c.wgsl.expected.hlsl b/test/builtins/gen/select/8fa62c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/8fa62c.wgsl.expected.hlsl
rename to test/builtins/gen/select/8fa62c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/8fa62c.wgsl.expected.msl b/test/builtins/gen/select/8fa62c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/8fa62c.wgsl.expected.msl
rename to test/builtins/gen/select/8fa62c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/8fa62c.wgsl.expected.spvasm b/test/builtins/gen/select/8fa62c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/8fa62c.wgsl.expected.spvasm
rename to test/builtins/gen/select/8fa62c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/8fa62c.wgsl.expected.wgsl b/test/builtins/gen/select/8fa62c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/8fa62c.wgsl.expected.wgsl
rename to test/builtins/gen/select/8fa62c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/99f883.wgsl b/test/builtins/gen/select/99f883.wgsl
new file mode 100644
index 0000000..7fd93b3
--- /dev/null
+++ b/test/builtins/gen/select/99f883.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(u32, u32, bool) -> u32
+fn select_99f883() {
+  var res: u32 = select(1u, 1u, bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_99f883();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_99f883();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_99f883();
+}
diff --git a/test/intrinsics/gen/select/99f883.wgsl.expected.glsl b/test/builtins/gen/select/99f883.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/99f883.wgsl.expected.glsl
rename to test/builtins/gen/select/99f883.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/99f883.wgsl.expected.hlsl b/test/builtins/gen/select/99f883.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/99f883.wgsl.expected.hlsl
rename to test/builtins/gen/select/99f883.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/99f883.wgsl.expected.msl b/test/builtins/gen/select/99f883.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/99f883.wgsl.expected.msl
rename to test/builtins/gen/select/99f883.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/99f883.wgsl.expected.spvasm b/test/builtins/gen/select/99f883.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/99f883.wgsl.expected.spvasm
rename to test/builtins/gen/select/99f883.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/99f883.wgsl.expected.wgsl b/test/builtins/gen/select/99f883.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/99f883.wgsl.expected.wgsl
rename to test/builtins/gen/select/99f883.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/a2860e.wgsl b/test/builtins/gen/select/a2860e.wgsl
new file mode 100644
index 0000000..f808503
--- /dev/null
+++ b/test/builtins/gen/select/a2860e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<4, i32>, vec<4, i32>, vec<4, bool>) -> vec<4, i32>
+fn select_a2860e() {
+  var res: vec4<i32> = select(vec4<i32>(), vec4<i32>(), vec4<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_a2860e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_a2860e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_a2860e();
+}
diff --git a/test/intrinsics/gen/select/a2860e.wgsl.expected.glsl b/test/builtins/gen/select/a2860e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/a2860e.wgsl.expected.glsl
rename to test/builtins/gen/select/a2860e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/a2860e.wgsl.expected.hlsl b/test/builtins/gen/select/a2860e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/a2860e.wgsl.expected.hlsl
rename to test/builtins/gen/select/a2860e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/a2860e.wgsl.expected.msl b/test/builtins/gen/select/a2860e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/a2860e.wgsl.expected.msl
rename to test/builtins/gen/select/a2860e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/a2860e.wgsl.expected.spvasm b/test/builtins/gen/select/a2860e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/a2860e.wgsl.expected.spvasm
rename to test/builtins/gen/select/a2860e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/a2860e.wgsl.expected.wgsl b/test/builtins/gen/select/a2860e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/a2860e.wgsl.expected.wgsl
rename to test/builtins/gen/select/a2860e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/ab069f.wgsl b/test/builtins/gen/select/ab069f.wgsl
new file mode 100644
index 0000000..e9d766a
--- /dev/null
+++ b/test/builtins/gen/select/ab069f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<4, i32>, vec<4, i32>, bool) -> vec<4, i32>
+fn select_ab069f() {
+  var res: vec4<i32> = select(vec4<i32>(), vec4<i32>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_ab069f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_ab069f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_ab069f();
+}
diff --git a/test/intrinsics/gen/select/ab069f.wgsl.expected.glsl b/test/builtins/gen/select/ab069f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/ab069f.wgsl.expected.glsl
rename to test/builtins/gen/select/ab069f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/ab069f.wgsl.expected.hlsl b/test/builtins/gen/select/ab069f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/ab069f.wgsl.expected.hlsl
rename to test/builtins/gen/select/ab069f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/ab069f.wgsl.expected.msl b/test/builtins/gen/select/ab069f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/ab069f.wgsl.expected.msl
rename to test/builtins/gen/select/ab069f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/ab069f.wgsl.expected.spvasm b/test/builtins/gen/select/ab069f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/ab069f.wgsl.expected.spvasm
rename to test/builtins/gen/select/ab069f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/ab069f.wgsl.expected.wgsl b/test/builtins/gen/select/ab069f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/ab069f.wgsl.expected.wgsl
rename to test/builtins/gen/select/ab069f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/b04721.wgsl b/test/builtins/gen/select/b04721.wgsl
new file mode 100644
index 0000000..2d3f476
--- /dev/null
+++ b/test/builtins/gen/select/b04721.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<3, u32>, vec<3, u32>, bool) -> vec<3, u32>
+fn select_b04721() {
+  var res: vec3<u32> = select(vec3<u32>(), vec3<u32>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_b04721();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_b04721();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_b04721();
+}
diff --git a/test/intrinsics/gen/select/b04721.wgsl.expected.glsl b/test/builtins/gen/select/b04721.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/b04721.wgsl.expected.glsl
rename to test/builtins/gen/select/b04721.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/b04721.wgsl.expected.hlsl b/test/builtins/gen/select/b04721.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/b04721.wgsl.expected.hlsl
rename to test/builtins/gen/select/b04721.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/b04721.wgsl.expected.msl b/test/builtins/gen/select/b04721.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/b04721.wgsl.expected.msl
rename to test/builtins/gen/select/b04721.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/b04721.wgsl.expected.spvasm b/test/builtins/gen/select/b04721.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/b04721.wgsl.expected.spvasm
rename to test/builtins/gen/select/b04721.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/b04721.wgsl.expected.wgsl b/test/builtins/gen/select/b04721.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/b04721.wgsl.expected.wgsl
rename to test/builtins/gen/select/b04721.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/bb447f.wgsl b/test/builtins/gen/select/bb447f.wgsl
new file mode 100644
index 0000000..fe72109
--- /dev/null
+++ b/test/builtins/gen/select/bb447f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<2, i32>, vec<2, i32>, bool) -> vec<2, i32>
+fn select_bb447f() {
+  var res: vec2<i32> = select(vec2<i32>(), vec2<i32>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_bb447f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_bb447f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_bb447f();
+}
diff --git a/test/intrinsics/gen/select/bb447f.wgsl.expected.glsl b/test/builtins/gen/select/bb447f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/bb447f.wgsl.expected.glsl
rename to test/builtins/gen/select/bb447f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/bb447f.wgsl.expected.hlsl b/test/builtins/gen/select/bb447f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/bb447f.wgsl.expected.hlsl
rename to test/builtins/gen/select/bb447f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/bb447f.wgsl.expected.msl b/test/builtins/gen/select/bb447f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/bb447f.wgsl.expected.msl
rename to test/builtins/gen/select/bb447f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/bb447f.wgsl.expected.spvasm b/test/builtins/gen/select/bb447f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/bb447f.wgsl.expected.spvasm
rename to test/builtins/gen/select/bb447f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/bb447f.wgsl.expected.wgsl b/test/builtins/gen/select/bb447f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/bb447f.wgsl.expected.wgsl
rename to test/builtins/gen/select/bb447f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/bb8aae.wgsl b/test/builtins/gen/select/bb8aae.wgsl
new file mode 100644
index 0000000..18b8a09
--- /dev/null
+++ b/test/builtins/gen/select/bb8aae.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<4, f32>, vec<4, f32>, vec<4, bool>) -> vec<4, f32>
+fn select_bb8aae() {
+  var res: vec4<f32> = select(vec4<f32>(), vec4<f32>(), vec4<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_bb8aae();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_bb8aae();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_bb8aae();
+}
diff --git a/test/intrinsics/gen/select/bb8aae.wgsl.expected.glsl b/test/builtins/gen/select/bb8aae.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/bb8aae.wgsl.expected.glsl
rename to test/builtins/gen/select/bb8aae.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/bb8aae.wgsl.expected.hlsl b/test/builtins/gen/select/bb8aae.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/bb8aae.wgsl.expected.hlsl
rename to test/builtins/gen/select/bb8aae.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/bb8aae.wgsl.expected.msl b/test/builtins/gen/select/bb8aae.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/bb8aae.wgsl.expected.msl
rename to test/builtins/gen/select/bb8aae.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/bb8aae.wgsl.expected.spvasm b/test/builtins/gen/select/bb8aae.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/bb8aae.wgsl.expected.spvasm
rename to test/builtins/gen/select/bb8aae.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/bb8aae.wgsl.expected.wgsl b/test/builtins/gen/select/bb8aae.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/bb8aae.wgsl.expected.wgsl
rename to test/builtins/gen/select/bb8aae.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/bf3d29.wgsl b/test/builtins/gen/select/bf3d29.wgsl
new file mode 100644
index 0000000..571a586
--- /dev/null
+++ b/test/builtins/gen/select/bf3d29.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<2, f32>, vec<2, f32>, bool) -> vec<2, f32>
+fn select_bf3d29() {
+  var res: vec2<f32> = select(vec2<f32>(), vec2<f32>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_bf3d29();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_bf3d29();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_bf3d29();
+}
diff --git a/test/intrinsics/gen/select/bf3d29.wgsl.expected.glsl b/test/builtins/gen/select/bf3d29.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/bf3d29.wgsl.expected.glsl
rename to test/builtins/gen/select/bf3d29.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/bf3d29.wgsl.expected.hlsl b/test/builtins/gen/select/bf3d29.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/bf3d29.wgsl.expected.hlsl
rename to test/builtins/gen/select/bf3d29.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/bf3d29.wgsl.expected.msl b/test/builtins/gen/select/bf3d29.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/bf3d29.wgsl.expected.msl
rename to test/builtins/gen/select/bf3d29.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/bf3d29.wgsl.expected.spvasm b/test/builtins/gen/select/bf3d29.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/bf3d29.wgsl.expected.spvasm
rename to test/builtins/gen/select/bf3d29.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/bf3d29.wgsl.expected.wgsl b/test/builtins/gen/select/bf3d29.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/bf3d29.wgsl.expected.wgsl
rename to test/builtins/gen/select/bf3d29.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/c31f9e.wgsl b/test/builtins/gen/select/c31f9e.wgsl
new file mode 100644
index 0000000..1239a04
--- /dev/null
+++ b/test/builtins/gen/select/c31f9e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(bool, bool, bool) -> bool
+fn select_c31f9e() {
+  var res: bool = select(bool(), bool(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_c31f9e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_c31f9e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_c31f9e();
+}
diff --git a/test/intrinsics/gen/select/c31f9e.wgsl.expected.glsl b/test/builtins/gen/select/c31f9e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/c31f9e.wgsl.expected.glsl
rename to test/builtins/gen/select/c31f9e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/c31f9e.wgsl.expected.hlsl b/test/builtins/gen/select/c31f9e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/c31f9e.wgsl.expected.hlsl
rename to test/builtins/gen/select/c31f9e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/c31f9e.wgsl.expected.msl b/test/builtins/gen/select/c31f9e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/c31f9e.wgsl.expected.msl
rename to test/builtins/gen/select/c31f9e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/c31f9e.wgsl.expected.spvasm b/test/builtins/gen/select/c31f9e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/c31f9e.wgsl.expected.spvasm
rename to test/builtins/gen/select/c31f9e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/c31f9e.wgsl.expected.wgsl b/test/builtins/gen/select/c31f9e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/c31f9e.wgsl.expected.wgsl
rename to test/builtins/gen/select/c31f9e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/c41bd1.wgsl b/test/builtins/gen/select/c41bd1.wgsl
new file mode 100644
index 0000000..1f5405e
--- /dev/null
+++ b/test/builtins/gen/select/c41bd1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<4, bool>, vec<4, bool>, bool) -> vec<4, bool>
+fn select_c41bd1() {
+  var res: vec4<bool> = select(vec4<bool>(), vec4<bool>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_c41bd1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_c41bd1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_c41bd1();
+}
diff --git a/test/intrinsics/gen/select/c41bd1.wgsl.expected.glsl b/test/builtins/gen/select/c41bd1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/c41bd1.wgsl.expected.glsl
rename to test/builtins/gen/select/c41bd1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/c41bd1.wgsl.expected.hlsl b/test/builtins/gen/select/c41bd1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/c41bd1.wgsl.expected.hlsl
rename to test/builtins/gen/select/c41bd1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/c41bd1.wgsl.expected.msl b/test/builtins/gen/select/c41bd1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/c41bd1.wgsl.expected.msl
rename to test/builtins/gen/select/c41bd1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/c41bd1.wgsl.expected.spvasm b/test/builtins/gen/select/c41bd1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/c41bd1.wgsl.expected.spvasm
rename to test/builtins/gen/select/c41bd1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/c41bd1.wgsl.expected.wgsl b/test/builtins/gen/select/c41bd1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/c41bd1.wgsl.expected.wgsl
rename to test/builtins/gen/select/c41bd1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/c4a4ef.wgsl b/test/builtins/gen/select/c4a4ef.wgsl
new file mode 100644
index 0000000..2c79927
--- /dev/null
+++ b/test/builtins/gen/select/c4a4ef.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<4, u32>, vec<4, u32>, vec<4, bool>) -> vec<4, u32>
+fn select_c4a4ef() {
+  var res: vec4<u32> = select(vec4<u32>(), vec4<u32>(), vec4<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_c4a4ef();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_c4a4ef();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_c4a4ef();
+}
diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.glsl b/test/builtins/gen/select/c4a4ef.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/c4a4ef.wgsl.expected.glsl
rename to test/builtins/gen/select/c4a4ef.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.hlsl b/test/builtins/gen/select/c4a4ef.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/c4a4ef.wgsl.expected.hlsl
rename to test/builtins/gen/select/c4a4ef.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.msl b/test/builtins/gen/select/c4a4ef.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/c4a4ef.wgsl.expected.msl
rename to test/builtins/gen/select/c4a4ef.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.spvasm b/test/builtins/gen/select/c4a4ef.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/c4a4ef.wgsl.expected.spvasm
rename to test/builtins/gen/select/c4a4ef.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.wgsl b/test/builtins/gen/select/c4a4ef.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/c4a4ef.wgsl.expected.wgsl
rename to test/builtins/gen/select/c4a4ef.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/cb9301.wgsl b/test/builtins/gen/select/cb9301.wgsl
new file mode 100644
index 0000000..5f2a238
--- /dev/null
+++ b/test/builtins/gen/select/cb9301.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<2, bool>, vec<2, bool>, vec<2, bool>) -> vec<2, bool>
+fn select_cb9301() {
+  var res: vec2<bool> = select(vec2<bool>(), vec2<bool>(), vec2<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_cb9301();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_cb9301();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_cb9301();
+}
diff --git a/test/intrinsics/gen/select/cb9301.wgsl.expected.glsl b/test/builtins/gen/select/cb9301.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/cb9301.wgsl.expected.glsl
rename to test/builtins/gen/select/cb9301.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/cb9301.wgsl.expected.hlsl b/test/builtins/gen/select/cb9301.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/cb9301.wgsl.expected.hlsl
rename to test/builtins/gen/select/cb9301.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/cb9301.wgsl.expected.msl b/test/builtins/gen/select/cb9301.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/cb9301.wgsl.expected.msl
rename to test/builtins/gen/select/cb9301.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/cb9301.wgsl.expected.spvasm b/test/builtins/gen/select/cb9301.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/cb9301.wgsl.expected.spvasm
rename to test/builtins/gen/select/cb9301.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/cb9301.wgsl.expected.wgsl b/test/builtins/gen/select/cb9301.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/cb9301.wgsl.expected.wgsl
rename to test/builtins/gen/select/cb9301.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/e3e028.wgsl b/test/builtins/gen/select/e3e028.wgsl
new file mode 100644
index 0000000..157715b
--- /dev/null
+++ b/test/builtins/gen/select/e3e028.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<4, bool>, vec<4, bool>, vec<4, bool>) -> vec<4, bool>
+fn select_e3e028() {
+  var res: vec4<bool> = select(vec4<bool>(), vec4<bool>(), vec4<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_e3e028();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_e3e028();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_e3e028();
+}
diff --git a/test/intrinsics/gen/select/e3e028.wgsl.expected.glsl b/test/builtins/gen/select/e3e028.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/e3e028.wgsl.expected.glsl
rename to test/builtins/gen/select/e3e028.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/e3e028.wgsl.expected.hlsl b/test/builtins/gen/select/e3e028.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/e3e028.wgsl.expected.hlsl
rename to test/builtins/gen/select/e3e028.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/e3e028.wgsl.expected.msl b/test/builtins/gen/select/e3e028.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/e3e028.wgsl.expected.msl
rename to test/builtins/gen/select/e3e028.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/e3e028.wgsl.expected.spvasm b/test/builtins/gen/select/e3e028.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/e3e028.wgsl.expected.spvasm
rename to test/builtins/gen/select/e3e028.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/e3e028.wgsl.expected.wgsl b/test/builtins/gen/select/e3e028.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/e3e028.wgsl.expected.wgsl
rename to test/builtins/gen/select/e3e028.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/ebfea2.wgsl b/test/builtins/gen/select/ebfea2.wgsl
new file mode 100644
index 0000000..a67374c
--- /dev/null
+++ b/test/builtins/gen/select/ebfea2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<3, f32>, vec<3, f32>, vec<3, bool>) -> vec<3, f32>
+fn select_ebfea2() {
+  var res: vec3<f32> = select(vec3<f32>(), vec3<f32>(), vec3<bool>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_ebfea2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_ebfea2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_ebfea2();
+}
diff --git a/test/intrinsics/gen/select/ebfea2.wgsl.expected.glsl b/test/builtins/gen/select/ebfea2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/ebfea2.wgsl.expected.glsl
rename to test/builtins/gen/select/ebfea2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/ebfea2.wgsl.expected.hlsl b/test/builtins/gen/select/ebfea2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/ebfea2.wgsl.expected.hlsl
rename to test/builtins/gen/select/ebfea2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/ebfea2.wgsl.expected.msl b/test/builtins/gen/select/ebfea2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/ebfea2.wgsl.expected.msl
rename to test/builtins/gen/select/ebfea2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/ebfea2.wgsl.expected.spvasm b/test/builtins/gen/select/ebfea2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/ebfea2.wgsl.expected.spvasm
rename to test/builtins/gen/select/ebfea2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/ebfea2.wgsl.expected.wgsl b/test/builtins/gen/select/ebfea2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/ebfea2.wgsl.expected.wgsl
rename to test/builtins/gen/select/ebfea2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/ed8a15.wgsl b/test/builtins/gen/select/ed8a15.wgsl
new file mode 100644
index 0000000..4821ffe
--- /dev/null
+++ b/test/builtins/gen/select/ed8a15.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(i32, i32, bool) -> i32
+fn select_ed8a15() {
+  var res: i32 = select(1, 1, bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_ed8a15();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_ed8a15();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_ed8a15();
+}
diff --git a/test/intrinsics/gen/select/ed8a15.wgsl.expected.glsl b/test/builtins/gen/select/ed8a15.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/ed8a15.wgsl.expected.glsl
rename to test/builtins/gen/select/ed8a15.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/ed8a15.wgsl.expected.hlsl b/test/builtins/gen/select/ed8a15.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/ed8a15.wgsl.expected.hlsl
rename to test/builtins/gen/select/ed8a15.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/ed8a15.wgsl.expected.msl b/test/builtins/gen/select/ed8a15.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/ed8a15.wgsl.expected.msl
rename to test/builtins/gen/select/ed8a15.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/ed8a15.wgsl.expected.spvasm b/test/builtins/gen/select/ed8a15.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/ed8a15.wgsl.expected.spvasm
rename to test/builtins/gen/select/ed8a15.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/ed8a15.wgsl.expected.wgsl b/test/builtins/gen/select/ed8a15.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/ed8a15.wgsl.expected.wgsl
rename to test/builtins/gen/select/ed8a15.wgsl.expected.wgsl
diff --git a/test/builtins/gen/select/fb7e53.wgsl b/test/builtins/gen/select/fb7e53.wgsl
new file mode 100644
index 0000000..de66cf2
--- /dev/null
+++ b/test/builtins/gen/select/fb7e53.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn select(vec<2, bool>, vec<2, bool>, bool) -> vec<2, bool>
+fn select_fb7e53() {
+  var res: vec2<bool> = select(vec2<bool>(), vec2<bool>(), bool());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_fb7e53();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  select_fb7e53();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  select_fb7e53();
+}
diff --git a/test/intrinsics/gen/select/fb7e53.wgsl.expected.glsl b/test/builtins/gen/select/fb7e53.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/select/fb7e53.wgsl.expected.glsl
rename to test/builtins/gen/select/fb7e53.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/select/fb7e53.wgsl.expected.hlsl b/test/builtins/gen/select/fb7e53.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/select/fb7e53.wgsl.expected.hlsl
rename to test/builtins/gen/select/fb7e53.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/select/fb7e53.wgsl.expected.msl b/test/builtins/gen/select/fb7e53.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/select/fb7e53.wgsl.expected.msl
rename to test/builtins/gen/select/fb7e53.wgsl.expected.msl
diff --git a/test/intrinsics/gen/select/fb7e53.wgsl.expected.spvasm b/test/builtins/gen/select/fb7e53.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/select/fb7e53.wgsl.expected.spvasm
rename to test/builtins/gen/select/fb7e53.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/select/fb7e53.wgsl.expected.wgsl b/test/builtins/gen/select/fb7e53.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/select/fb7e53.wgsl.expected.wgsl
rename to test/builtins/gen/select/fb7e53.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sign/159665.wgsl b/test/builtins/gen/sign/159665.wgsl
new file mode 100644
index 0000000..adb28ab
--- /dev/null
+++ b/test/builtins/gen/sign/159665.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sign(vec<3, f32>) -> vec<3, f32>
+fn sign_159665() {
+  var res: vec3<f32> = sign(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_159665();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sign_159665();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sign_159665();
+}
diff --git a/test/intrinsics/gen/sign/159665.wgsl.expected.glsl b/test/builtins/gen/sign/159665.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sign/159665.wgsl.expected.glsl
rename to test/builtins/gen/sign/159665.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sign/159665.wgsl.expected.hlsl b/test/builtins/gen/sign/159665.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sign/159665.wgsl.expected.hlsl
rename to test/builtins/gen/sign/159665.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sign/159665.wgsl.expected.msl b/test/builtins/gen/sign/159665.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sign/159665.wgsl.expected.msl
rename to test/builtins/gen/sign/159665.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sign/159665.wgsl.expected.spvasm b/test/builtins/gen/sign/159665.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sign/159665.wgsl.expected.spvasm
rename to test/builtins/gen/sign/159665.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sign/159665.wgsl.expected.wgsl b/test/builtins/gen/sign/159665.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sign/159665.wgsl.expected.wgsl
rename to test/builtins/gen/sign/159665.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sign/b8f634.wgsl b/test/builtins/gen/sign/b8f634.wgsl
new file mode 100644
index 0000000..e308a0b
--- /dev/null
+++ b/test/builtins/gen/sign/b8f634.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sign(vec<4, f32>) -> vec<4, f32>
+fn sign_b8f634() {
+  var res: vec4<f32> = sign(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_b8f634();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sign_b8f634();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sign_b8f634();
+}
diff --git a/test/intrinsics/gen/sign/b8f634.wgsl.expected.glsl b/test/builtins/gen/sign/b8f634.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sign/b8f634.wgsl.expected.glsl
rename to test/builtins/gen/sign/b8f634.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sign/b8f634.wgsl.expected.hlsl b/test/builtins/gen/sign/b8f634.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sign/b8f634.wgsl.expected.hlsl
rename to test/builtins/gen/sign/b8f634.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sign/b8f634.wgsl.expected.msl b/test/builtins/gen/sign/b8f634.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sign/b8f634.wgsl.expected.msl
rename to test/builtins/gen/sign/b8f634.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sign/b8f634.wgsl.expected.spvasm b/test/builtins/gen/sign/b8f634.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sign/b8f634.wgsl.expected.spvasm
rename to test/builtins/gen/sign/b8f634.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sign/b8f634.wgsl.expected.wgsl b/test/builtins/gen/sign/b8f634.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sign/b8f634.wgsl.expected.wgsl
rename to test/builtins/gen/sign/b8f634.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sign/d065d8.wgsl b/test/builtins/gen/sign/d065d8.wgsl
new file mode 100644
index 0000000..4efd33f
--- /dev/null
+++ b/test/builtins/gen/sign/d065d8.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sign(vec<2, f32>) -> vec<2, f32>
+fn sign_d065d8() {
+  var res: vec2<f32> = sign(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_d065d8();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sign_d065d8();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sign_d065d8();
+}
diff --git a/test/intrinsics/gen/sign/d065d8.wgsl.expected.glsl b/test/builtins/gen/sign/d065d8.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sign/d065d8.wgsl.expected.glsl
rename to test/builtins/gen/sign/d065d8.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sign/d065d8.wgsl.expected.hlsl b/test/builtins/gen/sign/d065d8.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sign/d065d8.wgsl.expected.hlsl
rename to test/builtins/gen/sign/d065d8.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sign/d065d8.wgsl.expected.msl b/test/builtins/gen/sign/d065d8.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sign/d065d8.wgsl.expected.msl
rename to test/builtins/gen/sign/d065d8.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sign/d065d8.wgsl.expected.spvasm b/test/builtins/gen/sign/d065d8.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sign/d065d8.wgsl.expected.spvasm
rename to test/builtins/gen/sign/d065d8.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sign/d065d8.wgsl.expected.wgsl b/test/builtins/gen/sign/d065d8.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sign/d065d8.wgsl.expected.wgsl
rename to test/builtins/gen/sign/d065d8.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sign/dd790e.wgsl b/test/builtins/gen/sign/dd790e.wgsl
new file mode 100644
index 0000000..6a065f3
--- /dev/null
+++ b/test/builtins/gen/sign/dd790e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sign(f32) -> f32
+fn sign_dd790e() {
+  var res: f32 = sign(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_dd790e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sign_dd790e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sign_dd790e();
+}
diff --git a/test/intrinsics/gen/sign/dd790e.wgsl.expected.glsl b/test/builtins/gen/sign/dd790e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sign/dd790e.wgsl.expected.glsl
rename to test/builtins/gen/sign/dd790e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sign/dd790e.wgsl.expected.hlsl b/test/builtins/gen/sign/dd790e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sign/dd790e.wgsl.expected.hlsl
rename to test/builtins/gen/sign/dd790e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sign/dd790e.wgsl.expected.msl b/test/builtins/gen/sign/dd790e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sign/dd790e.wgsl.expected.msl
rename to test/builtins/gen/sign/dd790e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sign/dd790e.wgsl.expected.spvasm b/test/builtins/gen/sign/dd790e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sign/dd790e.wgsl.expected.spvasm
rename to test/builtins/gen/sign/dd790e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sign/dd790e.wgsl.expected.wgsl b/test/builtins/gen/sign/dd790e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sign/dd790e.wgsl.expected.wgsl
rename to test/builtins/gen/sign/dd790e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sin/01f241.wgsl b/test/builtins/gen/sin/01f241.wgsl
new file mode 100644
index 0000000..4d78c4a
--- /dev/null
+++ b/test/builtins/gen/sin/01f241.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sin(vec<3, f32>) -> vec<3, f32>
+fn sin_01f241() {
+  var res: vec3<f32> = sin(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_01f241();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sin_01f241();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sin_01f241();
+}
diff --git a/test/intrinsics/gen/sin/01f241.wgsl.expected.glsl b/test/builtins/gen/sin/01f241.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sin/01f241.wgsl.expected.glsl
rename to test/builtins/gen/sin/01f241.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sin/01f241.wgsl.expected.hlsl b/test/builtins/gen/sin/01f241.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sin/01f241.wgsl.expected.hlsl
rename to test/builtins/gen/sin/01f241.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sin/01f241.wgsl.expected.msl b/test/builtins/gen/sin/01f241.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sin/01f241.wgsl.expected.msl
rename to test/builtins/gen/sin/01f241.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sin/01f241.wgsl.expected.spvasm b/test/builtins/gen/sin/01f241.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sin/01f241.wgsl.expected.spvasm
rename to test/builtins/gen/sin/01f241.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sin/01f241.wgsl.expected.wgsl b/test/builtins/gen/sin/01f241.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sin/01f241.wgsl.expected.wgsl
rename to test/builtins/gen/sin/01f241.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sin/4e3979.wgsl b/test/builtins/gen/sin/4e3979.wgsl
new file mode 100644
index 0000000..4bfeed5
--- /dev/null
+++ b/test/builtins/gen/sin/4e3979.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sin(vec<4, f32>) -> vec<4, f32>
+fn sin_4e3979() {
+  var res: vec4<f32> = sin(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_4e3979();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sin_4e3979();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sin_4e3979();
+}
diff --git a/test/intrinsics/gen/sin/4e3979.wgsl.expected.glsl b/test/builtins/gen/sin/4e3979.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sin/4e3979.wgsl.expected.glsl
rename to test/builtins/gen/sin/4e3979.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sin/4e3979.wgsl.expected.hlsl b/test/builtins/gen/sin/4e3979.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sin/4e3979.wgsl.expected.hlsl
rename to test/builtins/gen/sin/4e3979.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sin/4e3979.wgsl.expected.msl b/test/builtins/gen/sin/4e3979.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sin/4e3979.wgsl.expected.msl
rename to test/builtins/gen/sin/4e3979.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sin/4e3979.wgsl.expected.spvasm b/test/builtins/gen/sin/4e3979.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sin/4e3979.wgsl.expected.spvasm
rename to test/builtins/gen/sin/4e3979.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sin/4e3979.wgsl.expected.wgsl b/test/builtins/gen/sin/4e3979.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sin/4e3979.wgsl.expected.wgsl
rename to test/builtins/gen/sin/4e3979.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sin/b78c91.wgsl b/test/builtins/gen/sin/b78c91.wgsl
new file mode 100644
index 0000000..83d02dd
--- /dev/null
+++ b/test/builtins/gen/sin/b78c91.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sin(f32) -> f32
+fn sin_b78c91() {
+  var res: f32 = sin(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_b78c91();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sin_b78c91();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sin_b78c91();
+}
diff --git a/test/intrinsics/gen/sin/b78c91.wgsl.expected.glsl b/test/builtins/gen/sin/b78c91.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sin/b78c91.wgsl.expected.glsl
rename to test/builtins/gen/sin/b78c91.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sin/b78c91.wgsl.expected.hlsl b/test/builtins/gen/sin/b78c91.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sin/b78c91.wgsl.expected.hlsl
rename to test/builtins/gen/sin/b78c91.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sin/b78c91.wgsl.expected.msl b/test/builtins/gen/sin/b78c91.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sin/b78c91.wgsl.expected.msl
rename to test/builtins/gen/sin/b78c91.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sin/b78c91.wgsl.expected.spvasm b/test/builtins/gen/sin/b78c91.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sin/b78c91.wgsl.expected.spvasm
rename to test/builtins/gen/sin/b78c91.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sin/b78c91.wgsl.expected.wgsl b/test/builtins/gen/sin/b78c91.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sin/b78c91.wgsl.expected.wgsl
rename to test/builtins/gen/sin/b78c91.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sin/fc8bc4.wgsl b/test/builtins/gen/sin/fc8bc4.wgsl
new file mode 100644
index 0000000..154c7d0
--- /dev/null
+++ b/test/builtins/gen/sin/fc8bc4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sin(vec<2, f32>) -> vec<2, f32>
+fn sin_fc8bc4() {
+  var res: vec2<f32> = sin(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_fc8bc4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sin_fc8bc4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sin_fc8bc4();
+}
diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.glsl b/test/builtins/gen/sin/fc8bc4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sin/fc8bc4.wgsl.expected.glsl
rename to test/builtins/gen/sin/fc8bc4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.hlsl b/test/builtins/gen/sin/fc8bc4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sin/fc8bc4.wgsl.expected.hlsl
rename to test/builtins/gen/sin/fc8bc4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.msl b/test/builtins/gen/sin/fc8bc4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sin/fc8bc4.wgsl.expected.msl
rename to test/builtins/gen/sin/fc8bc4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.spvasm b/test/builtins/gen/sin/fc8bc4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sin/fc8bc4.wgsl.expected.spvasm
rename to test/builtins/gen/sin/fc8bc4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.wgsl b/test/builtins/gen/sin/fc8bc4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sin/fc8bc4.wgsl.expected.wgsl
rename to test/builtins/gen/sin/fc8bc4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sinh/445e33.wgsl b/test/builtins/gen/sinh/445e33.wgsl
new file mode 100644
index 0000000..21c0c8f
--- /dev/null
+++ b/test/builtins/gen/sinh/445e33.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sinh(vec<4, f32>) -> vec<4, f32>
+fn sinh_445e33() {
+  var res: vec4<f32> = sinh(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_445e33();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sinh_445e33();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sinh_445e33();
+}
diff --git a/test/intrinsics/gen/sinh/445e33.wgsl.expected.glsl b/test/builtins/gen/sinh/445e33.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sinh/445e33.wgsl.expected.glsl
rename to test/builtins/gen/sinh/445e33.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sinh/445e33.wgsl.expected.hlsl b/test/builtins/gen/sinh/445e33.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sinh/445e33.wgsl.expected.hlsl
rename to test/builtins/gen/sinh/445e33.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sinh/445e33.wgsl.expected.msl b/test/builtins/gen/sinh/445e33.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sinh/445e33.wgsl.expected.msl
rename to test/builtins/gen/sinh/445e33.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sinh/445e33.wgsl.expected.spvasm b/test/builtins/gen/sinh/445e33.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sinh/445e33.wgsl.expected.spvasm
rename to test/builtins/gen/sinh/445e33.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sinh/445e33.wgsl.expected.wgsl b/test/builtins/gen/sinh/445e33.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sinh/445e33.wgsl.expected.wgsl
rename to test/builtins/gen/sinh/445e33.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sinh/7bb598.wgsl b/test/builtins/gen/sinh/7bb598.wgsl
new file mode 100644
index 0000000..b0dc762
--- /dev/null
+++ b/test/builtins/gen/sinh/7bb598.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sinh(f32) -> f32
+fn sinh_7bb598() {
+  var res: f32 = sinh(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_7bb598();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sinh_7bb598();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sinh_7bb598();
+}
diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.glsl b/test/builtins/gen/sinh/7bb598.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sinh/7bb598.wgsl.expected.glsl
rename to test/builtins/gen/sinh/7bb598.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.hlsl b/test/builtins/gen/sinh/7bb598.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sinh/7bb598.wgsl.expected.hlsl
rename to test/builtins/gen/sinh/7bb598.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.msl b/test/builtins/gen/sinh/7bb598.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sinh/7bb598.wgsl.expected.msl
rename to test/builtins/gen/sinh/7bb598.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.spvasm b/test/builtins/gen/sinh/7bb598.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sinh/7bb598.wgsl.expected.spvasm
rename to test/builtins/gen/sinh/7bb598.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.wgsl b/test/builtins/gen/sinh/7bb598.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sinh/7bb598.wgsl.expected.wgsl
rename to test/builtins/gen/sinh/7bb598.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sinh/b9860e.wgsl b/test/builtins/gen/sinh/b9860e.wgsl
new file mode 100644
index 0000000..11bf85b
--- /dev/null
+++ b/test/builtins/gen/sinh/b9860e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sinh(vec<2, f32>) -> vec<2, f32>
+fn sinh_b9860e() {
+  var res: vec2<f32> = sinh(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_b9860e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sinh_b9860e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sinh_b9860e();
+}
diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.glsl b/test/builtins/gen/sinh/b9860e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sinh/b9860e.wgsl.expected.glsl
rename to test/builtins/gen/sinh/b9860e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.hlsl b/test/builtins/gen/sinh/b9860e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sinh/b9860e.wgsl.expected.hlsl
rename to test/builtins/gen/sinh/b9860e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.msl b/test/builtins/gen/sinh/b9860e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sinh/b9860e.wgsl.expected.msl
rename to test/builtins/gen/sinh/b9860e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.spvasm b/test/builtins/gen/sinh/b9860e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sinh/b9860e.wgsl.expected.spvasm
rename to test/builtins/gen/sinh/b9860e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.wgsl b/test/builtins/gen/sinh/b9860e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sinh/b9860e.wgsl.expected.wgsl
rename to test/builtins/gen/sinh/b9860e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sinh/c9a5eb.wgsl b/test/builtins/gen/sinh/c9a5eb.wgsl
new file mode 100644
index 0000000..ada4792
--- /dev/null
+++ b/test/builtins/gen/sinh/c9a5eb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sinh(vec<3, f32>) -> vec<3, f32>
+fn sinh_c9a5eb() {
+  var res: vec3<f32> = sinh(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_c9a5eb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sinh_c9a5eb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sinh_c9a5eb();
+}
diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.glsl b/test/builtins/gen/sinh/c9a5eb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.glsl
rename to test/builtins/gen/sinh/c9a5eb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.hlsl b/test/builtins/gen/sinh/c9a5eb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.hlsl
rename to test/builtins/gen/sinh/c9a5eb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.msl b/test/builtins/gen/sinh/c9a5eb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.msl
rename to test/builtins/gen/sinh/c9a5eb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.spvasm b/test/builtins/gen/sinh/c9a5eb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.spvasm
rename to test/builtins/gen/sinh/c9a5eb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.wgsl b/test/builtins/gen/sinh/c9a5eb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.wgsl
rename to test/builtins/gen/sinh/c9a5eb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/smoothStep/5f615b.wgsl b/test/builtins/gen/smoothStep/5f615b.wgsl
new file mode 100644
index 0000000..2a74908
--- /dev/null
+++ b/test/builtins/gen/smoothStep/5f615b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn smoothStep(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn smoothStep_5f615b() {
+  var res: vec4<f32> = smoothStep(vec4<f32>(), vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothStep_5f615b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  smoothStep_5f615b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  smoothStep_5f615b();
+}
diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.glsl b/test/builtins/gen/smoothStep/5f615b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.glsl
rename to test/builtins/gen/smoothStep/5f615b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.hlsl b/test/builtins/gen/smoothStep/5f615b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.hlsl
rename to test/builtins/gen/smoothStep/5f615b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.msl b/test/builtins/gen/smoothStep/5f615b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.msl
rename to test/builtins/gen/smoothStep/5f615b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.spvasm b/test/builtins/gen/smoothStep/5f615b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.spvasm
rename to test/builtins/gen/smoothStep/5f615b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.wgsl b/test/builtins/gen/smoothStep/5f615b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.wgsl
rename to test/builtins/gen/smoothStep/5f615b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/smoothStep/658be3.wgsl b/test/builtins/gen/smoothStep/658be3.wgsl
new file mode 100644
index 0000000..65f4011
--- /dev/null
+++ b/test/builtins/gen/smoothStep/658be3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn smoothStep(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn smoothStep_658be3() {
+  var res: vec3<f32> = smoothStep(vec3<f32>(), vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothStep_658be3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  smoothStep_658be3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  smoothStep_658be3();
+}
diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.glsl b/test/builtins/gen/smoothStep/658be3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/658be3.wgsl.expected.glsl
rename to test/builtins/gen/smoothStep/658be3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.hlsl b/test/builtins/gen/smoothStep/658be3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/658be3.wgsl.expected.hlsl
rename to test/builtins/gen/smoothStep/658be3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.msl b/test/builtins/gen/smoothStep/658be3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/658be3.wgsl.expected.msl
rename to test/builtins/gen/smoothStep/658be3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.spvasm b/test/builtins/gen/smoothStep/658be3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/smoothStep/658be3.wgsl.expected.spvasm
rename to test/builtins/gen/smoothStep/658be3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.wgsl b/test/builtins/gen/smoothStep/658be3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/658be3.wgsl.expected.wgsl
rename to test/builtins/gen/smoothStep/658be3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/smoothStep/c11eef.wgsl b/test/builtins/gen/smoothStep/c11eef.wgsl
new file mode 100644
index 0000000..3953e37
--- /dev/null
+++ b/test/builtins/gen/smoothStep/c11eef.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn smoothStep(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn smoothStep_c11eef() {
+  var res: vec2<f32> = smoothStep(vec2<f32>(), vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothStep_c11eef();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  smoothStep_c11eef();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  smoothStep_c11eef();
+}
diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.glsl b/test/builtins/gen/smoothStep/c11eef.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.glsl
rename to test/builtins/gen/smoothStep/c11eef.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.hlsl b/test/builtins/gen/smoothStep/c11eef.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.hlsl
rename to test/builtins/gen/smoothStep/c11eef.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.msl b/test/builtins/gen/smoothStep/c11eef.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.msl
rename to test/builtins/gen/smoothStep/c11eef.wgsl.expected.msl
diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.spvasm b/test/builtins/gen/smoothStep/c11eef.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.spvasm
rename to test/builtins/gen/smoothStep/c11eef.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.wgsl b/test/builtins/gen/smoothStep/c11eef.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.wgsl
rename to test/builtins/gen/smoothStep/c11eef.wgsl.expected.wgsl
diff --git a/test/builtins/gen/smoothStep/cb0bfb.wgsl b/test/builtins/gen/smoothStep/cb0bfb.wgsl
new file mode 100644
index 0000000..ff81a88
--- /dev/null
+++ b/test/builtins/gen/smoothStep/cb0bfb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn smoothStep(f32, f32, f32) -> f32
+fn smoothStep_cb0bfb() {
+  var res: f32 = smoothStep(1.0, 1.0, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothStep_cb0bfb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  smoothStep_cb0bfb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  smoothStep_cb0bfb();
+}
diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.glsl b/test/builtins/gen/smoothStep/cb0bfb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.glsl
rename to test/builtins/gen/smoothStep/cb0bfb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.hlsl b/test/builtins/gen/smoothStep/cb0bfb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.hlsl
rename to test/builtins/gen/smoothStep/cb0bfb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.msl b/test/builtins/gen/smoothStep/cb0bfb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.msl
rename to test/builtins/gen/smoothStep/cb0bfb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.spvasm b/test/builtins/gen/smoothStep/cb0bfb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.spvasm
rename to test/builtins/gen/smoothStep/cb0bfb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.wgsl b/test/builtins/gen/smoothStep/cb0bfb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.wgsl
rename to test/builtins/gen/smoothStep/cb0bfb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sqrt/20c74e.wgsl b/test/builtins/gen/sqrt/20c74e.wgsl
new file mode 100644
index 0000000..b4ce20f
--- /dev/null
+++ b/test/builtins/gen/sqrt/20c74e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sqrt(f32) -> f32
+fn sqrt_20c74e() {
+  var res: f32 = sqrt(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_20c74e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sqrt_20c74e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sqrt_20c74e();
+}
diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.glsl b/test/builtins/gen/sqrt/20c74e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/20c74e.wgsl.expected.glsl
rename to test/builtins/gen/sqrt/20c74e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.hlsl b/test/builtins/gen/sqrt/20c74e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/20c74e.wgsl.expected.hlsl
rename to test/builtins/gen/sqrt/20c74e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.msl b/test/builtins/gen/sqrt/20c74e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sqrt/20c74e.wgsl.expected.msl
rename to test/builtins/gen/sqrt/20c74e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.spvasm b/test/builtins/gen/sqrt/20c74e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sqrt/20c74e.wgsl.expected.spvasm
rename to test/builtins/gen/sqrt/20c74e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.wgsl b/test/builtins/gen/sqrt/20c74e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/20c74e.wgsl.expected.wgsl
rename to test/builtins/gen/sqrt/20c74e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sqrt/8c7024.wgsl b/test/builtins/gen/sqrt/8c7024.wgsl
new file mode 100644
index 0000000..96bea10
--- /dev/null
+++ b/test/builtins/gen/sqrt/8c7024.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sqrt(vec<2, f32>) -> vec<2, f32>
+fn sqrt_8c7024() {
+  var res: vec2<f32> = sqrt(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_8c7024();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sqrt_8c7024();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sqrt_8c7024();
+}
diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.glsl b/test/builtins/gen/sqrt/8c7024.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/8c7024.wgsl.expected.glsl
rename to test/builtins/gen/sqrt/8c7024.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.hlsl b/test/builtins/gen/sqrt/8c7024.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/8c7024.wgsl.expected.hlsl
rename to test/builtins/gen/sqrt/8c7024.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.msl b/test/builtins/gen/sqrt/8c7024.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sqrt/8c7024.wgsl.expected.msl
rename to test/builtins/gen/sqrt/8c7024.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.spvasm b/test/builtins/gen/sqrt/8c7024.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sqrt/8c7024.wgsl.expected.spvasm
rename to test/builtins/gen/sqrt/8c7024.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.wgsl b/test/builtins/gen/sqrt/8c7024.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/8c7024.wgsl.expected.wgsl
rename to test/builtins/gen/sqrt/8c7024.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sqrt/aa0d7a.wgsl b/test/builtins/gen/sqrt/aa0d7a.wgsl
new file mode 100644
index 0000000..4848c54
--- /dev/null
+++ b/test/builtins/gen/sqrt/aa0d7a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sqrt(vec<4, f32>) -> vec<4, f32>
+fn sqrt_aa0d7a() {
+  var res: vec4<f32> = sqrt(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_aa0d7a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sqrt_aa0d7a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sqrt_aa0d7a();
+}
diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.glsl b/test/builtins/gen/sqrt/aa0d7a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.glsl
rename to test/builtins/gen/sqrt/aa0d7a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.hlsl b/test/builtins/gen/sqrt/aa0d7a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.hlsl
rename to test/builtins/gen/sqrt/aa0d7a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.msl b/test/builtins/gen/sqrt/aa0d7a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.msl
rename to test/builtins/gen/sqrt/aa0d7a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.spvasm b/test/builtins/gen/sqrt/aa0d7a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.spvasm
rename to test/builtins/gen/sqrt/aa0d7a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.wgsl b/test/builtins/gen/sqrt/aa0d7a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.wgsl
rename to test/builtins/gen/sqrt/aa0d7a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/sqrt/f8c59a.wgsl b/test/builtins/gen/sqrt/f8c59a.wgsl
new file mode 100644
index 0000000..b4aeefd
--- /dev/null
+++ b/test/builtins/gen/sqrt/f8c59a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn sqrt(vec<3, f32>) -> vec<3, f32>
+fn sqrt_f8c59a() {
+  var res: vec3<f32> = sqrt(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_f8c59a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  sqrt_f8c59a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  sqrt_f8c59a();
+}
diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.glsl b/test/builtins/gen/sqrt/f8c59a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.glsl
rename to test/builtins/gen/sqrt/f8c59a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.hlsl b/test/builtins/gen/sqrt/f8c59a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.hlsl
rename to test/builtins/gen/sqrt/f8c59a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.msl b/test/builtins/gen/sqrt/f8c59a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.msl
rename to test/builtins/gen/sqrt/f8c59a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.spvasm b/test/builtins/gen/sqrt/f8c59a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.spvasm
rename to test/builtins/gen/sqrt/f8c59a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.wgsl b/test/builtins/gen/sqrt/f8c59a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.wgsl
rename to test/builtins/gen/sqrt/f8c59a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/step/0b073b.wgsl b/test/builtins/gen/step/0b073b.wgsl
new file mode 100644
index 0000000..f1006d6
--- /dev/null
+++ b/test/builtins/gen/step/0b073b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn step(f32, f32) -> f32
+fn step_0b073b() {
+  var res: f32 = step(1.0, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_0b073b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  step_0b073b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  step_0b073b();
+}
diff --git a/test/intrinsics/gen/step/0b073b.wgsl.expected.glsl b/test/builtins/gen/step/0b073b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/step/0b073b.wgsl.expected.glsl
rename to test/builtins/gen/step/0b073b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/step/0b073b.wgsl.expected.hlsl b/test/builtins/gen/step/0b073b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/step/0b073b.wgsl.expected.hlsl
rename to test/builtins/gen/step/0b073b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/step/0b073b.wgsl.expected.msl b/test/builtins/gen/step/0b073b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/step/0b073b.wgsl.expected.msl
rename to test/builtins/gen/step/0b073b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/step/0b073b.wgsl.expected.spvasm b/test/builtins/gen/step/0b073b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/step/0b073b.wgsl.expected.spvasm
rename to test/builtins/gen/step/0b073b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/step/0b073b.wgsl.expected.wgsl b/test/builtins/gen/step/0b073b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/step/0b073b.wgsl.expected.wgsl
rename to test/builtins/gen/step/0b073b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/step/19accd.wgsl b/test/builtins/gen/step/19accd.wgsl
new file mode 100644
index 0000000..5e6276d
--- /dev/null
+++ b/test/builtins/gen/step/19accd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn step(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
+fn step_19accd() {
+  var res: vec2<f32> = step(vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_19accd();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  step_19accd();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  step_19accd();
+}
diff --git a/test/intrinsics/gen/step/19accd.wgsl.expected.glsl b/test/builtins/gen/step/19accd.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/step/19accd.wgsl.expected.glsl
rename to test/builtins/gen/step/19accd.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/step/19accd.wgsl.expected.hlsl b/test/builtins/gen/step/19accd.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/step/19accd.wgsl.expected.hlsl
rename to test/builtins/gen/step/19accd.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/step/19accd.wgsl.expected.msl b/test/builtins/gen/step/19accd.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/step/19accd.wgsl.expected.msl
rename to test/builtins/gen/step/19accd.wgsl.expected.msl
diff --git a/test/intrinsics/gen/step/19accd.wgsl.expected.spvasm b/test/builtins/gen/step/19accd.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/step/19accd.wgsl.expected.spvasm
rename to test/builtins/gen/step/19accd.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/step/19accd.wgsl.expected.wgsl b/test/builtins/gen/step/19accd.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/step/19accd.wgsl.expected.wgsl
rename to test/builtins/gen/step/19accd.wgsl.expected.wgsl
diff --git a/test/builtins/gen/step/334303.wgsl b/test/builtins/gen/step/334303.wgsl
new file mode 100644
index 0000000..3b53ace
--- /dev/null
+++ b/test/builtins/gen/step/334303.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn step(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
+fn step_334303() {
+  var res: vec3<f32> = step(vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_334303();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  step_334303();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  step_334303();
+}
diff --git a/test/intrinsics/gen/step/334303.wgsl.expected.glsl b/test/builtins/gen/step/334303.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/step/334303.wgsl.expected.glsl
rename to test/builtins/gen/step/334303.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/step/334303.wgsl.expected.hlsl b/test/builtins/gen/step/334303.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/step/334303.wgsl.expected.hlsl
rename to test/builtins/gen/step/334303.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/step/334303.wgsl.expected.msl b/test/builtins/gen/step/334303.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/step/334303.wgsl.expected.msl
rename to test/builtins/gen/step/334303.wgsl.expected.msl
diff --git a/test/intrinsics/gen/step/334303.wgsl.expected.spvasm b/test/builtins/gen/step/334303.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/step/334303.wgsl.expected.spvasm
rename to test/builtins/gen/step/334303.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/step/334303.wgsl.expected.wgsl b/test/builtins/gen/step/334303.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/step/334303.wgsl.expected.wgsl
rename to test/builtins/gen/step/334303.wgsl.expected.wgsl
diff --git a/test/builtins/gen/step/e2b337.wgsl b/test/builtins/gen/step/e2b337.wgsl
new file mode 100644
index 0000000..bf13f3c
--- /dev/null
+++ b/test/builtins/gen/step/e2b337.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn step(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
+fn step_e2b337() {
+  var res: vec4<f32> = step(vec4<f32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_e2b337();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  step_e2b337();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  step_e2b337();
+}
diff --git a/test/intrinsics/gen/step/e2b337.wgsl.expected.glsl b/test/builtins/gen/step/e2b337.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/step/e2b337.wgsl.expected.glsl
rename to test/builtins/gen/step/e2b337.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/step/e2b337.wgsl.expected.hlsl b/test/builtins/gen/step/e2b337.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/step/e2b337.wgsl.expected.hlsl
rename to test/builtins/gen/step/e2b337.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/step/e2b337.wgsl.expected.msl b/test/builtins/gen/step/e2b337.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/step/e2b337.wgsl.expected.msl
rename to test/builtins/gen/step/e2b337.wgsl.expected.msl
diff --git a/test/intrinsics/gen/step/e2b337.wgsl.expected.spvasm b/test/builtins/gen/step/e2b337.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/step/e2b337.wgsl.expected.spvasm
rename to test/builtins/gen/step/e2b337.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/step/e2b337.wgsl.expected.wgsl b/test/builtins/gen/step/e2b337.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/step/e2b337.wgsl.expected.wgsl
rename to test/builtins/gen/step/e2b337.wgsl.expected.wgsl
diff --git a/test/builtins/gen/storageBarrier/d87211.wgsl b/test/builtins/gen/storageBarrier/d87211.wgsl
new file mode 100644
index 0000000..2620443
--- /dev/null
+++ b/test/builtins/gen/storageBarrier/d87211.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn storageBarrier()
+fn storageBarrier_d87211() {
+  storageBarrier();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  storageBarrier_d87211();
+}
diff --git a/test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.glsl b/test/builtins/gen/storageBarrier/d87211.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.glsl
rename to test/builtins/gen/storageBarrier/d87211.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.hlsl b/test/builtins/gen/storageBarrier/d87211.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.hlsl
rename to test/builtins/gen/storageBarrier/d87211.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.msl b/test/builtins/gen/storageBarrier/d87211.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.msl
rename to test/builtins/gen/storageBarrier/d87211.wgsl.expected.msl
diff --git a/test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.spvasm b/test/builtins/gen/storageBarrier/d87211.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.spvasm
rename to test/builtins/gen/storageBarrier/d87211.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.wgsl b/test/builtins/gen/storageBarrier/d87211.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.wgsl
rename to test/builtins/gen/storageBarrier/d87211.wgsl.expected.wgsl
diff --git a/test/builtins/gen/tan/244e2a.wgsl b/test/builtins/gen/tan/244e2a.wgsl
new file mode 100644
index 0000000..24eed7b
--- /dev/null
+++ b/test/builtins/gen/tan/244e2a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn tan(vec<4, f32>) -> vec<4, f32>
+fn tan_244e2a() {
+  var res: vec4<f32> = tan(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_244e2a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  tan_244e2a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  tan_244e2a();
+}
diff --git a/test/intrinsics/gen/tan/244e2a.wgsl.expected.glsl b/test/builtins/gen/tan/244e2a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/tan/244e2a.wgsl.expected.glsl
rename to test/builtins/gen/tan/244e2a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/tan/244e2a.wgsl.expected.hlsl b/test/builtins/gen/tan/244e2a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/tan/244e2a.wgsl.expected.hlsl
rename to test/builtins/gen/tan/244e2a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/tan/244e2a.wgsl.expected.msl b/test/builtins/gen/tan/244e2a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/tan/244e2a.wgsl.expected.msl
rename to test/builtins/gen/tan/244e2a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/tan/244e2a.wgsl.expected.spvasm b/test/builtins/gen/tan/244e2a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/tan/244e2a.wgsl.expected.spvasm
rename to test/builtins/gen/tan/244e2a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/tan/244e2a.wgsl.expected.wgsl b/test/builtins/gen/tan/244e2a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/tan/244e2a.wgsl.expected.wgsl
rename to test/builtins/gen/tan/244e2a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/tan/2f030e.wgsl b/test/builtins/gen/tan/2f030e.wgsl
new file mode 100644
index 0000000..cb7ecc9
--- /dev/null
+++ b/test/builtins/gen/tan/2f030e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn tan(f32) -> f32
+fn tan_2f030e() {
+  var res: f32 = tan(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_2f030e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  tan_2f030e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  tan_2f030e();
+}
diff --git a/test/intrinsics/gen/tan/2f030e.wgsl.expected.glsl b/test/builtins/gen/tan/2f030e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/tan/2f030e.wgsl.expected.glsl
rename to test/builtins/gen/tan/2f030e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/tan/2f030e.wgsl.expected.hlsl b/test/builtins/gen/tan/2f030e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/tan/2f030e.wgsl.expected.hlsl
rename to test/builtins/gen/tan/2f030e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/tan/2f030e.wgsl.expected.msl b/test/builtins/gen/tan/2f030e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/tan/2f030e.wgsl.expected.msl
rename to test/builtins/gen/tan/2f030e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/tan/2f030e.wgsl.expected.spvasm b/test/builtins/gen/tan/2f030e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/tan/2f030e.wgsl.expected.spvasm
rename to test/builtins/gen/tan/2f030e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/tan/2f030e.wgsl.expected.wgsl b/test/builtins/gen/tan/2f030e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/tan/2f030e.wgsl.expected.wgsl
rename to test/builtins/gen/tan/2f030e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/tan/7ea104.wgsl b/test/builtins/gen/tan/7ea104.wgsl
new file mode 100644
index 0000000..caf5f99
--- /dev/null
+++ b/test/builtins/gen/tan/7ea104.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn tan(vec<3, f32>) -> vec<3, f32>
+fn tan_7ea104() {
+  var res: vec3<f32> = tan(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_7ea104();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  tan_7ea104();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  tan_7ea104();
+}
diff --git a/test/intrinsics/gen/tan/7ea104.wgsl.expected.glsl b/test/builtins/gen/tan/7ea104.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/tan/7ea104.wgsl.expected.glsl
rename to test/builtins/gen/tan/7ea104.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/tan/7ea104.wgsl.expected.hlsl b/test/builtins/gen/tan/7ea104.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/tan/7ea104.wgsl.expected.hlsl
rename to test/builtins/gen/tan/7ea104.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/tan/7ea104.wgsl.expected.msl b/test/builtins/gen/tan/7ea104.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/tan/7ea104.wgsl.expected.msl
rename to test/builtins/gen/tan/7ea104.wgsl.expected.msl
diff --git a/test/intrinsics/gen/tan/7ea104.wgsl.expected.spvasm b/test/builtins/gen/tan/7ea104.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/tan/7ea104.wgsl.expected.spvasm
rename to test/builtins/gen/tan/7ea104.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/tan/7ea104.wgsl.expected.wgsl b/test/builtins/gen/tan/7ea104.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/tan/7ea104.wgsl.expected.wgsl
rename to test/builtins/gen/tan/7ea104.wgsl.expected.wgsl
diff --git a/test/builtins/gen/tan/8ce3e9.wgsl b/test/builtins/gen/tan/8ce3e9.wgsl
new file mode 100644
index 0000000..d4a3663
--- /dev/null
+++ b/test/builtins/gen/tan/8ce3e9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn tan(vec<2, f32>) -> vec<2, f32>
+fn tan_8ce3e9() {
+  var res: vec2<f32> = tan(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_8ce3e9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  tan_8ce3e9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  tan_8ce3e9();
+}
diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.glsl b/test/builtins/gen/tan/8ce3e9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/tan/8ce3e9.wgsl.expected.glsl
rename to test/builtins/gen/tan/8ce3e9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.hlsl b/test/builtins/gen/tan/8ce3e9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/tan/8ce3e9.wgsl.expected.hlsl
rename to test/builtins/gen/tan/8ce3e9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.msl b/test/builtins/gen/tan/8ce3e9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/tan/8ce3e9.wgsl.expected.msl
rename to test/builtins/gen/tan/8ce3e9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.spvasm b/test/builtins/gen/tan/8ce3e9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/tan/8ce3e9.wgsl.expected.spvasm
rename to test/builtins/gen/tan/8ce3e9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.wgsl b/test/builtins/gen/tan/8ce3e9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/tan/8ce3e9.wgsl.expected.wgsl
rename to test/builtins/gen/tan/8ce3e9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/tanh/5663c5.wgsl b/test/builtins/gen/tanh/5663c5.wgsl
new file mode 100644
index 0000000..f752060
--- /dev/null
+++ b/test/builtins/gen/tanh/5663c5.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn tanh(vec<4, f32>) -> vec<4, f32>
+fn tanh_5663c5() {
+  var res: vec4<f32> = tanh(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_5663c5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  tanh_5663c5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  tanh_5663c5();
+}
diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.glsl b/test/builtins/gen/tanh/5663c5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/tanh/5663c5.wgsl.expected.glsl
rename to test/builtins/gen/tanh/5663c5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.hlsl b/test/builtins/gen/tanh/5663c5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/tanh/5663c5.wgsl.expected.hlsl
rename to test/builtins/gen/tanh/5663c5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.msl b/test/builtins/gen/tanh/5663c5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/tanh/5663c5.wgsl.expected.msl
rename to test/builtins/gen/tanh/5663c5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.spvasm b/test/builtins/gen/tanh/5663c5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/tanh/5663c5.wgsl.expected.spvasm
rename to test/builtins/gen/tanh/5663c5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.wgsl b/test/builtins/gen/tanh/5663c5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/tanh/5663c5.wgsl.expected.wgsl
rename to test/builtins/gen/tanh/5663c5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/tanh/5724b3.wgsl b/test/builtins/gen/tanh/5724b3.wgsl
new file mode 100644
index 0000000..95f5807
--- /dev/null
+++ b/test/builtins/gen/tanh/5724b3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn tanh(vec<2, f32>) -> vec<2, f32>
+fn tanh_5724b3() {
+  var res: vec2<f32> = tanh(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_5724b3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  tanh_5724b3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  tanh_5724b3();
+}
diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.glsl b/test/builtins/gen/tanh/5724b3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/tanh/5724b3.wgsl.expected.glsl
rename to test/builtins/gen/tanh/5724b3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.hlsl b/test/builtins/gen/tanh/5724b3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/tanh/5724b3.wgsl.expected.hlsl
rename to test/builtins/gen/tanh/5724b3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.msl b/test/builtins/gen/tanh/5724b3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/tanh/5724b3.wgsl.expected.msl
rename to test/builtins/gen/tanh/5724b3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.spvasm b/test/builtins/gen/tanh/5724b3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/tanh/5724b3.wgsl.expected.spvasm
rename to test/builtins/gen/tanh/5724b3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.wgsl b/test/builtins/gen/tanh/5724b3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/tanh/5724b3.wgsl.expected.wgsl
rename to test/builtins/gen/tanh/5724b3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/tanh/9f9fb9.wgsl b/test/builtins/gen/tanh/9f9fb9.wgsl
new file mode 100644
index 0000000..d8530dc
--- /dev/null
+++ b/test/builtins/gen/tanh/9f9fb9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn tanh(vec<3, f32>) -> vec<3, f32>
+fn tanh_9f9fb9() {
+  var res: vec3<f32> = tanh(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_9f9fb9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  tanh_9f9fb9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  tanh_9f9fb9();
+}
diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.glsl b/test/builtins/gen/tanh/9f9fb9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.glsl
rename to test/builtins/gen/tanh/9f9fb9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.hlsl b/test/builtins/gen/tanh/9f9fb9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.hlsl
rename to test/builtins/gen/tanh/9f9fb9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.msl b/test/builtins/gen/tanh/9f9fb9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.msl
rename to test/builtins/gen/tanh/9f9fb9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.spvasm b/test/builtins/gen/tanh/9f9fb9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.spvasm
rename to test/builtins/gen/tanh/9f9fb9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.wgsl b/test/builtins/gen/tanh/9f9fb9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.wgsl
rename to test/builtins/gen/tanh/9f9fb9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/tanh/c15fdb.wgsl b/test/builtins/gen/tanh/c15fdb.wgsl
new file mode 100644
index 0000000..e9b0c19
--- /dev/null
+++ b/test/builtins/gen/tanh/c15fdb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn tanh(f32) -> f32
+fn tanh_c15fdb() {
+  var res: f32 = tanh(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_c15fdb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  tanh_c15fdb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  tanh_c15fdb();
+}
diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.glsl b/test/builtins/gen/tanh/c15fdb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/tanh/c15fdb.wgsl.expected.glsl
rename to test/builtins/gen/tanh/c15fdb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.hlsl b/test/builtins/gen/tanh/c15fdb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/tanh/c15fdb.wgsl.expected.hlsl
rename to test/builtins/gen/tanh/c15fdb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.msl b/test/builtins/gen/tanh/c15fdb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/tanh/c15fdb.wgsl.expected.msl
rename to test/builtins/gen/tanh/c15fdb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.spvasm b/test/builtins/gen/tanh/c15fdb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/tanh/c15fdb.wgsl.expected.spvasm
rename to test/builtins/gen/tanh/c15fdb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.wgsl b/test/builtins/gen/tanh/c15fdb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/tanh/c15fdb.wgsl.expected.wgsl
rename to test/builtins/gen/tanh/c15fdb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/002b2a.wgsl b/test/builtins/gen/textureDimensions/002b2a.wgsl
new file mode 100644
index 0000000..abdf125
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/002b2a.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureDimensions(texture: texture_1d<f32>) -> i32
+fn textureDimensions_002b2a() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_002b2a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_002b2a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_002b2a();
+}
diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/002b2a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/002b2a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/002b2a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/002b2a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.msl b/test/builtins/gen/textureDimensions/002b2a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/002b2a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/002b2a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/002b2a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/002b2a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/002b2a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/012b82.wgsl b/test/builtins/gen/textureDimensions/012b82.wgsl
new file mode 100644
index 0000000..92bdad0
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/012b82.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<r32sint, write>) -> vec2<i32>
+fn textureDimensions_012b82() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_012b82();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_012b82();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_012b82();
+}
diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/012b82.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/012b82.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/012b82.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/012b82.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.msl b/test/builtins/gen/textureDimensions/012b82.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/012b82.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/012b82.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/012b82.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/012b82.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/012b82.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/08753d.wgsl b/test/builtins/gen/textureDimensions/08753d.wgsl
new file mode 100644
index 0000000..08e10f1
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/08753d.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba16sint, write>) -> i32
+fn textureDimensions_08753d() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_08753d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_08753d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_08753d();
+}
diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/08753d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/08753d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/08753d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/08753d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.msl b/test/builtins/gen/textureDimensions/08753d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/08753d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/08753d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/08753d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/08753d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/08753d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/0c4772.wgsl b/test/builtins/gen/textureDimensions/0c4772.wgsl
new file mode 100644
index 0000000..8e2fdc5
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/0c4772.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba16float, write>) -> vec3<i32>
+fn textureDimensions_0c4772() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0c4772();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_0c4772();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0c4772();
+}
diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/0c4772.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/0c4772.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/0c4772.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/0c4772.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.msl b/test/builtins/gen/textureDimensions/0c4772.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/0c4772.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/0c4772.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/0c4772.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/0c4772.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/0c4772.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/0cce40.wgsl b/test/builtins/gen/textureDimensions/0cce40.wgsl
new file mode 100644
index 0000000..f3718fc
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/0cce40.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<r32sint, write>) -> i32
+fn textureDimensions_0cce40() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0cce40();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_0cce40();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0cce40();
+}
diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/0cce40.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/0cce40.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/0cce40.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/0cce40.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.msl b/test/builtins/gen/textureDimensions/0cce40.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/0cce40.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/0cce40.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/0cce40.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/0cce40.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/0cce40.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/0cf2ff.wgsl b/test/builtins/gen/textureDimensions/0cf2ff.wgsl
new file mode 100644
index 0000000..2cd31ca
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/0cf2ff.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba16uint, write>) -> vec2<i32>
+fn textureDimensions_0cf2ff() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0cf2ff();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_0cf2ff();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0cf2ff();
+}
diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/0cf2ff.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/0cf2ff.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.msl b/test/builtins/gen/textureDimensions/0cf2ff.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/0cf2ff.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/0cf2ff.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/0cf2ff.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/0cf2ff.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/0cf2ff.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/0d8b7e.wgsl b/test/builtins/gen/textureDimensions/0d8b7e.wgsl
new file mode 100644
index 0000000..c287d5c
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/0d8b7e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<r32uint, write>) -> vec2<i32>
+fn textureDimensions_0d8b7e() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0d8b7e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_0d8b7e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0d8b7e();
+}
diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/0d8b7e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/0d8b7e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.msl b/test/builtins/gen/textureDimensions/0d8b7e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/0d8b7e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/0d8b7e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/0d8b7e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/0d8b7e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/0d8b7e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/0e32ee.wgsl b/test/builtins/gen/textureDimensions/0e32ee.wgsl
new file mode 100644
index 0000000..b0bd534
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/0e32ee.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba16uint, write>) -> vec3<i32>
+fn textureDimensions_0e32ee() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0e32ee();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_0e32ee();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0e32ee();
+}
diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/0e32ee.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/0e32ee.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/0e32ee.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/0e32ee.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.msl b/test/builtins/gen/textureDimensions/0e32ee.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/0e32ee.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/0e32ee.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/0e32ee.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/0e32ee.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/0e32ee.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/0f3c50.wgsl b/test/builtins/gen/textureDimensions/0f3c50.wgsl
new file mode 100644
index 0000000..c5c653b
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/0f3c50.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureDimensions(texture: texture_2d_array<i32>) -> vec2<i32>
+fn textureDimensions_0f3c50() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0f3c50();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_0f3c50();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0f3c50();
+}
diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/0f3c50.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/0f3c50.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/0f3c50.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/0f3c50.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.msl b/test/builtins/gen/textureDimensions/0f3c50.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/0f3c50.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/0f3c50.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/0f3c50.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/0f3c50.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/0f3c50.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/1191a5.wgsl b/test/builtins/gen/textureDimensions/1191a5.wgsl
new file mode 100644
index 0000000..8b27fb3
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/1191a5.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureDimensions(texture: texture_2d<u32>) -> vec2<i32>
+fn textureDimensions_1191a5() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1191a5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_1191a5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1191a5();
+}
diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/1191a5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/1191a5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/1191a5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/1191a5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.msl b/test/builtins/gen/textureDimensions/1191a5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/1191a5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/1191a5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/1191a5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/1191a5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/1191a5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/12c9bb.wgsl b/test/builtins/gen/textureDimensions/12c9bb.wgsl
new file mode 100644
index 0000000..78ced16
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/12c9bb.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
+fn textureDimensions_12c9bb() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_12c9bb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_12c9bb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_12c9bb();
+}
diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/12c9bb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/12c9bb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/12c9bb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/12c9bb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.msl b/test/builtins/gen/textureDimensions/12c9bb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/12c9bb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/12c9bb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/12c9bb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/12c9bb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/12c9bb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/147998.wgsl b/test/builtins/gen/textureDimensions/147998.wgsl
new file mode 100644
index 0000000..8b386d9
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/147998.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rg32float, write>) -> vec2<i32>
+fn textureDimensions_147998() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_147998();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_147998();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_147998();
+}
diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/147998.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/147998.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/147998.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/147998.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/147998.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/147998.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.msl b/test/builtins/gen/textureDimensions/147998.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/147998.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/147998.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/147998.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/147998.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/147998.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/147998.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/147998.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/147998.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/16036c.wgsl b/test/builtins/gen/textureDimensions/16036c.wgsl
new file mode 100644
index 0000000..44057b8
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/16036c.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8sint, write>) -> vec2<i32>
+fn textureDimensions_16036c() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_16036c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_16036c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_16036c();
+}
diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/16036c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/16036c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/16036c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/16036c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.msl b/test/builtins/gen/textureDimensions/16036c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/16036c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/16036c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/16036c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/16036c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/16036c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/1b71f0.wgsl b/test/builtins/gen/textureDimensions/1b71f0.wgsl
new file mode 100644
index 0000000..f7a1e04
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/1b71f0.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba16sint, write>) -> vec3<i32>
+fn textureDimensions_1b71f0() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1b71f0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_1b71f0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1b71f0();
+}
diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/1b71f0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/1b71f0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/1b71f0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/1b71f0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.msl b/test/builtins/gen/textureDimensions/1b71f0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/1b71f0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/1b71f0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/1b71f0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/1b71f0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/1b71f0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/1d6c26.wgsl b/test/builtins/gen/textureDimensions/1d6c26.wgsl
new file mode 100644
index 0000000..592b9ea
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/1d6c26.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8unorm, write>) -> vec2<i32>
+fn textureDimensions_1d6c26() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1d6c26();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_1d6c26();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1d6c26();
+}
diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/1d6c26.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/1d6c26.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/1d6c26.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/1d6c26.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.msl b/test/builtins/gen/textureDimensions/1d6c26.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/1d6c26.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/1d6c26.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/1d6c26.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/1d6c26.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/1d6c26.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/1e9e39.wgsl b/test/builtins/gen/textureDimensions/1e9e39.wgsl
new file mode 100644
index 0000000..e848f69
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/1e9e39.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba16float, write>) -> i32
+fn textureDimensions_1e9e39() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1e9e39();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_1e9e39();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1e9e39();
+}
diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/1e9e39.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/1e9e39.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/1e9e39.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/1e9e39.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.msl b/test/builtins/gen/textureDimensions/1e9e39.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/1e9e39.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/1e9e39.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/1e9e39.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/1e9e39.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/1e9e39.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/1f20c5.wgsl b/test/builtins/gen/textureDimensions/1f20c5.wgsl
new file mode 100644
index 0000000..57dc1ee
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/1f20c5.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureDimensions(texture: texture_2d_array<u32>) -> vec2<i32>
+fn textureDimensions_1f20c5() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1f20c5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_1f20c5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1f20c5();
+}
diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/1f20c5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/1f20c5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/1f20c5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/1f20c5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.msl b/test/builtins/gen/textureDimensions/1f20c5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/1f20c5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/1f20c5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/1f20c5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/1f20c5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/1f20c5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/214dd4.wgsl b/test/builtins/gen/textureDimensions/214dd4.wgsl
new file mode 100644
index 0000000..ac2815d
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/214dd4.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8sint, write>) -> vec3<i32>
+fn textureDimensions_214dd4() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_214dd4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_214dd4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_214dd4();
+}
diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/214dd4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/214dd4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/214dd4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/214dd4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.msl b/test/builtins/gen/textureDimensions/214dd4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/214dd4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/214dd4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/214dd4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/214dd4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/214dd4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/221f22.wgsl b/test/builtins/gen/textureDimensions/221f22.wgsl
new file mode 100644
index 0000000..14d0237
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/221f22.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec2<i32>
+fn textureDimensions_221f22() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_221f22();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_221f22();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_221f22();
+}
diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/221f22.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/221f22.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/221f22.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/221f22.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.msl b/test/builtins/gen/textureDimensions/221f22.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/221f22.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/221f22.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/221f22.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/221f22.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/221f22.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/267788.wgsl b/test/builtins/gen/textureDimensions/267788.wgsl
new file mode 100644
index 0000000..373e44e
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/267788.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec2<i32>
+fn textureDimensions_267788() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_267788();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_267788();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_267788();
+}
diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/267788.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/267788.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/267788.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/267788.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/267788.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/267788.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.msl b/test/builtins/gen/textureDimensions/267788.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/267788.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/267788.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/267788.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/267788.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/267788.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/267788.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/267788.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/267788.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/26bdfa.wgsl b/test/builtins/gen/textureDimensions/26bdfa.wgsl
new file mode 100644
index 0000000..7921095
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/26bdfa.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureDimensions(texture: texture_3d<f32>, level: i32) -> vec3<i32>
+fn textureDimensions_26bdfa() {
+  var res: vec3<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_26bdfa();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_26bdfa();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_26bdfa();
+}
diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/26bdfa.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/26bdfa.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/26bdfa.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/26bdfa.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.msl b/test/builtins/gen/textureDimensions/26bdfa.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/26bdfa.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/26bdfa.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/26bdfa.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/26bdfa.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/26bdfa.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/26ef6c.wgsl b/test/builtins/gen/textureDimensions/26ef6c.wgsl
new file mode 100644
index 0000000..a09c30b
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/26ef6c.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8uint, write>) -> vec2<i32>
+fn textureDimensions_26ef6c() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_26ef6c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_26ef6c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_26ef6c();
+}
diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/26ef6c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/26ef6c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/26ef6c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/26ef6c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.msl b/test/builtins/gen/textureDimensions/26ef6c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/26ef6c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/26ef6c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/26ef6c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/26ef6c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/26ef6c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/2ad087.wgsl b/test/builtins/gen/textureDimensions/2ad087.wgsl
new file mode 100644
index 0000000..fe036cd
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/2ad087.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba16sint, write>) -> vec2<i32>
+fn textureDimensions_2ad087() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2ad087();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_2ad087();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2ad087();
+}
diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/2ad087.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/2ad087.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/2ad087.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/2ad087.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.msl b/test/builtins/gen/textureDimensions/2ad087.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/2ad087.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/2ad087.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/2ad087.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/2ad087.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/2ad087.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/2efa05.wgsl b/test/builtins/gen/textureDimensions/2efa05.wgsl
new file mode 100644
index 0000000..ad39eb2
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/2efa05.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureDimensions(texture: texture_3d<u32>, level: i32) -> vec3<i32>
+fn textureDimensions_2efa05() {
+  var res: vec3<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2efa05();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_2efa05();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2efa05();
+}
diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/2efa05.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/2efa05.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/2efa05.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/2efa05.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.msl b/test/builtins/gen/textureDimensions/2efa05.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/2efa05.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/2efa05.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/2efa05.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/2efa05.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/2efa05.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/2f289f.wgsl b/test/builtins/gen/textureDimensions/2f289f.wgsl
new file mode 100644
index 0000000..b7bd4c9
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/2f289f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<r32sint, write>) -> vec3<i32>
+fn textureDimensions_2f289f() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2f289f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_2f289f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2f289f();
+}
diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/2f289f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/2f289f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/2f289f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/2f289f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.msl b/test/builtins/gen/textureDimensions/2f289f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/2f289f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/2f289f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/2f289f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/2f289f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/2f289f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/2fe1cc.wgsl b/test/builtins/gen/textureDimensions/2fe1cc.wgsl
new file mode 100644
index 0000000..b069814
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/2fe1cc.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureDimensions(texture: texture_2d<f32>, level: i32) -> vec2<i32>
+fn textureDimensions_2fe1cc() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2fe1cc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_2fe1cc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2fe1cc();
+}
diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/2fe1cc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/2fe1cc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.msl b/test/builtins/gen/textureDimensions/2fe1cc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/2fe1cc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/2fe1cc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/2fe1cc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/2fe1cc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/2fe1cc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/318ecc.wgsl b/test/builtins/gen/textureDimensions/318ecc.wgsl
new file mode 100644
index 0000000..94f6e05
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/318ecc.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba16uint, write>) -> i32
+fn textureDimensions_318ecc() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_318ecc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_318ecc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_318ecc();
+}
diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/318ecc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/318ecc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/318ecc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/318ecc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.msl b/test/builtins/gen/textureDimensions/318ecc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/318ecc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/318ecc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/318ecc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/318ecc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/318ecc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/340d06.wgsl b/test/builtins/gen/textureDimensions/340d06.wgsl
new file mode 100644
index 0000000..96fb75c
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/340d06.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<r32uint, write>) -> vec3<i32>
+fn textureDimensions_340d06() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_340d06();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_340d06();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_340d06();
+}
diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/340d06.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/340d06.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/340d06.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/340d06.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.msl b/test/builtins/gen/textureDimensions/340d06.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/340d06.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/340d06.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/340d06.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/340d06.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/340d06.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/398e30.wgsl b/test/builtins/gen/textureDimensions/398e30.wgsl
new file mode 100644
index 0000000..578d684
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/398e30.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba32uint, write>) -> vec2<i32>
+fn textureDimensions_398e30() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_398e30();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_398e30();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_398e30();
+}
diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/398e30.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/398e30.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/398e30.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/398e30.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.msl b/test/builtins/gen/textureDimensions/398e30.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/398e30.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/398e30.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/398e30.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/398e30.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/398e30.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/3a94ea.wgsl b/test/builtins/gen/textureDimensions/3a94ea.wgsl
new file mode 100644
index 0000000..a55d872
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/3a94ea.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rg32uint, write>) -> vec2<i32>
+fn textureDimensions_3a94ea() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3a94ea();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_3a94ea();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3a94ea();
+}
diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/3a94ea.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/3a94ea.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/3a94ea.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/3a94ea.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.msl b/test/builtins/gen/textureDimensions/3a94ea.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/3a94ea.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/3a94ea.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/3a94ea.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/3a94ea.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/3a94ea.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/3aca08.wgsl b/test/builtins/gen/textureDimensions/3aca08.wgsl
new file mode 100644
index 0000000..015a10d
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/3aca08.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba32float, write>) -> i32
+fn textureDimensions_3aca08() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3aca08();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_3aca08();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3aca08();
+}
diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/3aca08.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/3aca08.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/3aca08.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/3aca08.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.msl b/test/builtins/gen/textureDimensions/3aca08.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/3aca08.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/3aca08.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/3aca08.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/3aca08.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/3aca08.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/3c5ad8.wgsl b/test/builtins/gen/textureDimensions/3c5ad8.wgsl
new file mode 100644
index 0000000..4c83496
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/3c5ad8.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8sint, write>) -> vec2<i32>
+fn textureDimensions_3c5ad8() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3c5ad8();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_3c5ad8();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3c5ad8();
+}
diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/3c5ad8.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/3c5ad8.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.msl b/test/builtins/gen/textureDimensions/3c5ad8.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/3c5ad8.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/3c5ad8.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/3c5ad8.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/3c5ad8.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/3c5ad8.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/4152a6.wgsl b/test/builtins/gen/textureDimensions/4152a6.wgsl
new file mode 100644
index 0000000..cdb0684
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/4152a6.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
+
+// fn textureDimensions(texture: texture_cube_array<u32>) -> vec2<i32>
+fn textureDimensions_4152a6() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4152a6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_4152a6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4152a6();
+}
diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/4152a6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/4152a6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/4152a6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/4152a6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.msl b/test/builtins/gen/textureDimensions/4152a6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/4152a6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/4152a6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/4152a6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/4152a6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/4152a6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/423f99.wgsl b/test/builtins/gen/textureDimensions/423f99.wgsl
new file mode 100644
index 0000000..b2534a3
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/423f99.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureDimensions(texture: texture_1d<i32>) -> i32
+fn textureDimensions_423f99() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_423f99();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_423f99();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_423f99();
+}
diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/423f99.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/423f99.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/423f99.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/423f99.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.msl b/test/builtins/gen/textureDimensions/423f99.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/423f99.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/423f99.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/423f99.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/423f99.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/423f99.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/4267ee.wgsl b/test/builtins/gen/textureDimensions/4267ee.wgsl
new file mode 100644
index 0000000..0039183
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/4267ee.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba32float, write>) -> vec2<i32>
+fn textureDimensions_4267ee() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4267ee();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_4267ee();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4267ee();
+}
diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/4267ee.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/4267ee.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/4267ee.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/4267ee.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.msl b/test/builtins/gen/textureDimensions/4267ee.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/4267ee.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/4267ee.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/4267ee.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/4267ee.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/4267ee.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/42d4e6.wgsl b/test/builtins/gen/textureDimensions/42d4e6.wgsl
new file mode 100644
index 0000000..9db52bc
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/42d4e6.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8unorm, write>) -> i32
+fn textureDimensions_42d4e6() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_42d4e6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_42d4e6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_42d4e6();
+}
diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/42d4e6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/42d4e6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/42d4e6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/42d4e6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.msl b/test/builtins/gen/textureDimensions/42d4e6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/42d4e6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/42d4e6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/42d4e6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/42d4e6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/42d4e6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/48cb89.wgsl b/test/builtins/gen/textureDimensions/48cb89.wgsl
new file mode 100644
index 0000000..d6b5e93
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/48cb89.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba16float, write>) -> vec2<i32>
+fn textureDimensions_48cb89() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_48cb89();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_48cb89();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_48cb89();
+}
diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/48cb89.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/48cb89.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/48cb89.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/48cb89.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.msl b/test/builtins/gen/textureDimensions/48cb89.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/48cb89.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/48cb89.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/48cb89.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/48cb89.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/48cb89.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/49d274.wgsl b/test/builtins/gen/textureDimensions/49d274.wgsl
new file mode 100644
index 0000000..365b4d9
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/49d274.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rg32sint, write>) -> vec2<i32>
+fn textureDimensions_49d274() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_49d274();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_49d274();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_49d274();
+}
diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/49d274.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/49d274.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/49d274.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/49d274.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.msl b/test/builtins/gen/textureDimensions/49d274.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/49d274.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/49d274.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/49d274.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/49d274.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/49d274.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/4df9a8.wgsl b/test/builtins/gen/textureDimensions/4df9a8.wgsl
new file mode 100644
index 0000000..0d57047
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/4df9a8.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rg32uint, write>) -> i32
+fn textureDimensions_4df9a8() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4df9a8();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_4df9a8();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4df9a8();
+}
diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/4df9a8.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/4df9a8.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/4df9a8.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/4df9a8.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.msl b/test/builtins/gen/textureDimensions/4df9a8.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/4df9a8.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/4df9a8.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/4df9a8.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/4df9a8.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/4df9a8.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/50a9ee.wgsl b/test/builtins/gen/textureDimensions/50a9ee.wgsl
new file mode 100644
index 0000000..eb49af8
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/50a9ee.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec2<i32>
+fn textureDimensions_50a9ee() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_50a9ee();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_50a9ee();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_50a9ee();
+}
diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/50a9ee.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/50a9ee.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/50a9ee.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/50a9ee.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.msl b/test/builtins/gen/textureDimensions/50a9ee.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/50a9ee.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/50a9ee.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/50a9ee.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/50a9ee.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/50a9ee.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/52045c.wgsl b/test/builtins/gen/textureDimensions/52045c.wgsl
new file mode 100644
index 0000000..4bcfa46
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/52045c.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureDimensions(texture: texture_1d<i32>, level: i32) -> i32
+fn textureDimensions_52045c() {
+  var res: i32 = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_52045c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_52045c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_52045c();
+}
diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/52045c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/52045c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/52045c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/52045c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.msl b/test/builtins/gen/textureDimensions/52045c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/52045c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/52045c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/52045c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/52045c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/52045c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/55b23e.wgsl b/test/builtins/gen/textureDimensions/55b23e.wgsl
new file mode 100644
index 0000000..f8365a7
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/55b23e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rg32float, write>) -> i32
+fn textureDimensions_55b23e() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_55b23e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_55b23e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_55b23e();
+}
diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/55b23e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/55b23e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/55b23e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/55b23e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.msl b/test/builtins/gen/textureDimensions/55b23e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/55b23e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/55b23e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/55b23e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/55b23e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/55b23e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/579629.wgsl b/test/builtins/gen/textureDimensions/579629.wgsl
new file mode 100644
index 0000000..307a03a
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/579629.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<u32>;
+
+// fn textureDimensions(texture: texture_multisampled_2d<u32>) -> vec2<i32>
+fn textureDimensions_579629() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_579629();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_579629();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_579629();
+}
diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/579629.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/579629.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/579629.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/579629.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/579629.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/579629.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.msl b/test/builtins/gen/textureDimensions/579629.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/579629.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/579629.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/579629.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/579629.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/579629.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/579629.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/579629.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/579629.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/57da0b.wgsl b/test/builtins/gen/textureDimensions/57da0b.wgsl
new file mode 100644
index 0000000..b0f707a
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/57da0b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<r32uint, write>) -> i32
+fn textureDimensions_57da0b() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_57da0b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_57da0b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_57da0b();
+}
diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/57da0b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/57da0b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/57da0b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/57da0b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.msl b/test/builtins/gen/textureDimensions/57da0b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/57da0b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/57da0b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/57da0b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/57da0b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/57da0b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/57e28f.wgsl b/test/builtins/gen/textureDimensions/57e28f.wgsl
new file mode 100644
index 0000000..7e40bd0
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/57e28f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+
+// fn textureDimensions(texture: texture_depth_cube) -> vec2<i32>
+fn textureDimensions_57e28f() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_57e28f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_57e28f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_57e28f();
+}
diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/57e28f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/57e28f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/57e28f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/57e28f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.msl b/test/builtins/gen/textureDimensions/57e28f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/57e28f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/57e28f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/57e28f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/57e28f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/57e28f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/58a515.wgsl b/test/builtins/gen/textureDimensions/58a515.wgsl
new file mode 100644
index 0000000..02ecaea
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/58a515.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba16float, write>) -> vec2<i32>
+fn textureDimensions_58a515() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_58a515();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_58a515();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_58a515();
+}
diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/58a515.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/58a515.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/58a515.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/58a515.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.msl b/test/builtins/gen/textureDimensions/58a515.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/58a515.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/58a515.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/58a515.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/58a515.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/58a515.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/5985f3.wgsl b/test/builtins/gen/textureDimensions/5985f3.wgsl
new file mode 100644
index 0000000..b181622
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/5985f3.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba32sint, write>) -> vec2<i32>
+fn textureDimensions_5985f3() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_5985f3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_5985f3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_5985f3();
+}
diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/5985f3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/5985f3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/5985f3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/5985f3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.msl b/test/builtins/gen/textureDimensions/5985f3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/5985f3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/5985f3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/5985f3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/5985f3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/5985f3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/5caa5e.wgsl b/test/builtins/gen/textureDimensions/5caa5e.wgsl
new file mode 100644
index 0000000..8541575
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/5caa5e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba32uint, write>) -> i32
+fn textureDimensions_5caa5e() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_5caa5e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_5caa5e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_5caa5e();
+}
diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/5caa5e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/5caa5e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/5caa5e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/5caa5e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.msl b/test/builtins/gen/textureDimensions/5caa5e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/5caa5e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/5caa5e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/5caa5e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/5caa5e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/5caa5e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/5e295d.wgsl b/test/builtins/gen/textureDimensions/5e295d.wgsl
new file mode 100644
index 0000000..62b1c79
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/5e295d.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba16uint, write>) -> vec2<i32>
+fn textureDimensions_5e295d() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_5e295d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_5e295d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_5e295d();
+}
diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/5e295d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/5e295d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/5e295d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/5e295d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.msl b/test/builtins/gen/textureDimensions/5e295d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/5e295d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/5e295d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/5e295d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/5e295d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/5e295d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/60bf54.wgsl b/test/builtins/gen/textureDimensions/60bf54.wgsl
new file mode 100644
index 0000000..6eb6787
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/60bf54.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rg32sint, write>) -> vec3<i32>
+fn textureDimensions_60bf54() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_60bf54();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_60bf54();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_60bf54();
+}
diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/60bf54.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/60bf54.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/60bf54.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/60bf54.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.msl b/test/builtins/gen/textureDimensions/60bf54.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/60bf54.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/60bf54.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/60bf54.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/60bf54.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/60bf54.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/63f3cf.wgsl b/test/builtins/gen/textureDimensions/63f3cf.wgsl
new file mode 100644
index 0000000..c104a38
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/63f3cf.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rg32float, write>) -> vec3<i32>
+fn textureDimensions_63f3cf() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_63f3cf();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_63f3cf();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_63f3cf();
+}
diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/63f3cf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/63f3cf.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/63f3cf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/63f3cf.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.msl b/test/builtins/gen/textureDimensions/63f3cf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/63f3cf.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/63f3cf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/63f3cf.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/63f3cf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/63f3cf.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/68105c.wgsl b/test/builtins/gen/textureDimensions/68105c.wgsl
new file mode 100644
index 0000000..4e457db
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/68105c.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba32uint, write>) -> vec2<i32>
+fn textureDimensions_68105c() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_68105c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_68105c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_68105c();
+}
diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/68105c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/68105c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/68105c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/68105c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.msl b/test/builtins/gen/textureDimensions/68105c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/68105c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/68105c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/68105c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/68105c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/68105c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/686ef2.wgsl b/test/builtins/gen/textureDimensions/686ef2.wgsl
new file mode 100644
index 0000000..b05f0c5
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/686ef2.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<i32>;
+
+// fn textureDimensions(texture: texture_cube<i32>, level: i32) -> vec2<i32>
+fn textureDimensions_686ef2() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_686ef2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_686ef2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_686ef2();
+}
diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/686ef2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/686ef2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/686ef2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/686ef2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.msl b/test/builtins/gen/textureDimensions/686ef2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/686ef2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/686ef2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/686ef2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/686ef2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/686ef2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/6adac6.wgsl b/test/builtins/gen/textureDimensions/6adac6.wgsl
new file mode 100644
index 0000000..1474994
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/6adac6.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba32sint, write>) -> i32
+fn textureDimensions_6adac6() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6adac6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_6adac6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6adac6();
+}
diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/6adac6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/6adac6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/6adac6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/6adac6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.msl b/test/builtins/gen/textureDimensions/6adac6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/6adac6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/6adac6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/6adac6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/6adac6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/6adac6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/6ec1b4.wgsl b/test/builtins/gen/textureDimensions/6ec1b4.wgsl
new file mode 100644
index 0000000..652a4e1
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/6ec1b4.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureDimensions(texture: texture_3d<u32>) -> vec3<i32>
+fn textureDimensions_6ec1b4() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6ec1b4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_6ec1b4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6ec1b4();
+}
diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/6ec1b4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/6ec1b4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.msl b/test/builtins/gen/textureDimensions/6ec1b4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/6ec1b4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/6ec1b4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/6ec1b4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/6ec1b4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/6ec1b4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/6f0d79.wgsl b/test/builtins/gen/textureDimensions/6f0d79.wgsl
new file mode 100644
index 0000000..51b2d16
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/6f0d79.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8snorm, write>) -> vec2<i32>
+fn textureDimensions_6f0d79() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6f0d79();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_6f0d79();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6f0d79();
+}
diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/6f0d79.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/6f0d79.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/6f0d79.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/6f0d79.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.msl b/test/builtins/gen/textureDimensions/6f0d79.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/6f0d79.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/6f0d79.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/6f0d79.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/6f0d79.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/6f0d79.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/702c53.wgsl b/test/builtins/gen/textureDimensions/702c53.wgsl
new file mode 100644
index 0000000..aa809aa
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/702c53.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8unorm, write>) -> vec2<i32>
+fn textureDimensions_702c53() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_702c53();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_702c53();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_702c53();
+}
diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/702c53.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/702c53.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/702c53.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/702c53.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.msl b/test/builtins/gen/textureDimensions/702c53.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/702c53.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/702c53.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/702c53.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/702c53.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/702c53.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/72e5d6.wgsl b/test/builtins/gen/textureDimensions/72e5d6.wgsl
new file mode 100644
index 0000000..3527443
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/72e5d6.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec2<i32>
+fn textureDimensions_72e5d6() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_72e5d6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_72e5d6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_72e5d6();
+}
diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/72e5d6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/72e5d6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/72e5d6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/72e5d6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.msl b/test/builtins/gen/textureDimensions/72e5d6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/72e5d6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/72e5d6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/72e5d6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/72e5d6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/72e5d6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/79df87.wgsl b/test/builtins/gen/textureDimensions/79df87.wgsl
new file mode 100644
index 0000000..a4402f3
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/79df87.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureDimensions(texture: texture_1d<u32>, level: i32) -> i32
+fn textureDimensions_79df87() {
+  var res: i32 = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_79df87();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_79df87();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_79df87();
+}
diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/79df87.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/79df87.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/79df87.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/79df87.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.msl b/test/builtins/gen/textureDimensions/79df87.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/79df87.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/79df87.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/79df87.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/79df87.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/79df87.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/7bf826.wgsl b/test/builtins/gen/textureDimensions/7bf826.wgsl
new file mode 100644
index 0000000..ae9fb9e
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/7bf826.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
+fn textureDimensions_7bf826() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7bf826();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_7bf826();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7bf826();
+}
diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/7bf826.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/7bf826.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/7bf826.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/7bf826.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.msl b/test/builtins/gen/textureDimensions/7bf826.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/7bf826.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/7bf826.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/7bf826.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/7bf826.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/7bf826.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/7f5c2e.wgsl b/test/builtins/gen/textureDimensions/7f5c2e.wgsl
new file mode 100644
index 0000000..b1434fb
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/7f5c2e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rg32sint, write>) -> vec2<i32>
+fn textureDimensions_7f5c2e() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7f5c2e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_7f5c2e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7f5c2e();
+}
diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/7f5c2e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/7f5c2e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.msl b/test/builtins/gen/textureDimensions/7f5c2e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/7f5c2e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/7f5c2e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/7f5c2e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/7f5c2e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/7f5c2e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/8028f3.wgsl b/test/builtins/gen/textureDimensions/8028f3.wgsl
new file mode 100644
index 0000000..c50ad78
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/8028f3.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<r32float, write>) -> vec3<i32>
+fn textureDimensions_8028f3() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8028f3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_8028f3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8028f3();
+}
diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/8028f3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/8028f3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/8028f3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/8028f3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.msl b/test/builtins/gen/textureDimensions/8028f3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/8028f3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/8028f3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/8028f3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/8028f3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/8028f3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/811679.wgsl b/test/builtins/gen/textureDimensions/811679.wgsl
new file mode 100644
index 0000000..efc5213
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/811679.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba32uint, write>) -> vec3<i32>
+fn textureDimensions_811679() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_811679();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_811679();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_811679();
+}
diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/811679.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/811679.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/811679.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/811679.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/811679.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/811679.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.msl b/test/builtins/gen/textureDimensions/811679.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/811679.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/811679.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/811679.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/811679.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/811679.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/811679.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/811679.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/811679.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/820596.wgsl b/test/builtins/gen/textureDimensions/820596.wgsl
new file mode 100644
index 0000000..8a900d4
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/820596.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rg32uint, write>) -> vec3<i32>
+fn textureDimensions_820596() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_820596();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_820596();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_820596();
+}
diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/820596.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/820596.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/820596.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/820596.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/820596.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/820596.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.msl b/test/builtins/gen/textureDimensions/820596.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/820596.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/820596.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/820596.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/820596.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/820596.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/820596.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/820596.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/820596.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/83ee5a.wgsl b/test/builtins/gen/textureDimensions/83ee5a.wgsl
new file mode 100644
index 0000000..b2b2e7b
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/83ee5a.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba32sint, write>) -> vec2<i32>
+fn textureDimensions_83ee5a() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_83ee5a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_83ee5a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_83ee5a();
+}
diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/83ee5a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/83ee5a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/83ee5a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/83ee5a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.msl b/test/builtins/gen/textureDimensions/83ee5a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/83ee5a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/83ee5a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/83ee5a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/83ee5a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/83ee5a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/85d556.wgsl b/test/builtins/gen/textureDimensions/85d556.wgsl
new file mode 100644
index 0000000..4c98522
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/85d556.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec2<i32>
+fn textureDimensions_85d556() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_85d556();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_85d556();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_85d556();
+}
diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/85d556.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/85d556.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/85d556.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/85d556.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.msl b/test/builtins/gen/textureDimensions/85d556.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/85d556.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/85d556.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/85d556.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/85d556.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/85d556.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/88ad17.wgsl b/test/builtins/gen/textureDimensions/88ad17.wgsl
new file mode 100644
index 0000000..c4354f9
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/88ad17.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<u32>;
+
+// fn textureDimensions(texture: texture_cube<u32>, level: i32) -> vec2<i32>
+fn textureDimensions_88ad17() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_88ad17();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_88ad17();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_88ad17();
+}
diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/88ad17.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/88ad17.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/88ad17.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/88ad17.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.msl b/test/builtins/gen/textureDimensions/88ad17.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/88ad17.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/88ad17.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/88ad17.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/88ad17.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/88ad17.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/8aa4c4.wgsl b/test/builtins/gen/textureDimensions/8aa4c4.wgsl
new file mode 100644
index 0000000..08f144d
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/8aa4c4.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureDimensions(texture: texture_3d<f32>) -> vec3<i32>
+fn textureDimensions_8aa4c4() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8aa4c4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_8aa4c4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8aa4c4();
+}
diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/8aa4c4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/8aa4c4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.msl b/test/builtins/gen/textureDimensions/8aa4c4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/8aa4c4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/8aa4c4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/8aa4c4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/8aa4c4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/8aa4c4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/8deb5e.wgsl b/test/builtins/gen/textureDimensions/8deb5e.wgsl
new file mode 100644
index 0000000..580b23d
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/8deb5e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureDimensions(texture: texture_3d<i32>) -> vec3<i32>
+fn textureDimensions_8deb5e() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8deb5e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_8deb5e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8deb5e();
+}
diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/8deb5e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/8deb5e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/8deb5e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/8deb5e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.msl b/test/builtins/gen/textureDimensions/8deb5e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/8deb5e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/8deb5e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/8deb5e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/8deb5e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/8deb5e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/8f20bf.wgsl b/test/builtins/gen/textureDimensions/8f20bf.wgsl
new file mode 100644
index 0000000..f4b74a79
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/8f20bf.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+
+// fn textureDimensions(texture: texture_cube_array<f32>) -> vec2<i32>
+fn textureDimensions_8f20bf() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8f20bf();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_8f20bf();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8f20bf();
+}
diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/8f20bf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/8f20bf.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/8f20bf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/8f20bf.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.msl b/test/builtins/gen/textureDimensions/8f20bf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/8f20bf.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/8f20bf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/8f20bf.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/8f20bf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/8f20bf.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/8fca0f.wgsl b/test/builtins/gen/textureDimensions/8fca0f.wgsl
new file mode 100644
index 0000000..f7eda13
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/8fca0f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba32float, write>) -> vec3<i32>
+fn textureDimensions_8fca0f() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8fca0f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_8fca0f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8fca0f();
+}
diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/8fca0f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/8fca0f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/8fca0f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/8fca0f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.msl b/test/builtins/gen/textureDimensions/8fca0f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/8fca0f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/8fca0f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/8fca0f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/8fca0f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/8fca0f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/90340b.wgsl b/test/builtins/gen/textureDimensions/90340b.wgsl
new file mode 100644
index 0000000..fdc2d1f
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/90340b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+
+// fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
+fn textureDimensions_90340b() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_90340b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_90340b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_90340b();
+}
diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/90340b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/90340b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/90340b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/90340b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.msl b/test/builtins/gen/textureDimensions/90340b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/90340b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/90340b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/90340b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/90340b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/90340b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/9042ab.wgsl b/test/builtins/gen/textureDimensions/9042ab.wgsl
new file mode 100644
index 0000000..44a55b9
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/9042ab.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rg32uint, write>) -> vec2<i32>
+fn textureDimensions_9042ab() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9042ab();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_9042ab();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9042ab();
+}
diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/9042ab.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/9042ab.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/9042ab.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/9042ab.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.msl b/test/builtins/gen/textureDimensions/9042ab.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/9042ab.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/9042ab.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/9042ab.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/9042ab.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/9042ab.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/9393b0.wgsl b/test/builtins/gen/textureDimensions/9393b0.wgsl
new file mode 100644
index 0000000..f9d4901
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/9393b0.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+
+// fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
+fn textureDimensions_9393b0() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9393b0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_9393b0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9393b0();
+}
diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/9393b0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/9393b0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/9393b0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/9393b0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.msl b/test/builtins/gen/textureDimensions/9393b0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/9393b0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/9393b0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/9393b0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/9393b0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/9393b0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/939fdb.wgsl b/test/builtins/gen/textureDimensions/939fdb.wgsl
new file mode 100644
index 0000000..bd19de4
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/939fdb.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureDimensions(texture: texture_depth_2d) -> vec2<i32>
+fn textureDimensions_939fdb() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_939fdb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_939fdb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_939fdb();
+}
diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/939fdb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/939fdb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/939fdb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/939fdb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.msl b/test/builtins/gen/textureDimensions/939fdb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/939fdb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/939fdb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/939fdb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/939fdb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/939fdb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/962dcd.wgsl b/test/builtins/gen/textureDimensions/962dcd.wgsl
new file mode 100644
index 0000000..68269ee
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/962dcd.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<i32>;
+
+// fn textureDimensions(texture: texture_cube<i32>) -> vec2<i32>
+fn textureDimensions_962dcd() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_962dcd();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_962dcd();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_962dcd();
+}
diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/962dcd.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/962dcd.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/962dcd.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/962dcd.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.msl b/test/builtins/gen/textureDimensions/962dcd.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/962dcd.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/962dcd.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/962dcd.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/962dcd.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/962dcd.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/9abfe5.wgsl b/test/builtins/gen/textureDimensions/9abfe5.wgsl
new file mode 100644
index 0000000..9cb143c
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/9abfe5.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba32float, write>) -> vec2<i32>
+fn textureDimensions_9abfe5() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9abfe5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_9abfe5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9abfe5();
+}
diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/9abfe5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/9abfe5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/9abfe5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/9abfe5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.msl b/test/builtins/gen/textureDimensions/9abfe5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/9abfe5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/9abfe5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/9abfe5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/9abfe5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/9abfe5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/9c9c57.wgsl b/test/builtins/gen/textureDimensions/9c9c57.wgsl
new file mode 100644
index 0000000..cd7870c
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/9c9c57.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec2<i32>
+fn textureDimensions_9c9c57() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9c9c57();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_9c9c57();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9c9c57();
+}
diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/9c9c57.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/9c9c57.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/9c9c57.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/9c9c57.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.msl b/test/builtins/gen/textureDimensions/9c9c57.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/9c9c57.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/9c9c57.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/9c9c57.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/9c9c57.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/9c9c57.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/9da9e2.wgsl b/test/builtins/gen/textureDimensions/9da9e2.wgsl
new file mode 100644
index 0000000..832f406
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/9da9e2.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8sint, write>) -> i32
+fn textureDimensions_9da9e2() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9da9e2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_9da9e2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9da9e2();
+}
diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/9da9e2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/9da9e2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/9da9e2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/9da9e2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.msl b/test/builtins/gen/textureDimensions/9da9e2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/9da9e2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/9da9e2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/9da9e2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/9da9e2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/9da9e2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/9eb8d8.wgsl b/test/builtins/gen/textureDimensions/9eb8d8.wgsl
new file mode 100644
index 0000000..20884ff
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/9eb8d8.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<r32uint, write>) -> vec2<i32>
+fn textureDimensions_9eb8d8() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9eb8d8();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_9eb8d8();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9eb8d8();
+}
diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/9eb8d8.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/9eb8d8.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.msl b/test/builtins/gen/textureDimensions/9eb8d8.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/9eb8d8.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/9eb8d8.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/9eb8d8.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/9eb8d8.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/9eb8d8.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/9f8e46.wgsl b/test/builtins/gen/textureDimensions/9f8e46.wgsl
new file mode 100644
index 0000000..b6f4be2
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/9f8e46.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureDimensions(texture: texture_2d<f32>) -> vec2<i32>
+fn textureDimensions_9f8e46() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9f8e46();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_9f8e46();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9f8e46();
+}
diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/9f8e46.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/9f8e46.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/9f8e46.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/9f8e46.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.msl b/test/builtins/gen/textureDimensions/9f8e46.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/9f8e46.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/9f8e46.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/9f8e46.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/9f8e46.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/9f8e46.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/a01845.wgsl b/test/builtins/gen/textureDimensions/a01845.wgsl
new file mode 100644
index 0000000..86c1911
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/a01845.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec2<i32>
+fn textureDimensions_a01845() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a01845();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_a01845();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a01845();
+}
diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/a01845.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/a01845.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/a01845.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/a01845.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.msl b/test/builtins/gen/textureDimensions/a01845.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/a01845.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/a01845.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/a01845.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/a01845.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/a01845.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/a7d565.wgsl b/test/builtins/gen/textureDimensions/a7d565.wgsl
new file mode 100644
index 0000000..457d50c
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/a7d565.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureDimensions(texture: texture_1d<u32>) -> i32
+fn textureDimensions_a7d565() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a7d565();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_a7d565();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a7d565();
+}
diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/a7d565.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/a7d565.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/a7d565.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/a7d565.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.msl b/test/builtins/gen/textureDimensions/a7d565.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/a7d565.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/a7d565.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/a7d565.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/a7d565.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/a7d565.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/a863f2.wgsl b/test/builtins/gen/textureDimensions/a863f2.wgsl
new file mode 100644
index 0000000..94c32bc
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/a863f2.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<r32float, write>) -> i32
+fn textureDimensions_a863f2() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a863f2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_a863f2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a863f2();
+}
diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/a863f2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/a863f2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/a863f2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/a863f2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.msl b/test/builtins/gen/textureDimensions/a863f2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/a863f2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/a863f2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/a863f2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/a863f2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/a863f2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/a9c9c1.wgsl b/test/builtins/gen/textureDimensions/a9c9c1.wgsl
new file mode 100644
index 0000000..83639dc
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/a9c9c1.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+
+// fn textureDimensions(texture: texture_cube<f32>, level: i32) -> vec2<i32>
+fn textureDimensions_a9c9c1() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a9c9c1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_a9c9c1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a9c9c1();
+}
diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/a9c9c1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/a9c9c1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.msl b/test/builtins/gen/textureDimensions/a9c9c1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/a9c9c1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/a9c9c1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/a9c9c1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/a9c9c1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/a9c9c1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/b0e16d.wgsl b/test/builtins/gen/textureDimensions/b0e16d.wgsl
new file mode 100644
index 0000000..2f55df0
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/b0e16d.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureDimensions(texture: texture_2d<i32>, level: i32) -> vec2<i32>
+fn textureDimensions_b0e16d() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b0e16d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_b0e16d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b0e16d();
+}
diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/b0e16d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/b0e16d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/b0e16d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/b0e16d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.msl b/test/builtins/gen/textureDimensions/b0e16d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/b0e16d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/b0e16d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/b0e16d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/b0e16d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/b0e16d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/b3c954.wgsl b/test/builtins/gen/textureDimensions/b3c954.wgsl
new file mode 100644
index 0000000..46c2786
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/b3c954.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<u32>;
+
+// fn textureDimensions(texture: texture_cube<u32>) -> vec2<i32>
+fn textureDimensions_b3c954() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b3c954();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_b3c954();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b3c954();
+}
diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/b3c954.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/b3c954.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/b3c954.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/b3c954.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.msl b/test/builtins/gen/textureDimensions/b3c954.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/b3c954.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/b3c954.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/b3c954.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/b3c954.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/b3c954.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/b3e407.wgsl b/test/builtins/gen/textureDimensions/b3e407.wgsl
new file mode 100644
index 0000000..f5e1391
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/b3e407.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureDimensions(texture: texture_1d<f32>, level: i32) -> i32
+fn textureDimensions_b3e407() {
+  var res: i32 = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b3e407();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_b3e407();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b3e407();
+}
diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/b3e407.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/b3e407.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/b3e407.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/b3e407.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.msl b/test/builtins/gen/textureDimensions/b3e407.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/b3e407.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/b3e407.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/b3e407.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/b3e407.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/b3e407.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/b91240.wgsl b/test/builtins/gen/textureDimensions/b91240.wgsl
new file mode 100644
index 0000000..e7aba5a
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/b91240.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8snorm, write>) -> vec2<i32>
+fn textureDimensions_b91240() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b91240();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_b91240();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b91240();
+}
diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/b91240.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/b91240.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/b91240.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/b91240.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.msl b/test/builtins/gen/textureDimensions/b91240.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/b91240.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/b91240.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/b91240.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/b91240.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/b91240.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/ba1481.wgsl b/test/builtins/gen/textureDimensions/ba1481.wgsl
new file mode 100644
index 0000000..b9f20b8
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/ba1481.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_external;
+
+// fn textureDimensions(texture: texture_external) -> vec2<i32>
+fn textureDimensions_ba1481() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_ba1481();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_ba1481();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_ba1481();
+}
diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/ba1481.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/ba1481.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/ba1481.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/ba1481.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.msl b/test/builtins/gen/textureDimensions/ba1481.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/ba1481.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/ba1481.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/ba1481.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/ba1481.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/ba1481.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/bb3dde.wgsl b/test/builtins/gen/textureDimensions/bb3dde.wgsl
new file mode 100644
index 0000000..dfab743
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/bb3dde.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba32sint, write>) -> vec3<i32>
+fn textureDimensions_bb3dde() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bb3dde();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_bb3dde();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bb3dde();
+}
diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/bb3dde.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/bb3dde.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/bb3dde.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/bb3dde.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.msl b/test/builtins/gen/textureDimensions/bb3dde.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/bb3dde.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/bb3dde.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/bb3dde.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/bb3dde.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/bb3dde.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/c30e75.wgsl b/test/builtins/gen/textureDimensions/c30e75.wgsl
new file mode 100644
index 0000000..b8a1e10
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/c30e75.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<r32sint, write>) -> vec2<i32>
+fn textureDimensions_c30e75() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c30e75();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_c30e75();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c30e75();
+}
diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/c30e75.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/c30e75.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/c30e75.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/c30e75.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.msl b/test/builtins/gen/textureDimensions/c30e75.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/c30e75.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/c30e75.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/c30e75.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/c30e75.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/c30e75.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/c7943d.wgsl b/test/builtins/gen/textureDimensions/c7943d.wgsl
new file mode 100644
index 0000000..6da3f5a
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/c7943d.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8uint, write>) -> vec2<i32>
+fn textureDimensions_c7943d() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c7943d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_c7943d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c7943d();
+}
diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/c7943d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/c7943d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/c7943d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/c7943d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.msl b/test/builtins/gen/textureDimensions/c7943d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/c7943d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/c7943d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/c7943d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/c7943d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/c7943d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/cc968c.wgsl b/test/builtins/gen/textureDimensions/cc968c.wgsl
new file mode 100644
index 0000000..f001aa6
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/cc968c.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rg32sint, write>) -> i32
+fn textureDimensions_cc968c() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cc968c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_cc968c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cc968c();
+}
diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/cc968c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/cc968c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/cc968c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/cc968c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.msl b/test/builtins/gen/textureDimensions/cc968c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/cc968c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/cc968c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/cc968c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/cc968c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/cc968c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/cccc8f.wgsl b/test/builtins/gen/textureDimensions/cccc8f.wgsl
new file mode 100644
index 0000000..d990bc6
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/cccc8f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8snorm, write>) -> i32
+fn textureDimensions_cccc8f() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cccc8f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_cccc8f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cccc8f();
+}
diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/cccc8f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/cccc8f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/cccc8f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/cccc8f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.msl b/test/builtins/gen/textureDimensions/cccc8f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/cccc8f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/cccc8f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/cccc8f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/cccc8f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/cccc8f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/cd76a7.wgsl b/test/builtins/gen/textureDimensions/cd76a7.wgsl
new file mode 100644
index 0000000..bcf3f8f
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/cd76a7.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8unorm, write>) -> vec3<i32>
+fn textureDimensions_cd76a7() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cd76a7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_cd76a7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cd76a7();
+}
diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/cd76a7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/cd76a7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/cd76a7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/cd76a7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.msl b/test/builtins/gen/textureDimensions/cd76a7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/cd76a7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/cd76a7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/cd76a7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/cd76a7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/cd76a7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/cdf473.wgsl b/test/builtins/gen/textureDimensions/cdf473.wgsl
new file mode 100644
index 0000000..04b17c9
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/cdf473.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba16sint, write>) -> vec2<i32>
+fn textureDimensions_cdf473() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cdf473();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_cdf473();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cdf473();
+}
diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/cdf473.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/cdf473.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/cdf473.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/cdf473.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.msl b/test/builtins/gen/textureDimensions/cdf473.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/cdf473.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/cdf473.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/cdf473.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/cdf473.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/cdf473.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/cec841.wgsl b/test/builtins/gen/textureDimensions/cec841.wgsl
new file mode 100644
index 0000000..21c773a
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/cec841.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureDimensions(texture: texture_2d_array<f32>) -> vec2<i32>
+fn textureDimensions_cec841() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cec841();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_cec841();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cec841();
+}
diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/cec841.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/cec841.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/cec841.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/cec841.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.msl b/test/builtins/gen/textureDimensions/cec841.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/cec841.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/cec841.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/cec841.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/cec841.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/cec841.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/cf7e43.wgsl b/test/builtins/gen/textureDimensions/cf7e43.wgsl
new file mode 100644
index 0000000..76495cd
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/cf7e43.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8snorm, write>) -> vec3<i32>
+fn textureDimensions_cf7e43() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cf7e43();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_cf7e43();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cf7e43();
+}
diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/cf7e43.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/cf7e43.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/cf7e43.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/cf7e43.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.msl b/test/builtins/gen/textureDimensions/cf7e43.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/cf7e43.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/cf7e43.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/cf7e43.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/cf7e43.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/cf7e43.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/d125bc.wgsl b/test/builtins/gen/textureDimensions/d125bc.wgsl
new file mode 100644
index 0000000..0e3d559
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/d125bc.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+
+// fn textureDimensions(texture: texture_cube<f32>) -> vec2<i32>
+fn textureDimensions_d125bc() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d125bc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_d125bc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d125bc();
+}
diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/d125bc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/d125bc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/d125bc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/d125bc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.msl b/test/builtins/gen/textureDimensions/d125bc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/d125bc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/d125bc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/d125bc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/d125bc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/d125bc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/d83c45.wgsl b/test/builtins/gen/textureDimensions/d83c45.wgsl
new file mode 100644
index 0000000..6e9f883
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/d83c45.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec2<i32>
+fn textureDimensions_d83c45() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d83c45();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_d83c45();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d83c45();
+}
diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/d83c45.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/d83c45.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/d83c45.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/d83c45.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.msl b/test/builtins/gen/textureDimensions/d83c45.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/d83c45.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/d83c45.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/d83c45.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/d83c45.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/d83c45.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/daf7c0.wgsl b/test/builtins/gen/textureDimensions/daf7c0.wgsl
new file mode 100644
index 0000000..1615d62
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/daf7c0.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<i32>;
+
+// fn textureDimensions(texture: texture_multisampled_2d<i32>) -> vec2<i32>
+fn textureDimensions_daf7c0() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_daf7c0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_daf7c0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_daf7c0();
+}
diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/daf7c0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/daf7c0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/daf7c0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/daf7c0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.msl b/test/builtins/gen/textureDimensions/daf7c0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/daf7c0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/daf7c0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/daf7c0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/daf7c0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/daf7c0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/dc2dd0.wgsl b/test/builtins/gen/textureDimensions/dc2dd0.wgsl
new file mode 100644
index 0000000..4836b46
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/dc2dd0.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8uint, write>) -> i32
+fn textureDimensions_dc2dd0() {
+  var res: i32 = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dc2dd0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_dc2dd0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dc2dd0();
+}
diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/dc2dd0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/dc2dd0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.msl b/test/builtins/gen/textureDimensions/dc2dd0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/dc2dd0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/dc2dd0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/dc2dd0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/dc2dd0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/dc2dd0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/e927be.wgsl b/test/builtins/gen/textureDimensions/e927be.wgsl
new file mode 100644
index 0000000..a4ebee5
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/e927be.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
+
+// fn textureDimensions(texture: texture_cube_array<i32>) -> vec2<i32>
+fn textureDimensions_e927be() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e927be();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_e927be();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e927be();
+}
diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/e927be.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/e927be.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/e927be.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/e927be.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.msl b/test/builtins/gen/textureDimensions/e927be.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/e927be.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/e927be.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/e927be.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/e927be.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/e927be.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/e9e96c.wgsl b/test/builtins/gen/textureDimensions/e9e96c.wgsl
new file mode 100644
index 0000000..49c2b15
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/e9e96c.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<r32float, write>) -> vec2<i32>
+fn textureDimensions_e9e96c() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e9e96c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_e9e96c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e9e96c();
+}
diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/e9e96c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/e9e96c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/e9e96c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/e9e96c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.msl b/test/builtins/gen/textureDimensions/e9e96c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/e9e96c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/e9e96c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/e9e96c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/e9e96c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/e9e96c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/ef5b89.wgsl b/test/builtins/gen/textureDimensions/ef5b89.wgsl
new file mode 100644
index 0000000..58838e2
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/ef5b89.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<f32>;
+
+// fn textureDimensions(texture: texture_multisampled_2d<f32>) -> vec2<i32>
+fn textureDimensions_ef5b89() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_ef5b89();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_ef5b89();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_ef5b89();
+}
diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/ef5b89.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/ef5b89.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/ef5b89.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/ef5b89.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.msl b/test/builtins/gen/textureDimensions/ef5b89.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/ef5b89.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/ef5b89.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/ef5b89.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/ef5b89.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/ef5b89.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/efc8a4.wgsl b/test/builtins/gen/textureDimensions/efc8a4.wgsl
new file mode 100644
index 0000000..843c647
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/efc8a4.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureDimensions(texture: texture_3d<i32>, level: i32) -> vec3<i32>
+fn textureDimensions_efc8a4() {
+  var res: vec3<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_efc8a4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_efc8a4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_efc8a4();
+}
diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/efc8a4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/efc8a4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/efc8a4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/efc8a4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.msl b/test/builtins/gen/textureDimensions/efc8a4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/efc8a4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/efc8a4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/efc8a4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/efc8a4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/efc8a4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/f60bdb.wgsl b/test/builtins/gen/textureDimensions/f60bdb.wgsl
new file mode 100644
index 0000000..ad2bb47
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/f60bdb.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d;
+
+// fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
+fn textureDimensions_f60bdb() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f60bdb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_f60bdb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f60bdb();
+}
diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/f60bdb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/f60bdb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/f60bdb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/f60bdb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.msl b/test/builtins/gen/textureDimensions/f60bdb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/f60bdb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/f60bdb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/f60bdb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/f60bdb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/f60bdb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/f7145b.wgsl b/test/builtins/gen/textureDimensions/f7145b.wgsl
new file mode 100644
index 0000000..02b68c1
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/f7145b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureDimensions(texture: texture_2d<u32>, level: i32) -> vec2<i32>
+fn textureDimensions_f7145b() {
+  var res: vec2<i32> = textureDimensions(arg_0, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f7145b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_f7145b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f7145b();
+}
diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/f7145b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/f7145b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/f7145b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/f7145b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.msl b/test/builtins/gen/textureDimensions/f7145b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/f7145b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/f7145b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/f7145b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/f7145b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/f7145b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/f931c7.wgsl b/test/builtins/gen/textureDimensions/f931c7.wgsl
new file mode 100644
index 0000000..0270f12
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/f931c7.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<r32float, write>) -> vec2<i32>
+fn textureDimensions_f931c7() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f931c7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_f931c7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f931c7();
+}
diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/f931c7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/f931c7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/f931c7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/f931c7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.msl b/test/builtins/gen/textureDimensions/f931c7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/f931c7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/f931c7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/f931c7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/f931c7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/f931c7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/fa9859.wgsl b/test/builtins/gen/textureDimensions/fa9859.wgsl
new file mode 100644
index 0000000..0035510
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/fa9859.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureDimensions(texture: texture_2d<i32>) -> vec2<i32>
+fn textureDimensions_fa9859() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_fa9859();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_fa9859();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_fa9859();
+}
diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/fa9859.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/fa9859.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/fa9859.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/fa9859.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.msl b/test/builtins/gen/textureDimensions/fa9859.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/fa9859.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/fa9859.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/fa9859.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/fa9859.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/fa9859.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/fb5670.wgsl b/test/builtins/gen/textureDimensions/fb5670.wgsl
new file mode 100644
index 0000000..1ac4723
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/fb5670.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rg32float, write>) -> vec2<i32>
+fn textureDimensions_fb5670() {
+  var res: vec2<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_fb5670();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_fb5670();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_fb5670();
+}
diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/fb5670.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/fb5670.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/fb5670.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/fb5670.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.msl b/test/builtins/gen/textureDimensions/fb5670.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/fb5670.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/fb5670.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/fb5670.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/fb5670.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/fb5670.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureDimensions/fcac78.wgsl b/test/builtins/gen/textureDimensions/fcac78.wgsl
new file mode 100644
index 0000000..3b2121e
--- /dev/null
+++ b/test/builtins/gen/textureDimensions/fcac78.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8uint, write>) -> vec3<i32>
+fn textureDimensions_fcac78() {
+  var res: vec3<i32> = textureDimensions(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_fcac78();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureDimensions_fcac78();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_fcac78();
+}
diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.glsl b/test/builtins/gen/textureDimensions/fcac78.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.glsl
rename to test/builtins/gen/textureDimensions/fcac78.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.hlsl b/test/builtins/gen/textureDimensions/fcac78.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.hlsl
rename to test/builtins/gen/textureDimensions/fcac78.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.msl b/test/builtins/gen/textureDimensions/fcac78.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.msl
rename to test/builtins/gen/textureDimensions/fcac78.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.spvasm b/test/builtins/gen/textureDimensions/fcac78.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.spvasm
rename to test/builtins/gen/textureDimensions/fcac78.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.wgsl b/test/builtins/gen/textureDimensions/fcac78.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.wgsl
rename to test/builtins/gen/textureDimensions/fcac78.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/01305f.wgsl b/test/builtins/gen/textureGather/01305f.wgsl
new file mode 100644
index 0000000..8c521bf
--- /dev/null
+++ b/test/builtins/gen/textureGather/01305f.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<u32>
+fn textureGather_01305f() {
+  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_01305f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_01305f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_01305f();
+}
diff --git a/test/intrinsics/gen/textureGather/01305f.wgsl.expected.glsl b/test/builtins/gen/textureGather/01305f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/01305f.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/01305f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/01305f.wgsl.expected.hlsl b/test/builtins/gen/textureGather/01305f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/01305f.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/01305f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/01305f.wgsl.expected.msl b/test/builtins/gen/textureGather/01305f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/01305f.wgsl.expected.msl
rename to test/builtins/gen/textureGather/01305f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/01305f.wgsl.expected.spvasm b/test/builtins/gen/textureGather/01305f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/01305f.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/01305f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/01305f.wgsl.expected.wgsl b/test/builtins/gen/textureGather/01305f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/01305f.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/01305f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/06030a.wgsl b/test/builtins/gen/textureGather/06030a.wgsl
new file mode 100644
index 0000000..c3cfc07
--- /dev/null
+++ b/test/builtins/gen/textureGather/06030a.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32>
+fn textureGather_06030a() {
+  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_06030a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_06030a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_06030a();
+}
diff --git a/test/intrinsics/gen/textureGather/06030a.wgsl.expected.glsl b/test/builtins/gen/textureGather/06030a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/06030a.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/06030a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/06030a.wgsl.expected.hlsl b/test/builtins/gen/textureGather/06030a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/06030a.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/06030a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/06030a.wgsl.expected.msl b/test/builtins/gen/textureGather/06030a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/06030a.wgsl.expected.msl
rename to test/builtins/gen/textureGather/06030a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/06030a.wgsl.expected.spvasm b/test/builtins/gen/textureGather/06030a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/06030a.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/06030a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/06030a.wgsl.expected.wgsl b/test/builtins/gen/textureGather/06030a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/06030a.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/06030a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/10c554.wgsl b/test/builtins/gen/textureGather/10c554.wgsl
new file mode 100644
index 0000000..e240c55
--- /dev/null
+++ b/test/builtins/gen/textureGather/10c554.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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 textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+fn textureGather_10c554() {
+  var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_10c554();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_10c554();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_10c554();
+}
diff --git a/test/intrinsics/gen/textureGather/10c554.wgsl.expected.glsl b/test/builtins/gen/textureGather/10c554.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/10c554.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/10c554.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/10c554.wgsl.expected.hlsl b/test/builtins/gen/textureGather/10c554.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/10c554.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/10c554.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/10c554.wgsl.expected.msl b/test/builtins/gen/textureGather/10c554.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/10c554.wgsl.expected.msl
rename to test/builtins/gen/textureGather/10c554.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/10c554.wgsl.expected.spvasm b/test/builtins/gen/textureGather/10c554.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/10c554.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/10c554.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/10c554.wgsl.expected.wgsl b/test/builtins/gen/textureGather/10c554.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/10c554.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/10c554.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/15d79c.wgsl b/test/builtins/gen/textureGather/15d79c.wgsl
new file mode 100644
index 0000000..830c832
--- /dev/null
+++ b/test/builtins/gen/textureGather/15d79c.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
+fn textureGather_15d79c() {
+  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_15d79c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_15d79c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_15d79c();
+}
diff --git a/test/intrinsics/gen/textureGather/15d79c.wgsl.expected.glsl b/test/builtins/gen/textureGather/15d79c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/15d79c.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/15d79c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/15d79c.wgsl.expected.hlsl b/test/builtins/gen/textureGather/15d79c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/15d79c.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/15d79c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/15d79c.wgsl.expected.msl b/test/builtins/gen/textureGather/15d79c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/15d79c.wgsl.expected.msl
rename to test/builtins/gen/textureGather/15d79c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/15d79c.wgsl.expected.spvasm b/test/builtins/gen/textureGather/15d79c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/15d79c.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/15d79c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/15d79c.wgsl.expected.wgsl b/test/builtins/gen/textureGather/15d79c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/15d79c.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/15d79c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/2e0ed5.wgsl b/test/builtins/gen/textureGather/2e0ed5.wgsl
new file mode 100644
index 0000000..39b32d1
--- /dev/null
+++ b/test/builtins/gen/textureGather/2e0ed5.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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 textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+fn textureGather_2e0ed5() {
+  var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_2e0ed5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_2e0ed5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_2e0ed5();
+}
diff --git a/test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.glsl b/test/builtins/gen/textureGather/2e0ed5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/2e0ed5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.hlsl b/test/builtins/gen/textureGather/2e0ed5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/2e0ed5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.msl b/test/builtins/gen/textureGather/2e0ed5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.msl
rename to test/builtins/gen/textureGather/2e0ed5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.spvasm b/test/builtins/gen/textureGather/2e0ed5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/2e0ed5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.wgsl b/test/builtins/gen/textureGather/2e0ed5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/2e0ed5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/3112e8.wgsl b/test/builtins/gen/textureGather/3112e8.wgsl
new file mode 100644
index 0000000..90210b61
--- /dev/null
+++ b/test/builtins/gen/textureGather/3112e8.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
+fn textureGather_3112e8() {
+  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_3112e8();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_3112e8();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_3112e8();
+}
diff --git a/test/intrinsics/gen/textureGather/3112e8.wgsl.expected.glsl b/test/builtins/gen/textureGather/3112e8.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/3112e8.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/3112e8.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/3112e8.wgsl.expected.hlsl b/test/builtins/gen/textureGather/3112e8.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/3112e8.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/3112e8.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/3112e8.wgsl.expected.msl b/test/builtins/gen/textureGather/3112e8.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/3112e8.wgsl.expected.msl
rename to test/builtins/gen/textureGather/3112e8.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/3112e8.wgsl.expected.spvasm b/test/builtins/gen/textureGather/3112e8.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/3112e8.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/3112e8.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/3112e8.wgsl.expected.wgsl b/test/builtins/gen/textureGather/3112e8.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/3112e8.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/3112e8.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/3c527e.wgsl b/test/builtins/gen/textureGather/3c527e.wgsl
new file mode 100644
index 0000000..9a90afe
--- /dev/null
+++ b/test/builtins/gen/textureGather/3c527e.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<u32>
+fn textureGather_3c527e() {
+  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_3c527e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_3c527e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_3c527e();
+}
diff --git a/test/intrinsics/gen/textureGather/3c527e.wgsl.expected.glsl b/test/builtins/gen/textureGather/3c527e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/3c527e.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/3c527e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/3c527e.wgsl.expected.hlsl b/test/builtins/gen/textureGather/3c527e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/3c527e.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/3c527e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/3c527e.wgsl.expected.msl b/test/builtins/gen/textureGather/3c527e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/3c527e.wgsl.expected.msl
rename to test/builtins/gen/textureGather/3c527e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/3c527e.wgsl.expected.spvasm b/test/builtins/gen/textureGather/3c527e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/3c527e.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/3c527e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/3c527e.wgsl.expected.wgsl b/test/builtins/gen/textureGather/3c527e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/3c527e.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/3c527e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/43025d.wgsl b/test/builtins/gen/textureGather/43025d.wgsl
new file mode 100644
index 0000000..c96d1c4
--- /dev/null
+++ b/test/builtins/gen/textureGather/43025d.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec4<f32>
+fn textureGather_43025d() {
+  var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_43025d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_43025d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_43025d();
+}
diff --git a/test/intrinsics/gen/textureGather/43025d.wgsl.expected.glsl b/test/builtins/gen/textureGather/43025d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/43025d.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/43025d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/43025d.wgsl.expected.hlsl b/test/builtins/gen/textureGather/43025d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/43025d.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/43025d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/43025d.wgsl.expected.msl b/test/builtins/gen/textureGather/43025d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/43025d.wgsl.expected.msl
rename to test/builtins/gen/textureGather/43025d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/43025d.wgsl.expected.spvasm b/test/builtins/gen/textureGather/43025d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/43025d.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/43025d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/43025d.wgsl.expected.wgsl b/test/builtins/gen/textureGather/43025d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/43025d.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/43025d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/4f2350.wgsl b/test/builtins/gen/textureGather/4f2350.wgsl
new file mode 100644
index 0000000..29250e9
--- /dev/null
+++ b/test/builtins/gen/textureGather/4f2350.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<i32>
+fn textureGather_4f2350() {
+  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_4f2350();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_4f2350();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_4f2350();
+}
diff --git a/test/intrinsics/gen/textureGather/4f2350.wgsl.expected.glsl b/test/builtins/gen/textureGather/4f2350.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/4f2350.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/4f2350.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/4f2350.wgsl.expected.hlsl b/test/builtins/gen/textureGather/4f2350.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/4f2350.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/4f2350.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/4f2350.wgsl.expected.msl b/test/builtins/gen/textureGather/4f2350.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/4f2350.wgsl.expected.msl
rename to test/builtins/gen/textureGather/4f2350.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/4f2350.wgsl.expected.spvasm b/test/builtins/gen/textureGather/4f2350.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/4f2350.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/4f2350.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/4f2350.wgsl.expected.wgsl b/test/builtins/gen/textureGather/4f2350.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/4f2350.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/4f2350.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/51cf0b.wgsl b/test/builtins/gen/textureGather/51cf0b.wgsl
new file mode 100644
index 0000000..f27f6b5
--- /dev/null
+++ b/test/builtins/gen/textureGather/51cf0b.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<i32>
+fn textureGather_51cf0b() {
+  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_51cf0b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_51cf0b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_51cf0b();
+}
diff --git a/test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.glsl b/test/builtins/gen/textureGather/51cf0b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/51cf0b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.hlsl b/test/builtins/gen/textureGather/51cf0b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/51cf0b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.msl b/test/builtins/gen/textureGather/51cf0b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.msl
rename to test/builtins/gen/textureGather/51cf0b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.spvasm b/test/builtins/gen/textureGather/51cf0b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/51cf0b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.wgsl b/test/builtins/gen/textureGather/51cf0b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/51cf0b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/53ece6.wgsl b/test/builtins/gen/textureGather/53ece6.wgsl
new file mode 100644
index 0000000..2f4e0b4
--- /dev/null
+++ b/test/builtins/gen/textureGather/53ece6.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, offset: vec2<i32>) -> vec4<f32>
+fn textureGather_53ece6() {
+  var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_53ece6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_53ece6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_53ece6();
+}
diff --git a/test/intrinsics/gen/textureGather/53ece6.wgsl.expected.glsl b/test/builtins/gen/textureGather/53ece6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/53ece6.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/53ece6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/53ece6.wgsl.expected.hlsl b/test/builtins/gen/textureGather/53ece6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/53ece6.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/53ece6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/53ece6.wgsl.expected.msl b/test/builtins/gen/textureGather/53ece6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/53ece6.wgsl.expected.msl
rename to test/builtins/gen/textureGather/53ece6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/53ece6.wgsl.expected.spvasm b/test/builtins/gen/textureGather/53ece6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/53ece6.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/53ece6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/53ece6.wgsl.expected.wgsl b/test/builtins/gen/textureGather/53ece6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/53ece6.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/53ece6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/57bfc6.wgsl b/test/builtins/gen/textureGather/57bfc6.wgsl
new file mode 100644
index 0000000..0fc0b73
--- /dev/null
+++ b/test/builtins/gen/textureGather/57bfc6.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+fn textureGather_57bfc6() {
+  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_57bfc6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_57bfc6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_57bfc6();
+}
diff --git a/test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.glsl b/test/builtins/gen/textureGather/57bfc6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/57bfc6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.hlsl b/test/builtins/gen/textureGather/57bfc6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/57bfc6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.msl b/test/builtins/gen/textureGather/57bfc6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.msl
rename to test/builtins/gen/textureGather/57bfc6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.spvasm b/test/builtins/gen/textureGather/57bfc6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/57bfc6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.wgsl b/test/builtins/gen/textureGather/57bfc6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/57bfc6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/587ba3.wgsl b/test/builtins/gen/textureGather/587ba3.wgsl
new file mode 100644
index 0000000..3f1e1e7
--- /dev/null
+++ b/test/builtins/gen/textureGather/587ba3.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>) -> vec4<i32>
+fn textureGather_587ba3() {
+  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_587ba3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_587ba3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_587ba3();
+}
diff --git a/test/intrinsics/gen/textureGather/587ba3.wgsl.expected.glsl b/test/builtins/gen/textureGather/587ba3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/587ba3.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/587ba3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/587ba3.wgsl.expected.hlsl b/test/builtins/gen/textureGather/587ba3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/587ba3.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/587ba3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/587ba3.wgsl.expected.msl b/test/builtins/gen/textureGather/587ba3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/587ba3.wgsl.expected.msl
rename to test/builtins/gen/textureGather/587ba3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/587ba3.wgsl.expected.spvasm b/test/builtins/gen/textureGather/587ba3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/587ba3.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/587ba3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/587ba3.wgsl.expected.wgsl b/test/builtins/gen/textureGather/587ba3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/587ba3.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/587ba3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/69e0fb.wgsl b/test/builtins/gen/textureGather/69e0fb.wgsl
new file mode 100644
index 0000000..8d09197
--- /dev/null
+++ b/test/builtins/gen/textureGather/69e0fb.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<i32>
+fn textureGather_69e0fb() {
+  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_69e0fb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_69e0fb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_69e0fb();
+}
diff --git a/test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.glsl b/test/builtins/gen/textureGather/69e0fb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/69e0fb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.hlsl b/test/builtins/gen/textureGather/69e0fb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/69e0fb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.msl b/test/builtins/gen/textureGather/69e0fb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.msl
rename to test/builtins/gen/textureGather/69e0fb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.spvasm b/test/builtins/gen/textureGather/69e0fb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/69e0fb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.wgsl b/test/builtins/gen/textureGather/69e0fb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/69e0fb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/93003d.wgsl b/test/builtins/gen/textureGather/93003d.wgsl
new file mode 100644
index 0000000..5fda02b
--- /dev/null
+++ b/test/builtins/gen/textureGather/93003d.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<u32>
+fn textureGather_93003d() {
+  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_93003d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_93003d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_93003d();
+}
diff --git a/test/intrinsics/gen/textureGather/93003d.wgsl.expected.glsl b/test/builtins/gen/textureGather/93003d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/93003d.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/93003d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/93003d.wgsl.expected.hlsl b/test/builtins/gen/textureGather/93003d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/93003d.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/93003d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/93003d.wgsl.expected.msl b/test/builtins/gen/textureGather/93003d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/93003d.wgsl.expected.msl
rename to test/builtins/gen/textureGather/93003d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/93003d.wgsl.expected.spvasm b/test/builtins/gen/textureGather/93003d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/93003d.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/93003d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/93003d.wgsl.expected.wgsl b/test/builtins/gen/textureGather/93003d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/93003d.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/93003d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/9a6358.wgsl b/test/builtins/gen/textureGather/9a6358.wgsl
new file mode 100644
index 0000000..2159a40
--- /dev/null
+++ b/test/builtins/gen/textureGather/9a6358.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec4<f32>
+fn textureGather_9a6358() {
+  var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_9a6358();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_9a6358();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_9a6358();
+}
diff --git a/test/intrinsics/gen/textureGather/9a6358.wgsl.expected.glsl b/test/builtins/gen/textureGather/9a6358.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/9a6358.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/9a6358.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/9a6358.wgsl.expected.hlsl b/test/builtins/gen/textureGather/9a6358.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/9a6358.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/9a6358.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/9a6358.wgsl.expected.msl b/test/builtins/gen/textureGather/9a6358.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/9a6358.wgsl.expected.msl
rename to test/builtins/gen/textureGather/9a6358.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/9a6358.wgsl.expected.spvasm b/test/builtins/gen/textureGather/9a6358.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/9a6358.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/9a6358.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/9a6358.wgsl.expected.wgsl b/test/builtins/gen/textureGather/9a6358.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/9a6358.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/9a6358.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/9efca2.wgsl b/test/builtins/gen/textureGather/9efca2.wgsl
new file mode 100644
index 0000000..8b48e61
--- /dev/null
+++ b/test/builtins/gen/textureGather/9efca2.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
+fn textureGather_9efca2() {
+  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_9efca2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_9efca2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_9efca2();
+}
diff --git a/test/intrinsics/gen/textureGather/9efca2.wgsl.expected.glsl b/test/builtins/gen/textureGather/9efca2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/9efca2.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/9efca2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/9efca2.wgsl.expected.hlsl b/test/builtins/gen/textureGather/9efca2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/9efca2.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/9efca2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/9efca2.wgsl.expected.msl b/test/builtins/gen/textureGather/9efca2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/9efca2.wgsl.expected.msl
rename to test/builtins/gen/textureGather/9efca2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/9efca2.wgsl.expected.spvasm b/test/builtins/gen/textureGather/9efca2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/9efca2.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/9efca2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/9efca2.wgsl.expected.wgsl b/test/builtins/gen/textureGather/9efca2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/9efca2.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/9efca2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/bd0b1e.wgsl b/test/builtins/gen/textureGather/bd0b1e.wgsl
new file mode 100644
index 0000000..892c997
--- /dev/null
+++ b/test/builtins/gen/textureGather/bd0b1e.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+fn textureGather_bd0b1e() {
+  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_bd0b1e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_bd0b1e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_bd0b1e();
+}
diff --git a/test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.glsl b/test/builtins/gen/textureGather/bd0b1e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/bd0b1e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.hlsl b/test/builtins/gen/textureGather/bd0b1e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/bd0b1e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.msl b/test/builtins/gen/textureGather/bd0b1e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.msl
rename to test/builtins/gen/textureGather/bd0b1e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.spvasm b/test/builtins/gen/textureGather/bd0b1e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/bd0b1e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.wgsl b/test/builtins/gen/textureGather/bd0b1e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/bd0b1e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/c409ae.wgsl b/test/builtins/gen/textureGather/c409ae.wgsl
new file mode 100644
index 0000000..d37b2a4
--- /dev/null
+++ b/test/builtins/gen/textureGather/c409ae.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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 textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
+fn textureGather_c409ae() {
+  var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_c409ae();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_c409ae();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_c409ae();
+}
diff --git a/test/intrinsics/gen/textureGather/c409ae.wgsl.expected.glsl b/test/builtins/gen/textureGather/c409ae.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/c409ae.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/c409ae.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/c409ae.wgsl.expected.hlsl b/test/builtins/gen/textureGather/c409ae.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/c409ae.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/c409ae.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/c409ae.wgsl.expected.msl b/test/builtins/gen/textureGather/c409ae.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/c409ae.wgsl.expected.msl
rename to test/builtins/gen/textureGather/c409ae.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/c409ae.wgsl.expected.spvasm b/test/builtins/gen/textureGather/c409ae.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/c409ae.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/c409ae.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/c409ae.wgsl.expected.wgsl b/test/builtins/gen/textureGather/c409ae.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/c409ae.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/c409ae.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/c55822.wgsl b/test/builtins/gen/textureGather/c55822.wgsl
new file mode 100644
index 0000000..2cebaac
--- /dev/null
+++ b/test/builtins/gen/textureGather/c55822.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<i32>
+fn textureGather_c55822() {
+  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_c55822();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_c55822();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_c55822();
+}
diff --git a/test/intrinsics/gen/textureGather/c55822.wgsl.expected.glsl b/test/builtins/gen/textureGather/c55822.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/c55822.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/c55822.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/c55822.wgsl.expected.hlsl b/test/builtins/gen/textureGather/c55822.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/c55822.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/c55822.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/c55822.wgsl.expected.msl b/test/builtins/gen/textureGather/c55822.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/c55822.wgsl.expected.msl
rename to test/builtins/gen/textureGather/c55822.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/c55822.wgsl.expected.spvasm b/test/builtins/gen/textureGather/c55822.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/c55822.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/c55822.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/c55822.wgsl.expected.wgsl b/test/builtins/gen/textureGather/c55822.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/c55822.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/c55822.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/e1b67d.wgsl b/test/builtins/gen/textureGather/e1b67d.wgsl
new file mode 100644
index 0000000..9341319
--- /dev/null
+++ b/test/builtins/gen/textureGather/e1b67d.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32>
+fn textureGather_e1b67d() {
+  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_e1b67d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_e1b67d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_e1b67d();
+}
diff --git a/test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.glsl b/test/builtins/gen/textureGather/e1b67d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/e1b67d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.hlsl b/test/builtins/gen/textureGather/e1b67d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/e1b67d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.msl b/test/builtins/gen/textureGather/e1b67d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.msl
rename to test/builtins/gen/textureGather/e1b67d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.spvasm b/test/builtins/gen/textureGather/e1b67d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/e1b67d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.wgsl b/test/builtins/gen/textureGather/e1b67d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/e1b67d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/e9eff6.wgsl b/test/builtins/gen/textureGather/e9eff6.wgsl
new file mode 100644
index 0000000..bccabe3
--- /dev/null
+++ b/test/builtins/gen/textureGather/e9eff6.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>) -> vec4<u32>
+fn textureGather_e9eff6() {
+  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_e9eff6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_e9eff6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_e9eff6();
+}
diff --git a/test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.glsl b/test/builtins/gen/textureGather/e9eff6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/e9eff6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.hlsl b/test/builtins/gen/textureGather/e9eff6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/e9eff6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.msl b/test/builtins/gen/textureGather/e9eff6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.msl
rename to test/builtins/gen/textureGather/e9eff6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.spvasm b/test/builtins/gen/textureGather/e9eff6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/e9eff6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.wgsl b/test/builtins/gen/textureGather/e9eff6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/e9eff6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/f5f3ba.wgsl b/test/builtins/gen/textureGather/f5f3ba.wgsl
new file mode 100644
index 0000000..1d83ce1
--- /dev/null
+++ b/test/builtins/gen/textureGather/f5f3ba.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<u32>
+fn textureGather_f5f3ba() {
+  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_f5f3ba();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_f5f3ba();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_f5f3ba();
+}
diff --git a/test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.glsl b/test/builtins/gen/textureGather/f5f3ba.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/f5f3ba.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.hlsl b/test/builtins/gen/textureGather/f5f3ba.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/f5f3ba.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.msl b/test/builtins/gen/textureGather/f5f3ba.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.msl
rename to test/builtins/gen/textureGather/f5f3ba.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.spvasm b/test/builtins/gen/textureGather/f5f3ba.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/f5f3ba.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.wgsl b/test/builtins/gen/textureGather/f5f3ba.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/f5f3ba.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGather/f7995a.wgsl b/test/builtins/gen/textureGather/f7995a.wgsl
new file mode 100644
index 0000000..2960054
--- /dev/null
+++ b/test/builtins/gen/textureGather/f7995a.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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(component: i32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32>
+fn textureGather_f7995a() {
+  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_f7995a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGather_f7995a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGather_f7995a();
+}
diff --git a/test/intrinsics/gen/textureGather/f7995a.wgsl.expected.glsl b/test/builtins/gen/textureGather/f7995a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/f7995a.wgsl.expected.glsl
rename to test/builtins/gen/textureGather/f7995a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGather/f7995a.wgsl.expected.hlsl b/test/builtins/gen/textureGather/f7995a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/f7995a.wgsl.expected.hlsl
rename to test/builtins/gen/textureGather/f7995a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGather/f7995a.wgsl.expected.msl b/test/builtins/gen/textureGather/f7995a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGather/f7995a.wgsl.expected.msl
rename to test/builtins/gen/textureGather/f7995a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGather/f7995a.wgsl.expected.spvasm b/test/builtins/gen/textureGather/f7995a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGather/f7995a.wgsl.expected.spvasm
rename to test/builtins/gen/textureGather/f7995a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGather/f7995a.wgsl.expected.wgsl b/test/builtins/gen/textureGather/f7995a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGather/f7995a.wgsl.expected.wgsl
rename to test/builtins/gen/textureGather/f7995a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGatherCompare/182fd4.wgsl b/test/builtins/gen/textureGatherCompare/182fd4.wgsl
new file mode 100644
index 0000000..c62de56
--- /dev/null
+++ b/test/builtins/gen/textureGatherCompare/182fd4.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_182fd4() {
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_182fd4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGatherCompare_182fd4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_182fd4();
+}
diff --git a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.glsl b/test/builtins/gen/textureGatherCompare/182fd4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.glsl
rename to test/builtins/gen/textureGatherCompare/182fd4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.hlsl b/test/builtins/gen/textureGatherCompare/182fd4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.hlsl
rename to test/builtins/gen/textureGatherCompare/182fd4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.msl b/test/builtins/gen/textureGatherCompare/182fd4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.msl
rename to test/builtins/gen/textureGatherCompare/182fd4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.spvasm b/test/builtins/gen/textureGatherCompare/182fd4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.spvasm
rename to test/builtins/gen/textureGatherCompare/182fd4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.wgsl b/test/builtins/gen/textureGatherCompare/182fd4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.wgsl
rename to test/builtins/gen/textureGatherCompare/182fd4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGatherCompare/60d2d1.wgsl b/test/builtins/gen/textureGatherCompare/60d2d1.wgsl
new file mode 100644
index 0000000..5baa378
--- /dev/null
+++ b/test/builtins/gen/textureGatherCompare/60d2d1.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_60d2d1() {
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_60d2d1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGatherCompare_60d2d1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_60d2d1();
+}
diff --git a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.glsl b/test/builtins/gen/textureGatherCompare/60d2d1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.glsl
rename to test/builtins/gen/textureGatherCompare/60d2d1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.hlsl b/test/builtins/gen/textureGatherCompare/60d2d1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.hlsl
rename to test/builtins/gen/textureGatherCompare/60d2d1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.msl b/test/builtins/gen/textureGatherCompare/60d2d1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.msl
rename to test/builtins/gen/textureGatherCompare/60d2d1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.spvasm b/test/builtins/gen/textureGatherCompare/60d2d1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.spvasm
rename to test/builtins/gen/textureGatherCompare/60d2d1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.wgsl b/test/builtins/gen/textureGatherCompare/60d2d1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.wgsl
rename to test/builtins/gen/textureGatherCompare/60d2d1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGatherCompare/6d9352.wgsl b/test/builtins/gen/textureGatherCompare/6d9352.wgsl
new file mode 100644
index 0000000..e9edc14
--- /dev/null
+++ b/test/builtins/gen/textureGatherCompare/6d9352.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_6d9352() {
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_6d9352();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGatherCompare_6d9352();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_6d9352();
+}
diff --git a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.glsl b/test/builtins/gen/textureGatherCompare/6d9352.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.glsl
rename to test/builtins/gen/textureGatherCompare/6d9352.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.hlsl b/test/builtins/gen/textureGatherCompare/6d9352.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.hlsl
rename to test/builtins/gen/textureGatherCompare/6d9352.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.msl b/test/builtins/gen/textureGatherCompare/6d9352.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.msl
rename to test/builtins/gen/textureGatherCompare/6d9352.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.spvasm b/test/builtins/gen/textureGatherCompare/6d9352.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.spvasm
rename to test/builtins/gen/textureGatherCompare/6d9352.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.wgsl b/test/builtins/gen/textureGatherCompare/6d9352.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.wgsl
rename to test/builtins/gen/textureGatherCompare/6d9352.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGatherCompare/6f1267.wgsl b/test/builtins/gen/textureGatherCompare/6f1267.wgsl
new file mode 100644
index 0000000..19e744d
--- /dev/null
+++ b/test/builtins/gen/textureGatherCompare/6f1267.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, depth_ref: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureGatherCompare_6f1267() {
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_6f1267();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGatherCompare_6f1267();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_6f1267();
+}
diff --git a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.glsl b/test/builtins/gen/textureGatherCompare/6f1267.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.glsl
rename to test/builtins/gen/textureGatherCompare/6f1267.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.hlsl b/test/builtins/gen/textureGatherCompare/6f1267.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.hlsl
rename to test/builtins/gen/textureGatherCompare/6f1267.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.msl b/test/builtins/gen/textureGatherCompare/6f1267.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.msl
rename to test/builtins/gen/textureGatherCompare/6f1267.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.spvasm b/test/builtins/gen/textureGatherCompare/6f1267.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.spvasm
rename to test/builtins/gen/textureGatherCompare/6f1267.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.wgsl b/test/builtins/gen/textureGatherCompare/6f1267.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.wgsl
rename to test/builtins/gen/textureGatherCompare/6f1267.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGatherCompare/783e65.wgsl b/test/builtins/gen/textureGatherCompare/783e65.wgsl
new file mode 100644
index 0000000..7801019
--- /dev/null
+++ b/test/builtins/gen/textureGatherCompare/783e65.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_783e65() {
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_783e65();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGatherCompare_783e65();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_783e65();
+}
diff --git a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.glsl b/test/builtins/gen/textureGatherCompare/783e65.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.glsl
rename to test/builtins/gen/textureGatherCompare/783e65.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.hlsl b/test/builtins/gen/textureGatherCompare/783e65.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.hlsl
rename to test/builtins/gen/textureGatherCompare/783e65.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.msl b/test/builtins/gen/textureGatherCompare/783e65.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.msl
rename to test/builtins/gen/textureGatherCompare/783e65.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.spvasm b/test/builtins/gen/textureGatherCompare/783e65.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.spvasm
rename to test/builtins/gen/textureGatherCompare/783e65.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.wgsl b/test/builtins/gen/textureGatherCompare/783e65.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.wgsl
rename to test/builtins/gen/textureGatherCompare/783e65.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureGatherCompare/a5f587.wgsl b/test/builtins/gen/textureGatherCompare/a5f587.wgsl
new file mode 100644
index 0000000..fe285c7
--- /dev/null
+++ b/test/builtins/gen/textureGatherCompare/a5f587.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureGatherCompare_a5f587() {
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_a5f587();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureGatherCompare_a5f587();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_a5f587();
+}
diff --git a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.glsl b/test/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.glsl
rename to test/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.hlsl b/test/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.hlsl
rename to test/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.msl b/test/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.msl
rename to test/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.spvasm b/test/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.spvasm
rename to test/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.wgsl b/test/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.wgsl
rename to test/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/19cf87.wgsl b/test/builtins/gen/textureLoad/19cf87.wgsl
new file mode 100644
index 0000000..9d91de0
--- /dev/null
+++ b/test/builtins/gen/textureLoad/19cf87.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32
+fn textureLoad_19cf87() {
+  var res: f32 = textureLoad(arg_0, vec2<i32>(), 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_19cf87();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_19cf87();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_19cf87();
+}
diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.glsl b/test/builtins/gen/textureLoad/19cf87.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/19cf87.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/19cf87.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/19cf87.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.msl b/test/builtins/gen/textureLoad/19cf87.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/19cf87.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/19cf87.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/19cf87.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/19cf87.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/19cf87.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/1b8588.wgsl b/test/builtins/gen/textureLoad/1b8588.wgsl
new file mode 100644
index 0000000..ba23838
--- /dev/null
+++ b/test/builtins/gen/textureLoad/1b8588.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureLoad(texture: texture_1d<u32>, coords: i32, level: i32) -> vec4<u32>
+fn textureLoad_1b8588() {
+  var res: vec4<u32> = textureLoad(arg_0, 1, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1b8588();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_1b8588();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1b8588();
+}
diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.glsl b/test/builtins/gen/textureLoad/1b8588.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/1b8588.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/1b8588.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/1b8588.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.msl b/test/builtins/gen/textureLoad/1b8588.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/1b8588.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/1b8588.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/1b8588.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/1b8588.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/1b8588.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/1f2016.wgsl b/test/builtins/gen/textureLoad/1f2016.wgsl
new file mode 100644
index 0000000..64354c3
--- /dev/null
+++ b/test/builtins/gen/textureLoad/1f2016.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureLoad(texture: texture_3d<f32>, coords: vec3<i32>, level: i32) -> vec4<f32>
+fn textureLoad_1f2016() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(), 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1f2016();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_1f2016();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1f2016();
+}
diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.glsl b/test/builtins/gen/textureLoad/1f2016.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/1f2016.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/1f2016.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/1f2016.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.msl b/test/builtins/gen/textureLoad/1f2016.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/1f2016.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/1f2016.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/1f2016.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/1f2016.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/1f2016.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/484344.wgsl b/test/builtins/gen/textureLoad/484344.wgsl
new file mode 100644
index 0000000..b82bb67
--- /dev/null
+++ b/test/builtins/gen/textureLoad/484344.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureLoad(texture: texture_2d<f32>, coords: vec2<i32>, level: i32) -> vec4<f32>
+fn textureLoad_484344() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_484344();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_484344();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_484344();
+}
diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.glsl b/test/builtins/gen/textureLoad/484344.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/484344.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/484344.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/484344.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/484344.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/484344.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.msl b/test/builtins/gen/textureLoad/484344.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/484344.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/484344.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/484344.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/484344.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/484344.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/484344.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/484344.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/484344.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/4fd803.wgsl b/test/builtins/gen/textureLoad/4fd803.wgsl
new file mode 100644
index 0000000..34fac87
--- /dev/null
+++ b/test/builtins/gen/textureLoad/4fd803.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureLoad(texture: texture_3d<i32>, coords: vec3<i32>, level: i32) -> vec4<i32>
+fn textureLoad_4fd803() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(), 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4fd803();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_4fd803();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4fd803();
+}
diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.glsl b/test/builtins/gen/textureLoad/4fd803.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/4fd803.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/4fd803.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/4fd803.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.msl b/test/builtins/gen/textureLoad/4fd803.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/4fd803.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/4fd803.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/4fd803.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/4fd803.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/4fd803.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/5a2f9d.wgsl b/test/builtins/gen/textureLoad/5a2f9d.wgsl
new file mode 100644
index 0000000..f03d92c
--- /dev/null
+++ b/test/builtins/gen/textureLoad/5a2f9d.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureLoad(texture: texture_1d<i32>, coords: i32, level: i32) -> vec4<i32>
+fn textureLoad_5a2f9d() {
+  var res: vec4<i32> = textureLoad(arg_0, 1, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5a2f9d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_5a2f9d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5a2f9d();
+}
diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.glsl b/test/builtins/gen/textureLoad/5a2f9d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/5a2f9d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/5a2f9d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/5a2f9d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.msl b/test/builtins/gen/textureLoad/5a2f9d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/5a2f9d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/5a2f9d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/5a2f9d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/5a2f9d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/5a2f9d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/6154d4.wgsl b/test/builtins/gen/textureLoad/6154d4.wgsl
new file mode 100644
index 0000000..1d4e4b1
--- /dev/null
+++ b/test/builtins/gen/textureLoad/6154d4.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureLoad(texture: texture_2d<u32>, coords: vec2<i32>, level: i32) -> vec4<u32>
+fn textureLoad_6154d4() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6154d4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_6154d4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6154d4();
+}
diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.glsl b/test/builtins/gen/textureLoad/6154d4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/6154d4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/6154d4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/6154d4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.msl b/test/builtins/gen/textureLoad/6154d4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/6154d4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/6154d4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/6154d4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/6154d4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/6154d4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/6273b1.wgsl b/test/builtins/gen/textureLoad/6273b1.wgsl
new file mode 100644
index 0000000..0ae2f4e
--- /dev/null
+++ b/test/builtins/gen/textureLoad/6273b1.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, sample_index: i32) -> f32
+fn textureLoad_6273b1() {
+  var res: f32 = textureLoad(arg_0, vec2<i32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6273b1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_6273b1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6273b1();
+}
diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.glsl b/test/builtins/gen/textureLoad/6273b1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/6273b1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/6273b1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/6273b1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.msl b/test/builtins/gen/textureLoad/6273b1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/6273b1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/6273b1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/6273b1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/6273b1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/6273b1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/79e697.wgsl b/test/builtins/gen/textureLoad/79e697.wgsl
new file mode 100644
index 0000000..3104323
--- /dev/null
+++ b/test/builtins/gen/textureLoad/79e697.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, array_index: i32, level: i32) -> vec4<i32>
+fn textureLoad_79e697() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_79e697();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_79e697();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_79e697();
+}
diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.glsl b/test/builtins/gen/textureLoad/79e697.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/79e697.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/79e697.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/79e697.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/79e697.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/79e697.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.msl b/test/builtins/gen/textureLoad/79e697.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/79e697.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/79e697.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/79e697.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/79e697.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/79e697.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/79e697.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/79e697.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/79e697.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/7c90e5.wgsl b/test/builtins/gen/textureLoad/7c90e5.wgsl
new file mode 100644
index 0000000..54a7a17
--- /dev/null
+++ b/test/builtins/gen/textureLoad/7c90e5.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, array_index: i32, level: i32) -> vec4<u32>
+fn textureLoad_7c90e5() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_7c90e5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_7c90e5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_7c90e5();
+}
diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.glsl b/test/builtins/gen/textureLoad/7c90e5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/7c90e5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/7c90e5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/7c90e5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.msl b/test/builtins/gen/textureLoad/7c90e5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/7c90e5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/7c90e5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/7c90e5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/7c90e5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/7c90e5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/81c381.wgsl b/test/builtins/gen/textureLoad/81c381.wgsl
new file mode 100644
index 0000000..7bcc8cd
--- /dev/null
+++ b/test/builtins/gen/textureLoad/81c381.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureLoad(texture: texture_1d<f32>, coords: i32, level: i32) -> vec4<f32>
+fn textureLoad_81c381() {
+  var res: vec4<f32> = textureLoad(arg_0, 1, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_81c381();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_81c381();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_81c381();
+}
diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.glsl b/test/builtins/gen/textureLoad/81c381.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/81c381.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/81c381.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/81c381.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/81c381.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/81c381.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.msl b/test/builtins/gen/textureLoad/81c381.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/81c381.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/81c381.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/81c381.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/81c381.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/81c381.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/81c381.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/81c381.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/81c381.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/87be85.wgsl b/test/builtins/gen/textureLoad/87be85.wgsl
new file mode 100644
index 0000000..5317dab
--- /dev/null
+++ b/test/builtins/gen/textureLoad/87be85.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, array_index: i32, level: i32) -> vec4<f32>
+fn textureLoad_87be85() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_87be85();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_87be85();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_87be85();
+}
diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.glsl b/test/builtins/gen/textureLoad/87be85.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/87be85.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/87be85.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/87be85.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/87be85.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/87be85.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.msl b/test/builtins/gen/textureLoad/87be85.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/87be85.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/87be85.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/87be85.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/87be85.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/87be85.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/87be85.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/87be85.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/87be85.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/8acf41.wgsl b/test/builtins/gen/textureLoad/8acf41.wgsl
new file mode 100644
index 0000000..02bcc10
--- /dev/null
+++ b/test/builtins/gen/textureLoad/8acf41.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_external;
+
+// fn textureLoad(texture: texture_external, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_8acf41() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8acf41();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_8acf41();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8acf41();
+}
diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.glsl b/test/builtins/gen/textureLoad/8acf41.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/8acf41.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/8acf41.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/8acf41.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.msl b/test/builtins/gen/textureLoad/8acf41.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/8acf41.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/8acf41.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/8acf41.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/8acf41.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/8acf41.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/9b2667.wgsl b/test/builtins/gen/textureLoad/9b2667.wgsl
new file mode 100644
index 0000000..df70318
--- /dev/null
+++ b/test/builtins/gen/textureLoad/9b2667.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, array_index: i32, level: i32) -> f32
+fn textureLoad_9b2667() {
+  var res: f32 = textureLoad(arg_0, vec2<i32>(), 1, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9b2667();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_9b2667();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9b2667();
+}
diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.glsl b/test/builtins/gen/textureLoad/9b2667.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/9b2667.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/9b2667.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/9b2667.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.msl b/test/builtins/gen/textureLoad/9b2667.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/9b2667.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/9b2667.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/9b2667.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/9b2667.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/9b2667.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/a583c9.wgsl b/test/builtins/gen/textureLoad/a583c9.wgsl
new file mode 100644
index 0000000..1c8e21d
--- /dev/null
+++ b/test/builtins/gen/textureLoad/a583c9.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, sample_index: i32) -> vec4<f32>
+fn textureLoad_a583c9() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a583c9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_a583c9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a583c9();
+}
diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.glsl b/test/builtins/gen/textureLoad/a583c9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/a583c9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/a583c9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/a583c9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.msl b/test/builtins/gen/textureLoad/a583c9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/a583c9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/a583c9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/a583c9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/a583c9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/a583c9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/a9a9f5.wgsl b/test/builtins/gen/textureLoad/a9a9f5.wgsl
new file mode 100644
index 0000000..83d4755
--- /dev/null
+++ b/test/builtins/gen/textureLoad/a9a9f5.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureLoad(texture: texture_3d<u32>, coords: vec3<i32>, level: i32) -> vec4<u32>
+fn textureLoad_a9a9f5() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(), 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a9a9f5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_a9a9f5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a9a9f5();
+}
diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.glsl b/test/builtins/gen/textureLoad/a9a9f5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/a9a9f5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/a9a9f5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/a9a9f5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.msl b/test/builtins/gen/textureLoad/a9a9f5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/a9a9f5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/a9a9f5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/a9a9f5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/a9a9f5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/a9a9f5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/c2a480.wgsl b/test/builtins/gen/textureLoad/c2a480.wgsl
new file mode 100644
index 0000000..cc70b1a
--- /dev/null
+++ b/test/builtins/gen/textureLoad/c2a480.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureLoad(texture: texture_2d<i32>, coords: vec2<i32>, level: i32) -> vec4<i32>
+fn textureLoad_c2a480() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c2a480();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_c2a480();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c2a480();
+}
diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.glsl b/test/builtins/gen/textureLoad/c2a480.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/c2a480.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/c2a480.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/c2a480.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.msl b/test/builtins/gen/textureLoad/c2a480.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/c2a480.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/c2a480.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/c2a480.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/c2a480.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/c2a480.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/c378ee.wgsl b/test/builtins/gen/textureLoad/c378ee.wgsl
new file mode 100644
index 0000000..3c34a60
--- /dev/null
+++ b/test/builtins/gen/textureLoad/c378ee.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, sample_index: i32) -> vec4<u32>
+fn textureLoad_c378ee() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c378ee();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_c378ee();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c378ee();
+}
diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.glsl b/test/builtins/gen/textureLoad/c378ee.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/c378ee.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/c378ee.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/c378ee.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.msl b/test/builtins/gen/textureLoad/c378ee.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/c378ee.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/c378ee.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/c378ee.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/c378ee.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/c378ee.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureLoad/e3d2cc.wgsl b/test/builtins/gen/textureLoad/e3d2cc.wgsl
new file mode 100644
index 0000000..bc5ddf7
--- /dev/null
+++ b/test/builtins/gen/textureLoad/e3d2cc.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, sample_index: i32) -> vec4<i32>
+fn textureLoad_e3d2cc() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e3d2cc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureLoad_e3d2cc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e3d2cc();
+}
diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.glsl b/test/builtins/gen/textureLoad/e3d2cc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.glsl
rename to test/builtins/gen/textureLoad/e3d2cc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.hlsl b/test/builtins/gen/textureLoad/e3d2cc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.hlsl
rename to test/builtins/gen/textureLoad/e3d2cc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.msl b/test/builtins/gen/textureLoad/e3d2cc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.msl
rename to test/builtins/gen/textureLoad/e3d2cc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.spvasm b/test/builtins/gen/textureLoad/e3d2cc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.spvasm
rename to test/builtins/gen/textureLoad/e3d2cc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.wgsl b/test/builtins/gen/textureLoad/e3d2cc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.wgsl
rename to test/builtins/gen/textureLoad/e3d2cc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/024820.wgsl b/test/builtins/gen/textureNumLayers/024820.wgsl
new file mode 100644
index 0000000..c812b9d
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/024820.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureNumLayers(texture: texture_2d_array<f32>) -> i32
+fn textureNumLayers_024820() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_024820();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_024820();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_024820();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/024820.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/024820.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/024820.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/024820.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/024820.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/024820.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/024820.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/024820.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/024820.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/024820.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/053df7.wgsl b/test/builtins/gen/textureNumLayers/053df7.wgsl
new file mode 100644
index 0000000..1322b40
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/053df7.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
+
+// fn textureNumLayers(texture: texture_cube_array<u32>) -> i32
+fn textureNumLayers_053df7() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_053df7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_053df7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_053df7();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/053df7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/053df7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/053df7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/053df7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/053df7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/053df7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/053df7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/053df7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/053df7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/053df7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/058cc3.wgsl b/test/builtins/gen/textureNumLayers/058cc3.wgsl
new file mode 100644
index 0000000..30263b7
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/058cc3.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rg32sint, write>) -> i32
+fn textureNumLayers_058cc3() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_058cc3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_058cc3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_058cc3();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/09d05d.wgsl b/test/builtins/gen/textureNumLayers/09d05d.wgsl
new file mode 100644
index 0000000..d3d8aef
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/09d05d.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba8unorm, write>) -> i32
+fn textureNumLayers_09d05d() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_09d05d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_09d05d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_09d05d();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/13b4ce.wgsl b/test/builtins/gen/textureNumLayers/13b4ce.wgsl
new file mode 100644
index 0000000..ced8911
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/13b4ce.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba32sint, write>) -> i32
+fn textureNumLayers_13b4ce() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_13b4ce();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_13b4ce();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_13b4ce();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/22e53b.wgsl b/test/builtins/gen/textureNumLayers/22e53b.wgsl
new file mode 100644
index 0000000..fee9bca
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/22e53b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<r32sint, write>) -> i32
+fn textureNumLayers_22e53b() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_22e53b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_22e53b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_22e53b();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/562013.wgsl b/test/builtins/gen/textureNumLayers/562013.wgsl
new file mode 100644
index 0000000..df02d84
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/562013.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba16float, write>) -> i32
+fn textureNumLayers_562013() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_562013();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_562013();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_562013();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/562013.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/562013.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/562013.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/562013.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/562013.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/562013.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/562013.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/562013.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/562013.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/562013.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/5d59cd.wgsl b/test/builtins/gen/textureNumLayers/5d59cd.wgsl
new file mode 100644
index 0000000..339d2f0
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/5d59cd.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+
+// fn textureNumLayers(texture: texture_cube_array<f32>) -> i32
+fn textureNumLayers_5d59cd() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_5d59cd();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_5d59cd();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_5d59cd();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/68a65b.wgsl b/test/builtins/gen/textureNumLayers/68a65b.wgsl
new file mode 100644
index 0000000..fdaf92b
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/68a65b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba32float, write>) -> i32
+fn textureNumLayers_68a65b() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_68a65b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_68a65b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_68a65b();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/778bd1.wgsl b/test/builtins/gen/textureNumLayers/778bd1.wgsl
new file mode 100644
index 0000000..a3c4ddc
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/778bd1.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+
+// fn textureNumLayers(texture: texture_depth_cube_array) -> i32
+fn textureNumLayers_778bd1() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_778bd1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_778bd1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_778bd1();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/7f1937.wgsl b/test/builtins/gen/textureNumLayers/7f1937.wgsl
new file mode 100644
index 0000000..1cbfaff
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/7f1937.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rg32float, write>) -> i32
+fn textureNumLayers_7f1937() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_7f1937();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_7f1937();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_7f1937();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/85f980.wgsl b/test/builtins/gen/textureNumLayers/85f980.wgsl
new file mode 100644
index 0000000..83d405a
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/85f980.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
+
+// fn textureNumLayers(texture: texture_cube_array<i32>) -> i32
+fn textureNumLayers_85f980() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_85f980();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_85f980();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_85f980();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/85f980.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/85f980.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/85f980.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/85f980.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/85f980.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/85f980.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/85f980.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/85f980.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/85f980.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/85f980.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/87953e.wgsl b/test/builtins/gen/textureNumLayers/87953e.wgsl
new file mode 100644
index 0000000..8fcd190
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/87953e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureNumLayers(texture: texture_2d_array<u32>) -> i32
+fn textureNumLayers_87953e() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_87953e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_87953e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_87953e();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/87953e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/87953e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/87953e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/87953e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/87953e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/87953e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/87953e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/87953e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/87953e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/87953e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/893e7c.wgsl b/test/builtins/gen/textureNumLayers/893e7c.wgsl
new file mode 100644
index 0000000..f583a9f
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/893e7c.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureNumLayers(texture: texture_2d_array<i32>) -> i32
+fn textureNumLayers_893e7c() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_893e7c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_893e7c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_893e7c();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/9700fb.wgsl b/test/builtins/gen/textureNumLayers/9700fb.wgsl
new file mode 100644
index 0000000..07d1e40
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/9700fb.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba16uint, write>) -> i32
+fn textureNumLayers_9700fb() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_9700fb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_9700fb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_9700fb();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/a216d2.wgsl b/test/builtins/gen/textureNumLayers/a216d2.wgsl
new file mode 100644
index 0000000..991471e
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/a216d2.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba8sint, write>) -> i32
+fn textureNumLayers_a216d2() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_a216d2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_a216d2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_a216d2();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/cd5dc8.wgsl b/test/builtins/gen/textureNumLayers/cd5dc8.wgsl
new file mode 100644
index 0000000..8351f88
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/cd5dc8.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba32uint, write>) -> i32
+fn textureNumLayers_cd5dc8() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_cd5dc8();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_cd5dc8();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_cd5dc8();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/d5b228.wgsl b/test/builtins/gen/textureNumLayers/d5b228.wgsl
new file mode 100644
index 0000000..ee873c1
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/d5b228.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<r32float, write>) -> i32
+fn textureNumLayers_d5b228() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_d5b228();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_d5b228();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_d5b228();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/e31be1.wgsl b/test/builtins/gen/textureNumLayers/e31be1.wgsl
new file mode 100644
index 0000000..4c3a5ee
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/e31be1.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba8snorm, write>) -> i32
+fn textureNumLayers_e31be1() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_e31be1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_e31be1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_e31be1();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/e653c0.wgsl b/test/builtins/gen/textureNumLayers/e653c0.wgsl
new file mode 100644
index 0000000..d033b73
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/e653c0.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureNumLayers(texture: texture_depth_2d_array) -> i32
+fn textureNumLayers_e653c0() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_e653c0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_e653c0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_e653c0();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/ee942f.wgsl b/test/builtins/gen/textureNumLayers/ee942f.wgsl
new file mode 100644
index 0000000..b995bd8
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/ee942f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<r32uint, write>) -> i32
+fn textureNumLayers_ee942f() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_ee942f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_ee942f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_ee942f();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/f33005.wgsl b/test/builtins/gen/textureNumLayers/f33005.wgsl
new file mode 100644
index 0000000..38c5eff
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/f33005.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba16sint, write>) -> i32
+fn textureNumLayers_f33005() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_f33005();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_f33005();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_f33005();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/f33005.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/f33005.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/f33005.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/f33005.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/f33005.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/f33005.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/f33005.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/f33005.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/f33005.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/f33005.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/fcec98.wgsl b/test/builtins/gen/textureNumLayers/fcec98.wgsl
new file mode 100644
index 0000000..845f7cb
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/fcec98.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rg32uint, write>) -> i32
+fn textureNumLayers_fcec98() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_fcec98();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_fcec98();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_fcec98();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLayers/ff5e89.wgsl b/test/builtins/gen/textureNumLayers/ff5e89.wgsl
new file mode 100644
index 0000000..a641eed
--- /dev/null
+++ b/test/builtins/gen/textureNumLayers/ff5e89.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba8uint, write>) -> i32
+fn textureNumLayers_ff5e89() {
+  var res: i32 = textureNumLayers(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_ff5e89();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLayers_ff5e89();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_ff5e89();
+}
diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl b/test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.msl b/test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.msl
rename to test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.spvasm b/test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.wgsl b/test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/076cb5.wgsl b/test/builtins/gen/textureNumLevels/076cb5.wgsl
new file mode 100644
index 0000000..574393a
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/076cb5.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+
+// fn textureNumLevels(texture: texture_depth_cube) -> i32
+fn textureNumLevels_076cb5() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_076cb5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_076cb5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_076cb5();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/080d95.wgsl b/test/builtins/gen/textureNumLevels/080d95.wgsl
new file mode 100644
index 0000000..31a1cc0
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/080d95.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<i32>;
+
+// fn textureNumLevels(texture: texture_cube<i32>) -> i32
+fn textureNumLevels_080d95() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_080d95();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_080d95();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_080d95();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/080d95.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/080d95.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/080d95.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/080d95.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/080d95.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/080d95.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/080d95.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/080d95.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/080d95.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/080d95.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/09ddd0.wgsl b/test/builtins/gen/textureNumLevels/09ddd0.wgsl
new file mode 100644
index 0000000..90e763b
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/09ddd0.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureNumLevels(texture: texture_2d<u32>) -> i32
+fn textureNumLevels_09ddd0() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_09ddd0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_09ddd0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_09ddd0();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/09ddd0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/09ddd0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/09ddd0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/09ddd0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/09ddd0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/09ddd0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/09ddd0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/09ddd0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/105988.wgsl b/test/builtins/gen/textureNumLevels/105988.wgsl
new file mode 100644
index 0000000..1bc80d2
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/105988.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureNumLevels(texture: texture_2d_array<f32>) -> i32
+fn textureNumLevels_105988() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_105988();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_105988();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_105988();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/105988.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/105988.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/105988.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/105988.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/105988.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/105988.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/105988.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/105988.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/105988.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/105988.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/1e6f3b.wgsl b/test/builtins/gen/textureNumLevels/1e6f3b.wgsl
new file mode 100644
index 0000000..b053b55
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/1e6f3b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureNumLevels(texture: texture_1d<u32>) -> i32
+fn textureNumLevels_1e6f3b() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_1e6f3b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_1e6f3b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_1e6f3b();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/1e6f3b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/1e6f3b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/1e6f3b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/1e6f3b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/1e6f3b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/1e6f3b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/1e6f3b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/1e6f3b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/23f750.wgsl b/test/builtins/gen/textureNumLevels/23f750.wgsl
new file mode 100644
index 0000000..8b1d5a0
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/23f750.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureNumLevels(texture: texture_2d<i32>) -> i32
+fn textureNumLevels_23f750() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_23f750();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_23f750();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_23f750();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/23f750.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/23f750.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/23f750.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/23f750.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/23f750.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/23f750.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/23f750.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/23f750.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/23f750.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/23f750.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/2c3575.wgsl b/test/builtins/gen/textureNumLevels/2c3575.wgsl
new file mode 100644
index 0000000..1b4e271
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/2c3575.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+
+// fn textureNumLevels(texture: texture_depth_cube_array) -> i32
+fn textureNumLevels_2c3575() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_2c3575();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_2c3575();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_2c3575();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/2c3575.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/2c3575.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/2c3575.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/2c3575.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/2c3575.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/2c3575.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/2c3575.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/2c3575.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/2c3575.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/2c3575.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/32a0ae.wgsl b/test/builtins/gen/textureNumLevels/32a0ae.wgsl
new file mode 100644
index 0000000..64a18fc
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/32a0ae.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureNumLevels(texture: texture_1d<i32>) -> i32
+fn textureNumLevels_32a0ae() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_32a0ae();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_32a0ae();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_32a0ae();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/32a0ae.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/32a0ae.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/32a0ae.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/32a0ae.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/32a0ae.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/32a0ae.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/32a0ae.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/32a0ae.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/5101cf.wgsl b/test/builtins/gen/textureNumLevels/5101cf.wgsl
new file mode 100644
index 0000000..c487f7a
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/5101cf.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureNumLevels(texture: texture_2d_array<u32>) -> i32
+fn textureNumLevels_5101cf() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_5101cf();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_5101cf();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_5101cf();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/5101cf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/5101cf.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/5101cf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/5101cf.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/5101cf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/5101cf.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/5101cf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/5101cf.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/5101cf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/5101cf.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/51b5bb.wgsl b/test/builtins/gen/textureNumLevels/51b5bb.wgsl
new file mode 100644
index 0000000..4697f32
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/51b5bb.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureNumLevels(texture: texture_1d<f32>) -> i32
+fn textureNumLevels_51b5bb() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_51b5bb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_51b5bb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_51b5bb();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/51b5bb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/51b5bb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/51b5bb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/51b5bb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/51b5bb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/51b5bb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/51b5bb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/51b5bb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/897aaf.wgsl b/test/builtins/gen/textureNumLevels/897aaf.wgsl
new file mode 100644
index 0000000..4416fd7
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/897aaf.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+
+// fn textureNumLevels(texture: texture_cube<f32>) -> i32
+fn textureNumLevels_897aaf() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_897aaf();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_897aaf();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_897aaf();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/897aaf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/897aaf.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/897aaf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/897aaf.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/897aaf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/897aaf.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/897aaf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/897aaf.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/897aaf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/897aaf.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/9da7a5.wgsl b/test/builtins/gen/textureNumLevels/9da7a5.wgsl
new file mode 100644
index 0000000..922f518
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/9da7a5.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureNumLevels(texture: texture_3d<i32>) -> i32
+fn textureNumLevels_9da7a5() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_9da7a5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_9da7a5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_9da7a5();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/9da7a5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/9da7a5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/9da7a5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/9da7a5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/9da7a5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/9da7a5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/9da7a5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/9da7a5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/a91c03.wgsl b/test/builtins/gen/textureNumLevels/a91c03.wgsl
new file mode 100644
index 0000000..c69f645
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/a91c03.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
+
+// fn textureNumLevels(texture: texture_cube_array<i32>) -> i32
+fn textureNumLevels_a91c03() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_a91c03();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_a91c03();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_a91c03();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/a91c03.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/a91c03.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/a91c03.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/a91c03.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/a91c03.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/a91c03.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/a91c03.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/a91c03.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/a91c03.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/a91c03.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/aee7c8.wgsl b/test/builtins/gen/textureNumLevels/aee7c8.wgsl
new file mode 100644
index 0000000..6f1ca33
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/aee7c8.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+
+// fn textureNumLevels(texture: texture_cube_array<f32>) -> i32
+fn textureNumLevels_aee7c8() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_aee7c8();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_aee7c8();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_aee7c8();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/aee7c8.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/aee7c8.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/aee7c8.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/aee7c8.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/aee7c8.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/aee7c8.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/aee7c8.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/aee7c8.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/b1b12b.wgsl b/test/builtins/gen/textureNumLevels/b1b12b.wgsl
new file mode 100644
index 0000000..b2cfd09
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/b1b12b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureNumLevels(texture: texture_depth_2d) -> i32
+fn textureNumLevels_b1b12b() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_b1b12b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_b1b12b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_b1b12b();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/b1b12b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/b1b12b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/b1b12b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/b1b12b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/b1b12b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/b1b12b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/b1b12b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/b1b12b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/b4f5ea.wgsl b/test/builtins/gen/textureNumLevels/b4f5ea.wgsl
new file mode 100644
index 0000000..b83d5d1
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/b4f5ea.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureNumLevels(texture: texture_3d<u32>) -> i32
+fn textureNumLevels_b4f5ea() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_b4f5ea();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_b4f5ea();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_b4f5ea();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/b4f5ea.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/b4f5ea.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/b4f5ea.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/b4f5ea.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/b4f5ea.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/b4f5ea.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/b4f5ea.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/b4f5ea.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/d004a9.wgsl b/test/builtins/gen/textureNumLevels/d004a9.wgsl
new file mode 100644
index 0000000..11cd5ec
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/d004a9.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureNumLevels(texture: texture_2d_array<i32>) -> i32
+fn textureNumLevels_d004a9() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_d004a9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_d004a9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_d004a9();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/d004a9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/d004a9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/d004a9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/d004a9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/d004a9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/d004a9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/d004a9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/d004a9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/d004a9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/d004a9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/dca09e.wgsl b/test/builtins/gen/textureNumLevels/dca09e.wgsl
new file mode 100644
index 0000000..69431a6
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/dca09e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureNumLevels(texture: texture_3d<f32>) -> i32
+fn textureNumLevels_dca09e() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_dca09e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_dca09e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_dca09e();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/dca09e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/dca09e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/dca09e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/dca09e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/dca09e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/dca09e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/dca09e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/dca09e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/dca09e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/dca09e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/e67231.wgsl b/test/builtins/gen/textureNumLevels/e67231.wgsl
new file mode 100644
index 0000000..1f965ba
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/e67231.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureNumLevels(texture: texture_2d<f32>) -> i32
+fn textureNumLevels_e67231() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_e67231();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_e67231();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_e67231();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/e67231.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/e67231.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/e67231.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/e67231.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/e67231.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/e67231.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/e67231.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/e67231.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/e67231.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/e67231.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/ed078b.wgsl b/test/builtins/gen/textureNumLevels/ed078b.wgsl
new file mode 100644
index 0000000..d9a8320
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/ed078b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<u32>;
+
+// fn textureNumLevels(texture: texture_cube<u32>) -> i32
+fn textureNumLevels_ed078b() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_ed078b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_ed078b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_ed078b();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/ed078b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/ed078b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/ed078b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/ed078b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/ed078b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/ed078b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/ed078b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/ed078b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/ed078b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/ed078b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/f46ec6.wgsl b/test/builtins/gen/textureNumLevels/f46ec6.wgsl
new file mode 100644
index 0000000..ed727a0
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/f46ec6.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
+
+// fn textureNumLevels(texture: texture_cube_array<u32>) -> i32
+fn textureNumLevels_f46ec6() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_f46ec6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_f46ec6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_f46ec6();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/f46ec6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/f46ec6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/f46ec6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/f46ec6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/f46ec6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/f46ec6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/f46ec6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/f46ec6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumLevels/f5828d.wgsl b/test/builtins/gen/textureNumLevels/f5828d.wgsl
new file mode 100644
index 0000000..3619b7c
--- /dev/null
+++ b/test/builtins/gen/textureNumLevels/f5828d.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureNumLevels(texture: texture_depth_2d_array) -> i32
+fn textureNumLevels_f5828d() {
+  var res: i32 = textureNumLevels(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLevels_f5828d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumLevels_f5828d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumLevels_f5828d();
+}
diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/f5828d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.glsl
rename to test/builtins/gen/textureNumLevels/f5828d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.hlsl b/test/builtins/gen/textureNumLevels/f5828d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumLevels/f5828d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.msl b/test/builtins/gen/textureNumLevels/f5828d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.msl
rename to test/builtins/gen/textureNumLevels/f5828d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.spvasm b/test/builtins/gen/textureNumLevels/f5828d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumLevels/f5828d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.wgsl b/test/builtins/gen/textureNumLevels/f5828d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumLevels/f5828d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumSamples/2c6f14.wgsl b/test/builtins/gen/textureNumSamples/2c6f14.wgsl
new file mode 100644
index 0000000..327bfce
--- /dev/null
+++ b/test/builtins/gen/textureNumSamples/2c6f14.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<f32>;
+
+// fn textureNumSamples(texture: texture_multisampled_2d<f32>) -> i32
+fn textureNumSamples_2c6f14() {
+  var res: i32 = textureNumSamples(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumSamples_2c6f14();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumSamples_2c6f14();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumSamples_2c6f14();
+}
diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.glsl b/test/builtins/gen/textureNumSamples/2c6f14.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.glsl
rename to test/builtins/gen/textureNumSamples/2c6f14.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl b/test/builtins/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.msl b/test/builtins/gen/textureNumSamples/2c6f14.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.msl
rename to test/builtins/gen/textureNumSamples/2c6f14.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.spvasm b/test/builtins/gen/textureNumSamples/2c6f14.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumSamples/2c6f14.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.wgsl b/test/builtins/gen/textureNumSamples/2c6f14.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumSamples/2c6f14.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumSamples/42f8bb.wgsl b/test/builtins/gen/textureNumSamples/42f8bb.wgsl
new file mode 100644
index 0000000..3e64edd
--- /dev/null
+++ b/test/builtins/gen/textureNumSamples/42f8bb.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<u32>;
+
+// fn textureNumSamples(texture: texture_multisampled_2d<u32>) -> i32
+fn textureNumSamples_42f8bb() {
+  var res: i32 = textureNumSamples(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumSamples_42f8bb();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumSamples_42f8bb();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumSamples_42f8bb();
+}
diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.glsl b/test/builtins/gen/textureNumSamples/42f8bb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.glsl
rename to test/builtins/gen/textureNumSamples/42f8bb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl b/test/builtins/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.msl b/test/builtins/gen/textureNumSamples/42f8bb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.msl
rename to test/builtins/gen/textureNumSamples/42f8bb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.spvasm b/test/builtins/gen/textureNumSamples/42f8bb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumSamples/42f8bb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.wgsl b/test/builtins/gen/textureNumSamples/42f8bb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumSamples/42f8bb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumSamples/449d23.wgsl b/test/builtins/gen/textureNumSamples/449d23.wgsl
new file mode 100644
index 0000000..51be43a
--- /dev/null
+++ b/test/builtins/gen/textureNumSamples/449d23.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<i32>;
+
+// fn textureNumSamples(texture: texture_multisampled_2d<i32>) -> i32
+fn textureNumSamples_449d23() {
+  var res: i32 = textureNumSamples(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumSamples_449d23();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumSamples_449d23();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumSamples_449d23();
+}
diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.glsl b/test/builtins/gen/textureNumSamples/449d23.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.glsl
rename to test/builtins/gen/textureNumSamples/449d23.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.hlsl b/test/builtins/gen/textureNumSamples/449d23.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumSamples/449d23.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.msl b/test/builtins/gen/textureNumSamples/449d23.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.msl
rename to test/builtins/gen/textureNumSamples/449d23.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.spvasm b/test/builtins/gen/textureNumSamples/449d23.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumSamples/449d23.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.wgsl b/test/builtins/gen/textureNumSamples/449d23.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumSamples/449d23.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureNumSamples/a3c8a0.wgsl b/test/builtins/gen/textureNumSamples/a3c8a0.wgsl
new file mode 100644
index 0000000..f0f05fd
--- /dev/null
+++ b/test/builtins/gen/textureNumSamples/a3c8a0.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d;
+
+// fn textureNumSamples(texture: texture_depth_multisampled_2d) -> i32
+fn textureNumSamples_a3c8a0() {
+  var res: i32 = textureNumSamples(arg_0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumSamples_a3c8a0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureNumSamples_a3c8a0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureNumSamples_a3c8a0();
+}
diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.glsl b/test/builtins/gen/textureNumSamples/a3c8a0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.glsl
rename to test/builtins/gen/textureNumSamples/a3c8a0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl b/test/builtins/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl
rename to test/builtins/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.msl b/test/builtins/gen/textureNumSamples/a3c8a0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.msl
rename to test/builtins/gen/textureNumSamples/a3c8a0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.spvasm b/test/builtins/gen/textureNumSamples/a3c8a0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.spvasm
rename to test/builtins/gen/textureNumSamples/a3c8a0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.wgsl b/test/builtins/gen/textureNumSamples/a3c8a0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.wgsl
rename to test/builtins/gen/textureNumSamples/a3c8a0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/02aa9b.wgsl b/test/builtins/gen/textureSample/02aa9b.wgsl
new file mode 100644
index 0000000..f5070fc
--- /dev/null
+++ b/test/builtins/gen/textureSample/02aa9b.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, offset: vec2<i32>) -> vec4<f32>
+fn textureSample_02aa9b() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1, vec2<i32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_02aa9b();
+}
diff --git a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.glsl b/test/builtins/gen/textureSample/02aa9b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/02aa9b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.hlsl b/test/builtins/gen/textureSample/02aa9b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/02aa9b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.msl b/test/builtins/gen/textureSample/02aa9b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.msl
rename to test/builtins/gen/textureSample/02aa9b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.spvasm b/test/builtins/gen/textureSample/02aa9b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/02aa9b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.wgsl b/test/builtins/gen/textureSample/02aa9b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/02aa9b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/100dc0.wgsl b/test/builtins/gen/textureSample/100dc0.wgsl
new file mode 100644
index 0000000..3bf6d64
--- /dev/null
+++ b/test/builtins/gen/textureSample/100dc0.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, offset: vec3<i32>) -> vec4<f32>
+fn textureSample_100dc0() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), vec3<i32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_100dc0();
+}
diff --git a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.glsl b/test/builtins/gen/textureSample/100dc0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/100dc0.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/100dc0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.hlsl b/test/builtins/gen/textureSample/100dc0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/100dc0.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/100dc0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.msl b/test/builtins/gen/textureSample/100dc0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/100dc0.wgsl.expected.msl
rename to test/builtins/gen/textureSample/100dc0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.spvasm b/test/builtins/gen/textureSample/100dc0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/100dc0.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/100dc0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.wgsl b/test/builtins/gen/textureSample/100dc0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/100dc0.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/100dc0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/38bbb9.wgsl b/test/builtins/gen/textureSample/38bbb9.wgsl
new file mode 100644
index 0000000..cf78f1e
--- /dev/null
+++ b/test/builtins/gen/textureSample/38bbb9.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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 textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32
+fn textureSample_38bbb9() {
+  var res: f32 = textureSample(arg_0, arg_1, vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_38bbb9();
+}
diff --git a/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.glsl b/test/builtins/gen/textureSample/38bbb9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/38bbb9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.hlsl b/test/builtins/gen/textureSample/38bbb9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/38bbb9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.msl b/test/builtins/gen/textureSample/38bbb9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.msl
rename to test/builtins/gen/textureSample/38bbb9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.spvasm b/test/builtins/gen/textureSample/38bbb9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/38bbb9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.wgsl b/test/builtins/gen/textureSample/38bbb9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/38bbb9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/3b50bd.wgsl b/test/builtins/gen/textureSample/3b50bd.wgsl
new file mode 100644
index 0000000..1e6fcfa
--- /dev/null
+++ b/test/builtins/gen/textureSample/3b50bd.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+fn textureSample_3b50bd() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_3b50bd();
+}
diff --git a/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.glsl b/test/builtins/gen/textureSample/3b50bd.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/3b50bd.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.hlsl b/test/builtins/gen/textureSample/3b50bd.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/3b50bd.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.msl b/test/builtins/gen/textureSample/3b50bd.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.msl
rename to test/builtins/gen/textureSample/3b50bd.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.spvasm b/test/builtins/gen/textureSample/3b50bd.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/3b50bd.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.wgsl b/test/builtins/gen/textureSample/3b50bd.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/3b50bd.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/4dd1bf.wgsl b/test/builtins/gen/textureSample/4dd1bf.wgsl
new file mode 100644
index 0000000..e4d0327
--- /dev/null
+++ b/test/builtins/gen/textureSample/4dd1bf.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec4<f32>
+fn textureSample_4dd1bf() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_4dd1bf();
+}
diff --git a/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.glsl b/test/builtins/gen/textureSample/4dd1bf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/4dd1bf.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.hlsl b/test/builtins/gen/textureSample/4dd1bf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/4dd1bf.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.msl b/test/builtins/gen/textureSample/4dd1bf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.msl
rename to test/builtins/gen/textureSample/4dd1bf.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.spvasm b/test/builtins/gen/textureSample/4dd1bf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/4dd1bf.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.wgsl b/test/builtins/gen/textureSample/4dd1bf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/4dd1bf.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/51b514.wgsl b/test/builtins/gen/textureSample/51b514.wgsl
new file mode 100644
index 0000000..4c3b2da
--- /dev/null
+++ b/test/builtins/gen/textureSample/51b514.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+fn textureSample_51b514() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_51b514();
+}
diff --git a/test/intrinsics/gen/textureSample/51b514.wgsl.expected.glsl b/test/builtins/gen/textureSample/51b514.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/51b514.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/51b514.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/51b514.wgsl.expected.hlsl b/test/builtins/gen/textureSample/51b514.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/51b514.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/51b514.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/51b514.wgsl.expected.msl b/test/builtins/gen/textureSample/51b514.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/51b514.wgsl.expected.msl
rename to test/builtins/gen/textureSample/51b514.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/51b514.wgsl.expected.spvasm b/test/builtins/gen/textureSample/51b514.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/51b514.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/51b514.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/51b514.wgsl.expected.wgsl b/test/builtins/gen/textureSample/51b514.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/51b514.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/51b514.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/667d76.wgsl b/test/builtins/gen/textureSample/667d76.wgsl
new file mode 100644
index 0000000..387a0bf
--- /dev/null
+++ b/test/builtins/gen/textureSample/667d76.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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 textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> f32
+fn textureSample_667d76() {
+  var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), vec2<i32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_667d76();
+}
diff --git a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.glsl b/test/builtins/gen/textureSample/667d76.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/667d76.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/667d76.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.hlsl b/test/builtins/gen/textureSample/667d76.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/667d76.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/667d76.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.msl b/test/builtins/gen/textureSample/667d76.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/667d76.wgsl.expected.msl
rename to test/builtins/gen/textureSample/667d76.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.spvasm b/test/builtins/gen/textureSample/667d76.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/667d76.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/667d76.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.wgsl b/test/builtins/gen/textureSample/667d76.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/667d76.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/667d76.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/6717ca.wgsl b/test/builtins/gen/textureSample/6717ca.wgsl
new file mode 100644
index 0000000..85157dd
--- /dev/null
+++ b/test/builtins/gen/textureSample/6717ca.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> vec4<f32>
+fn textureSample_6717ca() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_6717ca();
+}
diff --git a/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.glsl b/test/builtins/gen/textureSample/6717ca.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/6717ca.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/6717ca.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.hlsl b/test/builtins/gen/textureSample/6717ca.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/6717ca.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/6717ca.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.msl b/test/builtins/gen/textureSample/6717ca.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/6717ca.wgsl.expected.msl
rename to test/builtins/gen/textureSample/6717ca.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.spvasm b/test/builtins/gen/textureSample/6717ca.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/6717ca.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/6717ca.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.wgsl b/test/builtins/gen/textureSample/6717ca.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/6717ca.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/6717ca.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/6e64fb.wgsl b/test/builtins/gen/textureSample/6e64fb.wgsl
new file mode 100644
index 0000000..e1277dc
--- /dev/null
+++ b/test/builtins/gen/textureSample/6e64fb.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32>
+fn textureSample_6e64fb() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, 1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_6e64fb();
+}
diff --git a/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.glsl b/test/builtins/gen/textureSample/6e64fb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/6e64fb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.hlsl b/test/builtins/gen/textureSample/6e64fb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/6e64fb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.msl b/test/builtins/gen/textureSample/6e64fb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.msl
rename to test/builtins/gen/textureSample/6e64fb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.spvasm b/test/builtins/gen/textureSample/6e64fb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/6e64fb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.wgsl b/test/builtins/gen/textureSample/6e64fb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/6e64fb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/7c3baa.wgsl b/test/builtins/gen/textureSample/7c3baa.wgsl
new file mode 100644
index 0000000..571ae07
--- /dev/null
+++ b/test/builtins/gen/textureSample/7c3baa.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
+fn textureSample_7c3baa() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), vec2<i32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_7c3baa();
+}
diff --git a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.glsl b/test/builtins/gen/textureSample/7c3baa.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/7c3baa.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.hlsl b/test/builtins/gen/textureSample/7c3baa.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/7c3baa.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.msl b/test/builtins/gen/textureSample/7c3baa.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.msl
rename to test/builtins/gen/textureSample/7c3baa.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.spvasm b/test/builtins/gen/textureSample/7c3baa.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/7c3baa.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.wgsl b/test/builtins/gen/textureSample/7c3baa.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/7c3baa.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/7e9ffd.wgsl b/test/builtins/gen/textureSample/7e9ffd.wgsl
new file mode 100644
index 0000000..f6b9fd6
--- /dev/null
+++ b/test/builtins/gen/textureSample/7e9ffd.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> f32
+fn textureSample_7e9ffd() {
+  var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_7e9ffd();
+}
diff --git a/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.glsl b/test/builtins/gen/textureSample/7e9ffd.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/7e9ffd.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.hlsl b/test/builtins/gen/textureSample/7e9ffd.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/7e9ffd.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.msl b/test/builtins/gen/textureSample/7e9ffd.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.msl
rename to test/builtins/gen/textureSample/7e9ffd.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.spvasm b/test/builtins/gen/textureSample/7e9ffd.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/7e9ffd.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.wgsl b/test/builtins/gen/textureSample/7e9ffd.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/7e9ffd.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/8522e7.wgsl b/test/builtins/gen/textureSample/8522e7.wgsl
new file mode 100644
index 0000000..2121c79
--- /dev/null
+++ b/test/builtins/gen/textureSample/8522e7.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, offset: vec2<i32>) -> f32
+fn textureSample_8522e7() {
+  var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1, vec2<i32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_8522e7();
+}
diff --git a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.glsl b/test/builtins/gen/textureSample/8522e7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/8522e7.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/8522e7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.hlsl b/test/builtins/gen/textureSample/8522e7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/8522e7.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/8522e7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.msl b/test/builtins/gen/textureSample/8522e7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/8522e7.wgsl.expected.msl
rename to test/builtins/gen/textureSample/8522e7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.spvasm b/test/builtins/gen/textureSample/8522e7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/8522e7.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/8522e7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.wgsl b/test/builtins/gen/textureSample/8522e7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/8522e7.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/8522e7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/c2f4e8.wgsl b/test/builtins/gen/textureSample/c2f4e8.wgsl
new file mode 100644
index 0000000..504966c
--- /dev/null
+++ b/test/builtins/gen/textureSample/c2f4e8.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> f32
+fn textureSample_c2f4e8() {
+  var res: f32 = textureSample(arg_0, arg_1, vec3<f32>(), 1);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_c2f4e8();
+}
diff --git a/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.glsl b/test/builtins/gen/textureSample/c2f4e8.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/c2f4e8.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.hlsl b/test/builtins/gen/textureSample/c2f4e8.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/c2f4e8.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.msl b/test/builtins/gen/textureSample/c2f4e8.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.msl
rename to test/builtins/gen/textureSample/c2f4e8.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.spvasm b/test/builtins/gen/textureSample/c2f4e8.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/c2f4e8.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.wgsl b/test/builtins/gen/textureSample/c2f4e8.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/c2f4e8.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/e53267.wgsl b/test/builtins/gen/textureSample/e53267.wgsl
new file mode 100644
index 0000000..f4611db
--- /dev/null
+++ b/test/builtins/gen/textureSample/e53267.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+fn textureSample_e53267() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_e53267();
+}
diff --git a/test/intrinsics/gen/textureSample/e53267.wgsl.expected.glsl b/test/builtins/gen/textureSample/e53267.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/e53267.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/e53267.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/e53267.wgsl.expected.hlsl b/test/builtins/gen/textureSample/e53267.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/e53267.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/e53267.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/e53267.wgsl.expected.msl b/test/builtins/gen/textureSample/e53267.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/e53267.wgsl.expected.msl
rename to test/builtins/gen/textureSample/e53267.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/e53267.wgsl.expected.spvasm b/test/builtins/gen/textureSample/e53267.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/e53267.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/e53267.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/e53267.wgsl.expected.wgsl b/test/builtins/gen/textureSample/e53267.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/e53267.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/e53267.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSample/ea7030.wgsl b/test/builtins/gen/textureSample/ea7030.wgsl
new file mode 100644
index 0000000..ae40c4e
--- /dev/null
+++ b/test/builtins/gen/textureSample/ea7030.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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 textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32
+fn textureSample_ea7030() {
+  var res: f32 = textureSample(arg_0, arg_1, vec3<f32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSample_ea7030();
+}
diff --git a/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.glsl b/test/builtins/gen/textureSample/ea7030.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/ea7030.wgsl.expected.glsl
rename to test/builtins/gen/textureSample/ea7030.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.hlsl b/test/builtins/gen/textureSample/ea7030.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/ea7030.wgsl.expected.hlsl
rename to test/builtins/gen/textureSample/ea7030.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.msl b/test/builtins/gen/textureSample/ea7030.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSample/ea7030.wgsl.expected.msl
rename to test/builtins/gen/textureSample/ea7030.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.spvasm b/test/builtins/gen/textureSample/ea7030.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSample/ea7030.wgsl.expected.spvasm
rename to test/builtins/gen/textureSample/ea7030.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.wgsl b/test/builtins/gen/textureSample/ea7030.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSample/ea7030.wgsl.expected.wgsl
rename to test/builtins/gen/textureSample/ea7030.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleBias/53b9f7.wgsl b/test/builtins/gen/textureSampleBias/53b9f7.wgsl
new file mode 100644
index 0000000..14f0a89
--- /dev/null
+++ b/test/builtins/gen/textureSampleBias/53b9f7.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
+fn textureSampleBias_53b9f7() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleBias_53b9f7();
+}
diff --git a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.glsl b/test/builtins/gen/textureSampleBias/53b9f7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleBias/53b9f7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.hlsl b/test/builtins/gen/textureSampleBias/53b9f7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleBias/53b9f7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.msl b/test/builtins/gen/textureSampleBias/53b9f7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.msl
rename to test/builtins/gen/textureSampleBias/53b9f7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.spvasm b/test/builtins/gen/textureSampleBias/53b9f7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleBias/53b9f7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.wgsl b/test/builtins/gen/textureSampleBias/53b9f7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleBias/53b9f7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleBias/65ac50.wgsl b/test/builtins/gen/textureSampleBias/65ac50.wgsl
new file mode 100644
index 0000000..1fdb307
--- /dev/null
+++ b/test/builtins/gen/textureSampleBias/65ac50.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, bias: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureSampleBias_65ac50() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleBias_65ac50();
+}
diff --git a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.glsl b/test/builtins/gen/textureSampleBias/65ac50.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleBias/65ac50.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.hlsl b/test/builtins/gen/textureSampleBias/65ac50.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleBias/65ac50.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.msl b/test/builtins/gen/textureSampleBias/65ac50.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.msl
rename to test/builtins/gen/textureSampleBias/65ac50.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.spvasm b/test/builtins/gen/textureSampleBias/65ac50.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleBias/65ac50.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.wgsl b/test/builtins/gen/textureSampleBias/65ac50.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleBias/65ac50.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleBias/6a9113.wgsl b/test/builtins/gen/textureSampleBias/6a9113.wgsl
new file mode 100644
index 0000000..6d2e058
--- /dev/null
+++ b/test/builtins/gen/textureSampleBias/6a9113.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32>
+fn textureSampleBias_6a9113() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleBias_6a9113();
+}
diff --git a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.glsl b/test/builtins/gen/textureSampleBias/6a9113.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleBias/6a9113.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.hlsl b/test/builtins/gen/textureSampleBias/6a9113.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleBias/6a9113.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.msl b/test/builtins/gen/textureSampleBias/6a9113.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.msl
rename to test/builtins/gen/textureSampleBias/6a9113.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.spvasm b/test/builtins/gen/textureSampleBias/6a9113.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleBias/6a9113.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.wgsl b/test/builtins/gen/textureSampleBias/6a9113.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleBias/6a9113.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleBias/80e579.wgsl b/test/builtins/gen/textureSampleBias/80e579.wgsl
new file mode 100644
index 0000000..3fed9f3
--- /dev/null
+++ b/test/builtins/gen/textureSampleBias/80e579.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, bias: f32) -> vec4<f32>
+fn textureSampleBias_80e579() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1, 1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleBias_80e579();
+}
diff --git a/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.glsl b/test/builtins/gen/textureSampleBias/80e579.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleBias/80e579.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.hlsl b/test/builtins/gen/textureSampleBias/80e579.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleBias/80e579.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.msl b/test/builtins/gen/textureSampleBias/80e579.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.msl
rename to test/builtins/gen/textureSampleBias/80e579.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.spvasm b/test/builtins/gen/textureSampleBias/80e579.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleBias/80e579.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.wgsl b/test/builtins/gen/textureSampleBias/80e579.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleBias/80e579.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleBias/81c19a.wgsl b/test/builtins/gen/textureSampleBias/81c19a.wgsl
new file mode 100644
index 0000000..7bd26b4
--- /dev/null
+++ b/test/builtins/gen/textureSampleBias/81c19a.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureSampleBias_81c19a() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleBias_81c19a();
+}
diff --git a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.glsl b/test/builtins/gen/textureSampleBias/81c19a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleBias/81c19a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.hlsl b/test/builtins/gen/textureSampleBias/81c19a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleBias/81c19a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.msl b/test/builtins/gen/textureSampleBias/81c19a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.msl
rename to test/builtins/gen/textureSampleBias/81c19a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.spvasm b/test/builtins/gen/textureSampleBias/81c19a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleBias/81c19a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.wgsl b/test/builtins/gen/textureSampleBias/81c19a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleBias/81c19a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleBias/d3fa1b.wgsl b/test/builtins/gen/textureSampleBias/d3fa1b.wgsl
new file mode 100644
index 0000000..8eaa91d
--- /dev/null
+++ b/test/builtins/gen/textureSampleBias/d3fa1b.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
+fn textureSampleBias_d3fa1b() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleBias_d3fa1b();
+}
diff --git a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.glsl b/test/builtins/gen/textureSampleBias/d3fa1b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleBias/d3fa1b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.hlsl b/test/builtins/gen/textureSampleBias/d3fa1b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleBias/d3fa1b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.msl b/test/builtins/gen/textureSampleBias/d3fa1b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.msl
rename to test/builtins/gen/textureSampleBias/d3fa1b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.spvasm b/test/builtins/gen/textureSampleBias/d3fa1b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleBias/d3fa1b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.wgsl b/test/builtins/gen/textureSampleBias/d3fa1b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleBias/d3fa1b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleBias/df91bb.wgsl b/test/builtins/gen/textureSampleBias/df91bb.wgsl
new file mode 100644
index 0000000..88b1003
--- /dev/null
+++ b/test/builtins/gen/textureSampleBias/df91bb.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, offset: vec3<i32>) -> vec4<f32>
+fn textureSampleBias_df91bb() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.0, vec3<i32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleBias_df91bb();
+}
diff --git a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.glsl b/test/builtins/gen/textureSampleBias/df91bb.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleBias/df91bb.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.hlsl b/test/builtins/gen/textureSampleBias/df91bb.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleBias/df91bb.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.msl b/test/builtins/gen/textureSampleBias/df91bb.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.msl
rename to test/builtins/gen/textureSampleBias/df91bb.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.spvasm b/test/builtins/gen/textureSampleBias/df91bb.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleBias/df91bb.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.wgsl b/test/builtins/gen/textureSampleBias/df91bb.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleBias/df91bb.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleBias/eed7c4.wgsl b/test/builtins/gen/textureSampleBias/eed7c4.wgsl
new file mode 100644
index 0000000..14a3307
--- /dev/null
+++ b/test/builtins/gen/textureSampleBias/eed7c4.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, bias: f32) -> vec4<f32>
+fn textureSampleBias_eed7c4() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1, 1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleBias_eed7c4();
+}
diff --git a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.glsl b/test/builtins/gen/textureSampleBias/eed7c4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleBias/eed7c4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.hlsl b/test/builtins/gen/textureSampleBias/eed7c4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleBias/eed7c4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.msl b/test/builtins/gen/textureSampleBias/eed7c4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.msl
rename to test/builtins/gen/textureSampleBias/eed7c4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.spvasm b/test/builtins/gen/textureSampleBias/eed7c4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleBias/eed7c4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.wgsl b/test/builtins/gen/textureSampleBias/eed7c4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleBias/eed7c4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompare/25fcd1.wgsl b/test/builtins/gen/textureSampleCompare/25fcd1.wgsl
new file mode 100644
index 0000000..c72a430
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompare/25fcd1.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32
+fn textureSampleCompare_25fcd1() {
+  var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompare_25fcd1();
+}
diff --git a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompare/25fcd1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompare/25fcd1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompare/25fcd1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompare/25fcd1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.msl b/test/builtins/gen/textureSampleCompare/25fcd1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompare/25fcd1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompare/25fcd1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompare/25fcd1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompare/25fcd1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompare/25fcd1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompare/3a5923.wgsl b/test/builtins/gen/textureSampleCompare/3a5923.wgsl
new file mode 100644
index 0000000..39453fe
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompare/3a5923.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
+fn textureSampleCompare_3a5923() {
+  var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompare_3a5923();
+}
diff --git a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompare/3a5923.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompare/3a5923.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompare/3a5923.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompare/3a5923.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.msl b/test/builtins/gen/textureSampleCompare/3a5923.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompare/3a5923.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompare/3a5923.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompare/3a5923.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompare/3a5923.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompare/3a5923.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompare/63fb83.wgsl b/test/builtins/gen/textureSampleCompare/63fb83.wgsl
new file mode 100644
index 0000000..a056ddd
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompare/63fb83.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
+fn textureSampleCompare_63fb83() {
+  var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompare_63fb83();
+}
diff --git a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompare/63fb83.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompare/63fb83.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompare/63fb83.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompare/63fb83.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.msl b/test/builtins/gen/textureSampleCompare/63fb83.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompare/63fb83.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompare/63fb83.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompare/63fb83.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompare/63fb83.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompare/63fb83.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompare/98b85c.wgsl b/test/builtins/gen/textureSampleCompare/98b85c.wgsl
new file mode 100644
index 0000000..2e8e5d9
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompare/98b85c.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, depth_ref: f32, offset: vec2<i32>) -> f32
+fn textureSampleCompare_98b85c() {
+  var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompare_98b85c();
+}
diff --git a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompare/98b85c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompare/98b85c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompare/98b85c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompare/98b85c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.msl b/test/builtins/gen/textureSampleCompare/98b85c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompare/98b85c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompare/98b85c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompare/98b85c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompare/98b85c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompare/98b85c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompare/a3ca7e.wgsl b/test/builtins/gen/textureSampleCompare/a3ca7e.wgsl
new file mode 100644
index 0000000..23127fd
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompare/a3ca7e.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, depth_ref: f32) -> f32
+fn textureSampleCompare_a3ca7e() {
+  var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1, 1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompare_a3ca7e();
+}
diff --git a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompare/a3ca7e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompare/a3ca7e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompare/a3ca7e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompare/a3ca7e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.msl b/test/builtins/gen/textureSampleCompare/a3ca7e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompare/a3ca7e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompare/a3ca7e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompare/a3ca7e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompare/a3ca7e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompare/a3ca7e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompare/dd431d.wgsl b/test/builtins/gen/textureSampleCompare/dd431d.wgsl
new file mode 100644
index 0000000..226c953
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompare/dd431d.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, depth_ref: f32) -> f32
+fn textureSampleCompare_dd431d() {
+  var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1, 1.0);
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompare_dd431d();
+}
diff --git a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompare/dd431d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompare/dd431d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompare/dd431d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompare/dd431d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.msl b/test/builtins/gen/textureSampleCompare/dd431d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompare/dd431d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompare/dd431d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompare/dd431d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompare/dd431d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompare/dd431d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl b/test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl
new file mode 100644
index 0000000..0a998bd
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, depth_ref: f32, offset: vec2<i32>) -> f32
+fn textureSampleCompareLevel_011a8f() {
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_011a8f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompareLevel_011a8f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_011a8f();
+}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl b/test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompareLevel/011a8f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl b/test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl
new file mode 100644
index 0000000..1dd53b7
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_1116ed() {
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_1116ed();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompareLevel_1116ed();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_1116ed();
+}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl b/test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl b/test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl
new file mode 100644
index 0000000..2d620a8
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_1568e3() {
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_1568e3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompareLevel_1568e3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_1568e3();
+}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl b/test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl b/test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl
new file mode 100644
index 0000000..13451e8
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_2ad2b1() {
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_2ad2b1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompareLevel_2ad2b1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_2ad2b1();
+}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl b/test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl b/test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl
new file mode 100644
index 0000000..2fbaf40
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_4cf3a2() {
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_4cf3a2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompareLevel_4cf3a2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_4cf3a2();
+}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl b/test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl b/test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl
new file mode 100644
index 0000000..55617da
--- /dev/null
+++ b/test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32
+fn textureSampleCompareLevel_f8121c() {
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_f8121c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleCompareLevel_f8121c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_f8121c();
+}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.glsl b/test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl b/test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl b/test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl
rename to test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.spvasm b/test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.wgsl b/test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleCompareLevel/f8121c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleGrad/21402b.wgsl b/test/builtins/gen/textureSampleGrad/21402b.wgsl
new file mode 100644
index 0000000..106be97
--- /dev/null
+++ b/test/builtins/gen/textureSampleGrad/21402b.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleGrad_21402b() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_21402b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleGrad_21402b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_21402b();
+}
diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.glsl b/test/builtins/gen/textureSampleGrad/21402b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleGrad/21402b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.hlsl b/test/builtins/gen/textureSampleGrad/21402b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleGrad/21402b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl b/test/builtins/gen/textureSampleGrad/21402b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl
rename to test/builtins/gen/textureSampleGrad/21402b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.spvasm b/test/builtins/gen/textureSampleGrad/21402b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleGrad/21402b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.wgsl b/test/builtins/gen/textureSampleGrad/21402b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleGrad/21402b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleGrad/2ecd8f.wgsl b/test/builtins/gen/textureSampleGrad/2ecd8f.wgsl
new file mode 100644
index 0000000..fa20488
--- /dev/null
+++ b/test/builtins/gen/textureSampleGrad/2ecd8f.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
+fn textureSampleGrad_2ecd8f() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1, vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_2ecd8f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleGrad_2ecd8f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_2ecd8f();
+}
diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.glsl b/test/builtins/gen/textureSampleGrad/2ecd8f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleGrad/2ecd8f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl b/test/builtins/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl b/test/builtins/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl
rename to test/builtins/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.spvasm b/test/builtins/gen/textureSampleGrad/2ecd8f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleGrad/2ecd8f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.wgsl b/test/builtins/gen/textureSampleGrad/2ecd8f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleGrad/2ecd8f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleGrad/468f88.wgsl b/test/builtins/gen/textureSampleGrad/468f88.wgsl
new file mode 100644
index 0000000..38cbf88
--- /dev/null
+++ b/test/builtins/gen/textureSampleGrad/468f88.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
+fn textureSampleGrad_468f88() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), vec2<f32>(), vec2<f32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_468f88();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleGrad_468f88();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_468f88();
+}
diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.glsl b/test/builtins/gen/textureSampleGrad/468f88.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleGrad/468f88.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.hlsl b/test/builtins/gen/textureSampleGrad/468f88.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleGrad/468f88.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl b/test/builtins/gen/textureSampleGrad/468f88.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl
rename to test/builtins/gen/textureSampleGrad/468f88.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.spvasm b/test/builtins/gen/textureSampleGrad/468f88.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleGrad/468f88.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.wgsl b/test/builtins/gen/textureSampleGrad/468f88.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleGrad/468f88.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleGrad/521263.wgsl b/test/builtins/gen/textureSampleGrad/521263.wgsl
new file mode 100644
index 0000000..7c9e0f3
--- /dev/null
+++ b/test/builtins/gen/textureSampleGrad/521263.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
+fn textureSampleGrad_521263() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), vec2<f32>(), vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_521263();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleGrad_521263();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_521263();
+}
diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.glsl b/test/builtins/gen/textureSampleGrad/521263.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleGrad/521263.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.hlsl b/test/builtins/gen/textureSampleGrad/521263.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleGrad/521263.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl b/test/builtins/gen/textureSampleGrad/521263.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl
rename to test/builtins/gen/textureSampleGrad/521263.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.spvasm b/test/builtins/gen/textureSampleGrad/521263.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleGrad/521263.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.wgsl b/test/builtins/gen/textureSampleGrad/521263.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleGrad/521263.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleGrad/5312f4.wgsl b/test/builtins/gen/textureSampleGrad/5312f4.wgsl
new file mode 100644
index 0000000..ceadd61
--- /dev/null
+++ b/test/builtins/gen/textureSampleGrad/5312f4.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleGrad_5312f4() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_5312f4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleGrad_5312f4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_5312f4();
+}
diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.glsl b/test/builtins/gen/textureSampleGrad/5312f4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleGrad/5312f4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl b/test/builtins/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl b/test/builtins/gen/textureSampleGrad/5312f4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl
rename to test/builtins/gen/textureSampleGrad/5312f4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.spvasm b/test/builtins/gen/textureSampleGrad/5312f4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleGrad/5312f4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.wgsl b/test/builtins/gen/textureSampleGrad/5312f4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleGrad/5312f4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleGrad/872f00.wgsl b/test/builtins/gen/textureSampleGrad/872f00.wgsl
new file mode 100644
index 0000000..adcfee3
--- /dev/null
+++ b/test/builtins/gen/textureSampleGrad/872f00.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
+fn textureSampleGrad_872f00() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1, vec2<f32>(), vec2<f32>(), vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_872f00();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleGrad_872f00();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_872f00();
+}
diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.glsl b/test/builtins/gen/textureSampleGrad/872f00.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleGrad/872f00.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.hlsl b/test/builtins/gen/textureSampleGrad/872f00.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleGrad/872f00.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl b/test/builtins/gen/textureSampleGrad/872f00.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl
rename to test/builtins/gen/textureSampleGrad/872f00.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.spvasm b/test/builtins/gen/textureSampleGrad/872f00.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleGrad/872f00.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.wgsl b/test/builtins/gen/textureSampleGrad/872f00.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleGrad/872f00.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleGrad/e383db.wgsl b/test/builtins/gen/textureSampleGrad/e383db.wgsl
new file mode 100644
index 0000000..c5edcac
--- /dev/null
+++ b/test/builtins/gen/textureSampleGrad/e383db.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleGrad_e383db() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), 1, vec3<f32>(), vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_e383db();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleGrad_e383db();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_e383db();
+}
diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.glsl b/test/builtins/gen/textureSampleGrad/e383db.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleGrad/e383db.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.hlsl b/test/builtins/gen/textureSampleGrad/e383db.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleGrad/e383db.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl b/test/builtins/gen/textureSampleGrad/e383db.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl
rename to test/builtins/gen/textureSampleGrad/e383db.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.spvasm b/test/builtins/gen/textureSampleGrad/e383db.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleGrad/e383db.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.wgsl b/test/builtins/gen/textureSampleGrad/e383db.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleGrad/e383db.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleGrad/e9a2f7.wgsl b/test/builtins/gen/textureSampleGrad/e9a2f7.wgsl
new file mode 100644
index 0000000..ca07aeb
--- /dev/null
+++ b/test/builtins/gen/textureSampleGrad/e9a2f7.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, offset: vec3<i32>) -> vec4<f32>
+fn textureSampleGrad_e9a2f7() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>(), vec3<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_e9a2f7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleGrad_e9a2f7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_e9a2f7();
+}
diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.glsl b/test/builtins/gen/textureSampleGrad/e9a2f7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleGrad/e9a2f7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl b/test/builtins/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl b/test/builtins/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl
rename to test/builtins/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.spvasm b/test/builtins/gen/textureSampleGrad/e9a2f7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleGrad/e9a2f7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.wgsl b/test/builtins/gen/textureSampleGrad/e9a2f7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleGrad/e9a2f7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/02be59.wgsl b/test/builtins/gen/textureSampleLevel/02be59.wgsl
new file mode 100644
index 0000000..b7c576c
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/02be59.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> f32
+fn textureSampleLevel_02be59() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_02be59();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_02be59();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_02be59();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/02be59.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/02be59.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/02be59.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/02be59.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/02be59.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/02be59.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/02be59.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/02be59.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/02be59.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/02be59.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/0bdd9a.wgsl b/test/builtins/gen/textureSampleLevel/0bdd9a.wgsl
new file mode 100644
index 0000000..7f93103
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/0bdd9a.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, level: f32) -> vec4<f32>
+fn textureSampleLevel_0bdd9a() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_0bdd9a();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_0bdd9a();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_0bdd9a();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/0bdd9a.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/0bdd9a.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/0bdd9a.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/0bdd9a.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/0bdd9a.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/0bdd9a.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/1b0291.wgsl b/test/builtins/gen/textureSampleLevel/1b0291.wgsl
new file mode 100644
index 0000000..21fe71d
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/1b0291.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32) -> f32
+fn textureSampleLevel_1b0291() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_1b0291();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_1b0291();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_1b0291();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/1b0291.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/1b0291.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/1b0291.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/1b0291.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/1b0291.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/1b0291.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/1b0291.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/1b0291.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/1bf73e.wgsl b/test/builtins/gen/textureSampleLevel/1bf73e.wgsl
new file mode 100644
index 0000000..33adc88
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/1bf73e.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, level: i32) -> f32
+fn textureSampleLevel_1bf73e() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_1bf73e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_1bf73e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_1bf73e();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/1bf73e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/1bf73e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/1bf73e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/1bf73e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/1bf73e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/1bf73e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/1bf73e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/1bf73e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/302be4.wgsl b/test/builtins/gen/textureSampleLevel/302be4.wgsl
new file mode 100644
index 0000000..88fb77c
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/302be4.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, level: f32) -> vec4<f32>
+fn textureSampleLevel_302be4() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_302be4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_302be4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_302be4();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/302be4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/302be4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/302be4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/302be4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/302be4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/302be4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/302be4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/302be4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/302be4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/302be4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/47daa4.wgsl b/test/builtins/gen/textureSampleLevel/47daa4.wgsl
new file mode 100644
index 0000000..9ddf9f0
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/47daa4.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, offset: vec2<i32>) -> f32
+fn textureSampleLevel_47daa4() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 0, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_47daa4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_47daa4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_47daa4();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/47daa4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/47daa4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/47daa4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/47daa4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/47daa4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/47daa4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/47daa4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/47daa4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/690d95.wgsl b/test/builtins/gen/textureSampleLevel/690d95.wgsl
new file mode 100644
index 0000000..678b4e4
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/690d95.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureSampleLevel_690d95() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_690d95();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_690d95();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_690d95();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/690d95.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/690d95.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/690d95.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/690d95.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/690d95.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/690d95.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/690d95.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/690d95.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/690d95.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/690d95.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/979816.wgsl b/test/builtins/gen/textureSampleLevel/979816.wgsl
new file mode 100644
index 0000000..b8a0045
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/979816.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_external;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+fn textureSampleLevel_979816() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_979816();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_979816();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_979816();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/979816.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/979816.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/979816.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/979816.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/979816.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/979816.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/979816.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/979816.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/979816.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/979816.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/9bd37b.wgsl b/test/builtins/gen/textureSampleLevel/9bd37b.wgsl
new file mode 100644
index 0000000..3e8b5d3
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/9bd37b.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, offset: vec3<i32>) -> vec4<f32>
+fn textureSampleLevel_9bd37b() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.0, vec3<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_9bd37b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_9bd37b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_9bd37b();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/9bd37b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/9bd37b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/9bd37b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/9bd37b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/9bd37b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/9bd37b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/9bd37b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/9bd37b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/a4af26.wgsl b/test/builtins/gen/textureSampleLevel/a4af26.wgsl
new file mode 100644
index 0000000..9a65ca3
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/a4af26.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, level: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureSampleLevel_a4af26() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_a4af26();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_a4af26();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_a4af26();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/a4af26.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/a4af26.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/a4af26.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/a4af26.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/a4af26.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/a4af26.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/a4af26.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/a4af26.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/abfcc0.wgsl b/test/builtins/gen/textureSampleLevel/abfcc0.wgsl
new file mode 100644
index 0000000..f5f2e29
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/abfcc0.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
+fn textureSampleLevel_abfcc0() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_abfcc0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_abfcc0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_abfcc0();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/abfcc0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/abfcc0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/abfcc0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/abfcc0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/abfcc0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/abfcc0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/abfcc0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/abfcc0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/ae5e39.wgsl b/test/builtins/gen/textureSampleLevel/ae5e39.wgsl
new file mode 100644
index 0000000..76bce20
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/ae5e39.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, level: i32) -> f32
+fn textureSampleLevel_ae5e39() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1, 0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_ae5e39();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_ae5e39();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_ae5e39();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/ae5e39.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/ae5e39.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/ae5e39.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/ae5e39.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/ae5e39.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/ae5e39.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/ae5e39.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/ae5e39.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/ba93b3.wgsl b/test/builtins/gen/textureSampleLevel/ba93b3.wgsl
new file mode 100644
index 0000000..c4d0a3d
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/ba93b3.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, level: i32, offset: vec2<i32>) -> f32
+fn textureSampleLevel_ba93b3() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1, 0, vec2<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_ba93b3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_ba93b3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_ba93b3();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/ba93b3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/ba93b3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/ba93b3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/ba93b3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/ba93b3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/ba93b3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/ba93b3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/ba93b3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/c32df7.wgsl b/test/builtins/gen/textureSampleLevel/c32df7.wgsl
new file mode 100644
index 0000000..9cee583
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/c32df7.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
+fn textureSampleLevel_c32df7() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_c32df7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_c32df7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_c32df7();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/c32df7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/c32df7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/c32df7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/c32df7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/c32df7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/c32df7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/c32df7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/c32df7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureSampleLevel/c6aca6.wgsl b/test/builtins/gen/textureSampleLevel/c6aca6.wgsl
new file mode 100644
index 0000000..532b6c3
--- /dev/null
+++ b/test/builtins/gen/textureSampleLevel/c6aca6.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32>
+fn textureSampleLevel_c6aca6() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_c6aca6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureSampleLevel_c6aca6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_c6aca6();
+}
diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.glsl b/test/builtins/gen/textureSampleLevel/c6aca6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.glsl
rename to test/builtins/gen/textureSampleLevel/c6aca6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl b/test/builtins/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl
rename to test/builtins/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl b/test/builtins/gen/textureSampleLevel/c6aca6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl
rename to test/builtins/gen/textureSampleLevel/c6aca6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.spvasm b/test/builtins/gen/textureSampleLevel/c6aca6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.spvasm
rename to test/builtins/gen/textureSampleLevel/c6aca6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.wgsl b/test/builtins/gen/textureSampleLevel/c6aca6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.wgsl
rename to test/builtins/gen/textureSampleLevel/c6aca6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/05ce15.wgsl b/test/builtins/gen/textureStore/05ce15.wgsl
new file mode 100644
index 0000000..890e421
--- /dev/null
+++ b/test/builtins/gen/textureStore/05ce15.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_05ce15() {
+  textureStore(arg_0, vec2<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_05ce15();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_05ce15();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_05ce15();
+}
diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.glsl b/test/builtins/gen/textureStore/05ce15.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/05ce15.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/05ce15.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.hlsl b/test/builtins/gen/textureStore/05ce15.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/05ce15.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/05ce15.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.msl b/test/builtins/gen/textureStore/05ce15.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/05ce15.wgsl.expected.msl
rename to test/builtins/gen/textureStore/05ce15.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.spvasm b/test/builtins/gen/textureStore/05ce15.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/05ce15.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/05ce15.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.wgsl b/test/builtins/gen/textureStore/05ce15.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/05ce15.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/05ce15.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/064c7f.wgsl b/test/builtins/gen/textureStore/064c7f.wgsl
new file mode 100644
index 0000000..a05b1ab
--- /dev/null
+++ b/test/builtins/gen/textureStore/064c7f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_064c7f() {
+  textureStore(arg_0, vec2<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_064c7f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_064c7f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_064c7f();
+}
diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.glsl b/test/builtins/gen/textureStore/064c7f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/064c7f.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/064c7f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.hlsl b/test/builtins/gen/textureStore/064c7f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/064c7f.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/064c7f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.msl b/test/builtins/gen/textureStore/064c7f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/064c7f.wgsl.expected.msl
rename to test/builtins/gen/textureStore/064c7f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.spvasm b/test/builtins/gen/textureStore/064c7f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/064c7f.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/064c7f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.wgsl b/test/builtins/gen/textureStore/064c7f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/064c7f.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/064c7f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/068641.wgsl b/test/builtins/gen/textureStore/068641.wgsl
new file mode 100644
index 0000000..8f2cf0c
--- /dev/null
+++ b/test/builtins/gen/textureStore/068641.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba16uint, write>, coords: vec3<i32>, value: vec4<u32>)
+fn textureStore_068641() {
+  textureStore(arg_0, vec3<i32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_068641();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_068641();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_068641();
+}
diff --git a/test/intrinsics/gen/textureStore/068641.wgsl.expected.glsl b/test/builtins/gen/textureStore/068641.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/068641.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/068641.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/068641.wgsl.expected.hlsl b/test/builtins/gen/textureStore/068641.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/068641.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/068641.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/068641.wgsl.expected.msl b/test/builtins/gen/textureStore/068641.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/068641.wgsl.expected.msl
rename to test/builtins/gen/textureStore/068641.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/068641.wgsl.expected.spvasm b/test/builtins/gen/textureStore/068641.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/068641.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/068641.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/068641.wgsl.expected.wgsl b/test/builtins/gen/textureStore/068641.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/068641.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/068641.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/0af6b5.wgsl b/test/builtins/gen/textureStore/0af6b5.wgsl
new file mode 100644
index 0000000..aef7b6c
--- /dev/null
+++ b/test/builtins/gen/textureStore/0af6b5.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_0af6b5() {
+  textureStore(arg_0, vec2<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_0af6b5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_0af6b5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_0af6b5();
+}
diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.glsl b/test/builtins/gen/textureStore/0af6b5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/0af6b5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.hlsl b/test/builtins/gen/textureStore/0af6b5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/0af6b5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.msl b/test/builtins/gen/textureStore/0af6b5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.msl
rename to test/builtins/gen/textureStore/0af6b5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.spvasm b/test/builtins/gen/textureStore/0af6b5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/0af6b5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.wgsl b/test/builtins/gen/textureStore/0af6b5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/0af6b5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/0c3dff.wgsl b/test/builtins/gen/textureStore/0c3dff.wgsl
new file mode 100644
index 0000000..9d3b608
--- /dev/null
+++ b/test/builtins/gen/textureStore/0c3dff.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<u32>)
+fn textureStore_0c3dff() {
+  textureStore(arg_0, vec2<i32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_0c3dff();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_0c3dff();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_0c3dff();
+}
diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.glsl b/test/builtins/gen/textureStore/0c3dff.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/0c3dff.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.hlsl b/test/builtins/gen/textureStore/0c3dff.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/0c3dff.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.msl b/test/builtins/gen/textureStore/0c3dff.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.msl
rename to test/builtins/gen/textureStore/0c3dff.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.spvasm b/test/builtins/gen/textureStore/0c3dff.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/0c3dff.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.wgsl b/test/builtins/gen/textureStore/0c3dff.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/0c3dff.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/102722.wgsl b/test/builtins/gen/textureStore/102722.wgsl
new file mode 100644
index 0000000..48a2f6b
--- /dev/null
+++ b/test/builtins/gen/textureStore/102722.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<u32>)
+fn textureStore_102722() {
+  textureStore(arg_0, 1, vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_102722();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_102722();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_102722();
+}
diff --git a/test/intrinsics/gen/textureStore/102722.wgsl.expected.glsl b/test/builtins/gen/textureStore/102722.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/102722.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/102722.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/102722.wgsl.expected.hlsl b/test/builtins/gen/textureStore/102722.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/102722.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/102722.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/102722.wgsl.expected.msl b/test/builtins/gen/textureStore/102722.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/102722.wgsl.expected.msl
rename to test/builtins/gen/textureStore/102722.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/102722.wgsl.expected.spvasm b/test/builtins/gen/textureStore/102722.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/102722.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/102722.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/102722.wgsl.expected.wgsl b/test/builtins/gen/textureStore/102722.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/102722.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/102722.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/1bbd08.wgsl b/test/builtins/gen/textureStore/1bbd08.wgsl
new file mode 100644
index 0000000..709455e
--- /dev/null
+++ b/test/builtins/gen/textureStore/1bbd08.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_1bbd08() {
+  textureStore(arg_0, vec3<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1bbd08();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_1bbd08();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_1bbd08();
+}
diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.glsl b/test/builtins/gen/textureStore/1bbd08.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/1bbd08.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.hlsl b/test/builtins/gen/textureStore/1bbd08.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/1bbd08.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.msl b/test/builtins/gen/textureStore/1bbd08.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.msl
rename to test/builtins/gen/textureStore/1bbd08.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.spvasm b/test/builtins/gen/textureStore/1bbd08.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/1bbd08.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.wgsl b/test/builtins/gen/textureStore/1bbd08.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/1bbd08.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/1c02e7.wgsl b/test/builtins/gen/textureStore/1c02e7.wgsl
new file mode 100644
index 0000000..8d069d8
--- /dev/null
+++ b/test/builtins/gen/textureStore/1c02e7.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
+fn textureStore_1c02e7() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1c02e7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_1c02e7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_1c02e7();
+}
diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.glsl b/test/builtins/gen/textureStore/1c02e7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/1c02e7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.hlsl b/test/builtins/gen/textureStore/1c02e7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/1c02e7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.msl b/test/builtins/gen/textureStore/1c02e7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.msl
rename to test/builtins/gen/textureStore/1c02e7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.spvasm b/test/builtins/gen/textureStore/1c02e7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/1c02e7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.wgsl b/test/builtins/gen/textureStore/1c02e7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/1c02e7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/22d955.wgsl b/test/builtins/gen/textureStore/22d955.wgsl
new file mode 100644
index 0000000..cf8aeb1
--- /dev/null
+++ b/test/builtins/gen/textureStore/22d955.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
+fn textureStore_22d955() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_22d955();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_22d955();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_22d955();
+}
diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.glsl b/test/builtins/gen/textureStore/22d955.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/22d955.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/22d955.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.hlsl b/test/builtins/gen/textureStore/22d955.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/22d955.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/22d955.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.msl b/test/builtins/gen/textureStore/22d955.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/22d955.wgsl.expected.msl
rename to test/builtins/gen/textureStore/22d955.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.spvasm b/test/builtins/gen/textureStore/22d955.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/22d955.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/22d955.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.wgsl b/test/builtins/gen/textureStore/22d955.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/22d955.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/22d955.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/26bf70.wgsl b/test/builtins/gen/textureStore/26bf70.wgsl
new file mode 100644
index 0000000..68435b3
--- /dev/null
+++ b/test/builtins/gen/textureStore/26bf70.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<u32>)
+fn textureStore_26bf70() {
+  textureStore(arg_0, vec2<i32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_26bf70();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_26bf70();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_26bf70();
+}
diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.glsl b/test/builtins/gen/textureStore/26bf70.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/26bf70.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/26bf70.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.hlsl b/test/builtins/gen/textureStore/26bf70.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/26bf70.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/26bf70.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.msl b/test/builtins/gen/textureStore/26bf70.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/26bf70.wgsl.expected.msl
rename to test/builtins/gen/textureStore/26bf70.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.spvasm b/test/builtins/gen/textureStore/26bf70.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/26bf70.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/26bf70.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.wgsl b/test/builtins/gen/textureStore/26bf70.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/26bf70.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/26bf70.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/2796b4.wgsl b/test/builtins/gen/textureStore/2796b4.wgsl
new file mode 100644
index 0000000..a6cb869
--- /dev/null
+++ b/test/builtins/gen/textureStore/2796b4.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<i32>)
+fn textureStore_2796b4() {
+  textureStore(arg_0, vec3<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2796b4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_2796b4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_2796b4();
+}
diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.glsl b/test/builtins/gen/textureStore/2796b4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2796b4.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/2796b4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.hlsl b/test/builtins/gen/textureStore/2796b4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2796b4.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/2796b4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.msl b/test/builtins/gen/textureStore/2796b4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2796b4.wgsl.expected.msl
rename to test/builtins/gen/textureStore/2796b4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.spvasm b/test/builtins/gen/textureStore/2796b4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/2796b4.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/2796b4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.wgsl b/test/builtins/gen/textureStore/2796b4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2796b4.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/2796b4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/2ac6c7.wgsl b/test/builtins/gen/textureStore/2ac6c7.wgsl
new file mode 100644
index 0000000..c77c788
--- /dev/null
+++ b/test/builtins/gen/textureStore/2ac6c7.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<f32>)
+fn textureStore_2ac6c7() {
+  textureStore(arg_0, 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2ac6c7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_2ac6c7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_2ac6c7();
+}
diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.glsl b/test/builtins/gen/textureStore/2ac6c7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/2ac6c7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.hlsl b/test/builtins/gen/textureStore/2ac6c7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/2ac6c7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.msl b/test/builtins/gen/textureStore/2ac6c7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.msl
rename to test/builtins/gen/textureStore/2ac6c7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.spvasm b/test/builtins/gen/textureStore/2ac6c7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/2ac6c7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.wgsl b/test/builtins/gen/textureStore/2ac6c7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/2ac6c7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/2eb2a4.wgsl b/test/builtins/gen/textureStore/2eb2a4.wgsl
new file mode 100644
index 0000000..757a807
--- /dev/null
+++ b/test/builtins/gen/textureStore/2eb2a4.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<u32>)
+fn textureStore_2eb2a4() {
+  textureStore(arg_0, 1, vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2eb2a4();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_2eb2a4();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_2eb2a4();
+}
diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.glsl b/test/builtins/gen/textureStore/2eb2a4.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/2eb2a4.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.hlsl b/test/builtins/gen/textureStore/2eb2a4.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/2eb2a4.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.msl b/test/builtins/gen/textureStore/2eb2a4.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.msl
rename to test/builtins/gen/textureStore/2eb2a4.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.spvasm b/test/builtins/gen/textureStore/2eb2a4.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/2eb2a4.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.wgsl b/test/builtins/gen/textureStore/2eb2a4.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/2eb2a4.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/2ed2a3.wgsl b/test/builtins/gen/textureStore/2ed2a3.wgsl
new file mode 100644
index 0000000..1116d06
--- /dev/null
+++ b/test/builtins/gen/textureStore/2ed2a3.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<f32>)
+fn textureStore_2ed2a3() {
+  textureStore(arg_0, 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2ed2a3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_2ed2a3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_2ed2a3();
+}
diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.glsl b/test/builtins/gen/textureStore/2ed2a3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/2ed2a3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.hlsl b/test/builtins/gen/textureStore/2ed2a3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/2ed2a3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.msl b/test/builtins/gen/textureStore/2ed2a3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.msl
rename to test/builtins/gen/textureStore/2ed2a3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.spvasm b/test/builtins/gen/textureStore/2ed2a3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/2ed2a3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.wgsl b/test/builtins/gen/textureStore/2ed2a3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/2ed2a3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/31745b.wgsl b/test/builtins/gen/textureStore/31745b.wgsl
new file mode 100644
index 0000000..92ba02e
--- /dev/null
+++ b/test/builtins/gen/textureStore/31745b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<i32>)
+fn textureStore_31745b() {
+  textureStore(arg_0, vec2<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_31745b();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_31745b();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_31745b();
+}
diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.glsl b/test/builtins/gen/textureStore/31745b.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/31745b.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/31745b.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.hlsl b/test/builtins/gen/textureStore/31745b.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/31745b.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/31745b.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.msl b/test/builtins/gen/textureStore/31745b.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/31745b.wgsl.expected.msl
rename to test/builtins/gen/textureStore/31745b.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.spvasm b/test/builtins/gen/textureStore/31745b.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/31745b.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/31745b.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.wgsl b/test/builtins/gen/textureStore/31745b.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/31745b.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/31745b.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/32f368.wgsl b/test/builtins/gen/textureStore/32f368.wgsl
new file mode 100644
index 0000000..ac8b536
--- /dev/null
+++ b/test/builtins/gen/textureStore/32f368.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
+fn textureStore_32f368() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_32f368();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_32f368();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_32f368();
+}
diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.glsl b/test/builtins/gen/textureStore/32f368.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/32f368.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/32f368.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.hlsl b/test/builtins/gen/textureStore/32f368.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/32f368.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/32f368.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.msl b/test/builtins/gen/textureStore/32f368.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/32f368.wgsl.expected.msl
rename to test/builtins/gen/textureStore/32f368.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.spvasm b/test/builtins/gen/textureStore/32f368.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/32f368.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/32f368.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.wgsl b/test/builtins/gen/textureStore/32f368.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/32f368.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/32f368.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/331aee.wgsl b/test/builtins/gen/textureStore/331aee.wgsl
new file mode 100644
index 0000000..3297999
--- /dev/null
+++ b/test/builtins/gen/textureStore/331aee.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_331aee() {
+  textureStore(arg_0, vec3<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_331aee();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_331aee();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_331aee();
+}
diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.glsl b/test/builtins/gen/textureStore/331aee.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/331aee.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/331aee.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.hlsl b/test/builtins/gen/textureStore/331aee.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/331aee.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/331aee.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.msl b/test/builtins/gen/textureStore/331aee.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/331aee.wgsl.expected.msl
rename to test/builtins/gen/textureStore/331aee.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.spvasm b/test/builtins/gen/textureStore/331aee.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/331aee.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/331aee.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.wgsl b/test/builtins/gen/textureStore/331aee.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/331aee.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/331aee.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/38e8d7.wgsl b/test/builtins/gen/textureStore/38e8d7.wgsl
new file mode 100644
index 0000000..926527c
--- /dev/null
+++ b/test/builtins/gen/textureStore/38e8d7.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
+fn textureStore_38e8d7() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_38e8d7();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_38e8d7();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_38e8d7();
+}
diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.glsl b/test/builtins/gen/textureStore/38e8d7.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/38e8d7.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.hlsl b/test/builtins/gen/textureStore/38e8d7.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/38e8d7.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.msl b/test/builtins/gen/textureStore/38e8d7.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.msl
rename to test/builtins/gen/textureStore/38e8d7.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.spvasm b/test/builtins/gen/textureStore/38e8d7.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/38e8d7.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.wgsl b/test/builtins/gen/textureStore/38e8d7.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/38e8d7.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/3a52ac.wgsl b/test/builtins/gen/textureStore/3a52ac.wgsl
new file mode 100644
index 0000000..46140cf
--- /dev/null
+++ b/test/builtins/gen/textureStore/3a52ac.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
+fn textureStore_3a52ac() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3a52ac();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_3a52ac();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_3a52ac();
+}
diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.glsl b/test/builtins/gen/textureStore/3a52ac.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/3a52ac.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.hlsl b/test/builtins/gen/textureStore/3a52ac.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/3a52ac.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.msl b/test/builtins/gen/textureStore/3a52ac.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.msl
rename to test/builtins/gen/textureStore/3a52ac.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.spvasm b/test/builtins/gen/textureStore/3a52ac.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/3a52ac.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.wgsl b/test/builtins/gen/textureStore/3a52ac.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/3a52ac.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/3bb7a1.wgsl b/test/builtins/gen/textureStore/3bb7a1.wgsl
new file mode 100644
index 0000000..c033c45
--- /dev/null
+++ b/test/builtins/gen/textureStore/3bb7a1.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
+fn textureStore_3bb7a1() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3bb7a1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_3bb7a1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_3bb7a1();
+}
diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.glsl b/test/builtins/gen/textureStore/3bb7a1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/3bb7a1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.hlsl b/test/builtins/gen/textureStore/3bb7a1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/3bb7a1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.msl b/test/builtins/gen/textureStore/3bb7a1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.msl
rename to test/builtins/gen/textureStore/3bb7a1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.spvasm b/test/builtins/gen/textureStore/3bb7a1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/3bb7a1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.wgsl b/test/builtins/gen/textureStore/3bb7a1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/3bb7a1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/3bec15.wgsl b/test/builtins/gen/textureStore/3bec15.wgsl
new file mode 100644
index 0000000..38a0b2a
--- /dev/null
+++ b/test/builtins/gen/textureStore/3bec15.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<u32>)
+fn textureStore_3bec15() {
+  textureStore(arg_0, 1, vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3bec15();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_3bec15();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_3bec15();
+}
diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.glsl b/test/builtins/gen/textureStore/3bec15.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3bec15.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/3bec15.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.hlsl b/test/builtins/gen/textureStore/3bec15.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3bec15.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/3bec15.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.msl b/test/builtins/gen/textureStore/3bec15.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3bec15.wgsl.expected.msl
rename to test/builtins/gen/textureStore/3bec15.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.spvasm b/test/builtins/gen/textureStore/3bec15.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/3bec15.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/3bec15.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.wgsl b/test/builtins/gen/textureStore/3bec15.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/3bec15.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/3bec15.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/441ba8.wgsl b/test/builtins/gen/textureStore/441ba8.wgsl
new file mode 100644
index 0000000..40be067
--- /dev/null
+++ b/test/builtins/gen/textureStore/441ba8.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba32uint, write>, coords: vec3<i32>, value: vec4<u32>)
+fn textureStore_441ba8() {
+  textureStore(arg_0, vec3<i32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_441ba8();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_441ba8();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_441ba8();
+}
diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.glsl b/test/builtins/gen/textureStore/441ba8.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/441ba8.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/441ba8.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.hlsl b/test/builtins/gen/textureStore/441ba8.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/441ba8.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/441ba8.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.msl b/test/builtins/gen/textureStore/441ba8.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/441ba8.wgsl.expected.msl
rename to test/builtins/gen/textureStore/441ba8.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.spvasm b/test/builtins/gen/textureStore/441ba8.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/441ba8.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/441ba8.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.wgsl b/test/builtins/gen/textureStore/441ba8.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/441ba8.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/441ba8.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/4fc057.wgsl b/test/builtins/gen/textureStore/4fc057.wgsl
new file mode 100644
index 0000000..12c2b38
--- /dev/null
+++ b/test/builtins/gen/textureStore/4fc057.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
+fn textureStore_4fc057() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4fc057();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_4fc057();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_4fc057();
+}
diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.glsl b/test/builtins/gen/textureStore/4fc057.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/4fc057.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/4fc057.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.hlsl b/test/builtins/gen/textureStore/4fc057.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/4fc057.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/4fc057.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.msl b/test/builtins/gen/textureStore/4fc057.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/4fc057.wgsl.expected.msl
rename to test/builtins/gen/textureStore/4fc057.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.spvasm b/test/builtins/gen/textureStore/4fc057.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/4fc057.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/4fc057.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.wgsl b/test/builtins/gen/textureStore/4fc057.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/4fc057.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/4fc057.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/5a2f8f.wgsl b/test/builtins/gen/textureStore/5a2f8f.wgsl
new file mode 100644
index 0000000..10f1c5d
--- /dev/null
+++ b/test/builtins/gen/textureStore/5a2f8f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<i32>)
+fn textureStore_5a2f8f() {
+  textureStore(arg_0, 1, vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5a2f8f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_5a2f8f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_5a2f8f();
+}
diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.glsl b/test/builtins/gen/textureStore/5a2f8f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/5a2f8f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.hlsl b/test/builtins/gen/textureStore/5a2f8f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/5a2f8f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.msl b/test/builtins/gen/textureStore/5a2f8f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.msl
rename to test/builtins/gen/textureStore/5a2f8f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.spvasm b/test/builtins/gen/textureStore/5a2f8f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/5a2f8f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.wgsl b/test/builtins/gen/textureStore/5a2f8f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/5a2f8f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/60975f.wgsl b/test/builtins/gen/textureStore/60975f.wgsl
new file mode 100644
index 0000000..e73e4f0
--- /dev/null
+++ b/test/builtins/gen/textureStore/60975f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
+fn textureStore_60975f() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_60975f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_60975f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_60975f();
+}
diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.glsl b/test/builtins/gen/textureStore/60975f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/60975f.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/60975f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.hlsl b/test/builtins/gen/textureStore/60975f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/60975f.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/60975f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.msl b/test/builtins/gen/textureStore/60975f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/60975f.wgsl.expected.msl
rename to test/builtins/gen/textureStore/60975f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.spvasm b/test/builtins/gen/textureStore/60975f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/60975f.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/60975f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.wgsl b/test/builtins/gen/textureStore/60975f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/60975f.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/60975f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/682fd6.wgsl b/test/builtins/gen/textureStore/682fd6.wgsl
new file mode 100644
index 0000000..68be6e3
--- /dev/null
+++ b/test/builtins/gen/textureStore/682fd6.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<u32>)
+fn textureStore_682fd6() {
+  textureStore(arg_0, vec2<i32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_682fd6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_682fd6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_682fd6();
+}
diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.glsl b/test/builtins/gen/textureStore/682fd6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/682fd6.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/682fd6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.hlsl b/test/builtins/gen/textureStore/682fd6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/682fd6.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/682fd6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.msl b/test/builtins/gen/textureStore/682fd6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/682fd6.wgsl.expected.msl
rename to test/builtins/gen/textureStore/682fd6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.spvasm b/test/builtins/gen/textureStore/682fd6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/682fd6.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/682fd6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.wgsl b/test/builtins/gen/textureStore/682fd6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/682fd6.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/682fd6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/6b75c3.wgsl b/test/builtins/gen/textureStore/6b75c3.wgsl
new file mode 100644
index 0000000..6ded5c1
--- /dev/null
+++ b/test/builtins/gen/textureStore/6b75c3.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<f32>)
+fn textureStore_6b75c3() {
+  textureStore(arg_0, 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_6b75c3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_6b75c3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_6b75c3();
+}
diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.glsl b/test/builtins/gen/textureStore/6b75c3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/6b75c3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.hlsl b/test/builtins/gen/textureStore/6b75c3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/6b75c3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.msl b/test/builtins/gen/textureStore/6b75c3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.msl
rename to test/builtins/gen/textureStore/6b75c3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.spvasm b/test/builtins/gen/textureStore/6b75c3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/6b75c3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.wgsl b/test/builtins/gen/textureStore/6b75c3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/6b75c3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/6b80d2.wgsl b/test/builtins/gen/textureStore/6b80d2.wgsl
new file mode 100644
index 0000000..dcd07a5
--- /dev/null
+++ b/test/builtins/gen/textureStore/6b80d2.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<i32>)
+fn textureStore_6b80d2() {
+  textureStore(arg_0, 1, vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_6b80d2();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_6b80d2();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_6b80d2();
+}
diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.glsl b/test/builtins/gen/textureStore/6b80d2.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/6b80d2.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.hlsl b/test/builtins/gen/textureStore/6b80d2.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/6b80d2.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.msl b/test/builtins/gen/textureStore/6b80d2.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.msl
rename to test/builtins/gen/textureStore/6b80d2.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.spvasm b/test/builtins/gen/textureStore/6b80d2.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/6b80d2.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.wgsl b/test/builtins/gen/textureStore/6b80d2.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/6b80d2.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/6cff2e.wgsl b/test/builtins/gen/textureStore/6cff2e.wgsl
new file mode 100644
index 0000000..565fd4d
--- /dev/null
+++ b/test/builtins/gen/textureStore/6cff2e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<u32>)
+fn textureStore_6cff2e() {
+  textureStore(arg_0, vec2<i32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_6cff2e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_6cff2e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_6cff2e();
+}
diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.glsl b/test/builtins/gen/textureStore/6cff2e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/6cff2e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.hlsl b/test/builtins/gen/textureStore/6cff2e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/6cff2e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.msl b/test/builtins/gen/textureStore/6cff2e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.msl
rename to test/builtins/gen/textureStore/6cff2e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.spvasm b/test/builtins/gen/textureStore/6cff2e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/6cff2e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.wgsl b/test/builtins/gen/textureStore/6cff2e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/6cff2e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/6da692.wgsl b/test/builtins/gen/textureStore/6da692.wgsl
new file mode 100644
index 0000000..0f147fb
--- /dev/null
+++ b/test/builtins/gen/textureStore/6da692.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
+fn textureStore_6da692() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_6da692();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_6da692();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_6da692();
+}
diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.glsl b/test/builtins/gen/textureStore/6da692.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6da692.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/6da692.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.hlsl b/test/builtins/gen/textureStore/6da692.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6da692.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/6da692.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.msl b/test/builtins/gen/textureStore/6da692.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6da692.wgsl.expected.msl
rename to test/builtins/gen/textureStore/6da692.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.spvasm b/test/builtins/gen/textureStore/6da692.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/6da692.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/6da692.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.wgsl b/test/builtins/gen/textureStore/6da692.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/6da692.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/6da692.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/731349.wgsl b/test/builtins/gen/textureStore/731349.wgsl
new file mode 100644
index 0000000..7082079
--- /dev/null
+++ b/test/builtins/gen/textureStore/731349.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_731349() {
+  textureStore(arg_0, vec2<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_731349();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_731349();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_731349();
+}
diff --git a/test/intrinsics/gen/textureStore/731349.wgsl.expected.glsl b/test/builtins/gen/textureStore/731349.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/731349.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/731349.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/731349.wgsl.expected.hlsl b/test/builtins/gen/textureStore/731349.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/731349.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/731349.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/731349.wgsl.expected.msl b/test/builtins/gen/textureStore/731349.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/731349.wgsl.expected.msl
rename to test/builtins/gen/textureStore/731349.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/731349.wgsl.expected.spvasm b/test/builtins/gen/textureStore/731349.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/731349.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/731349.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/731349.wgsl.expected.wgsl b/test/builtins/gen/textureStore/731349.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/731349.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/731349.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/752da6.wgsl b/test/builtins/gen/textureStore/752da6.wgsl
new file mode 100644
index 0000000..40c615c
--- /dev/null
+++ b/test/builtins/gen/textureStore/752da6.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<i32>)
+fn textureStore_752da6() {
+  textureStore(arg_0, vec2<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_752da6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_752da6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_752da6();
+}
diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.glsl b/test/builtins/gen/textureStore/752da6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/752da6.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/752da6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.hlsl b/test/builtins/gen/textureStore/752da6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/752da6.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/752da6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.msl b/test/builtins/gen/textureStore/752da6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/752da6.wgsl.expected.msl
rename to test/builtins/gen/textureStore/752da6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.spvasm b/test/builtins/gen/textureStore/752da6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/752da6.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/752da6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.wgsl b/test/builtins/gen/textureStore/752da6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/752da6.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/752da6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/77c0ae.wgsl b/test/builtins/gen/textureStore/77c0ae.wgsl
new file mode 100644
index 0000000..2a82ed7
--- /dev/null
+++ b/test/builtins/gen/textureStore/77c0ae.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<u32>)
+fn textureStore_77c0ae() {
+  textureStore(arg_0, vec2<i32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_77c0ae();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_77c0ae();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_77c0ae();
+}
diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.glsl b/test/builtins/gen/textureStore/77c0ae.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/77c0ae.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.hlsl b/test/builtins/gen/textureStore/77c0ae.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/77c0ae.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.msl b/test/builtins/gen/textureStore/77c0ae.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.msl
rename to test/builtins/gen/textureStore/77c0ae.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.spvasm b/test/builtins/gen/textureStore/77c0ae.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/77c0ae.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.wgsl b/test/builtins/gen/textureStore/77c0ae.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/77c0ae.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/7cec8d.wgsl b/test/builtins/gen/textureStore/7cec8d.wgsl
new file mode 100644
index 0000000..d3a2b80
--- /dev/null
+++ b/test/builtins/gen/textureStore/7cec8d.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
+fn textureStore_7cec8d() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_7cec8d();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_7cec8d();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_7cec8d();
+}
diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.glsl b/test/builtins/gen/textureStore/7cec8d.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/7cec8d.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.hlsl b/test/builtins/gen/textureStore/7cec8d.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/7cec8d.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.msl b/test/builtins/gen/textureStore/7cec8d.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.msl
rename to test/builtins/gen/textureStore/7cec8d.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.spvasm b/test/builtins/gen/textureStore/7cec8d.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/7cec8d.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.wgsl b/test/builtins/gen/textureStore/7cec8d.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/7cec8d.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/7f7fae.wgsl b/test/builtins/gen/textureStore/7f7fae.wgsl
new file mode 100644
index 0000000..589db22
--- /dev/null
+++ b/test/builtins/gen/textureStore/7f7fae.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<f32>)
+fn textureStore_7f7fae() {
+  textureStore(arg_0, 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_7f7fae();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_7f7fae();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_7f7fae();
+}
diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.glsl b/test/builtins/gen/textureStore/7f7fae.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/7f7fae.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.hlsl b/test/builtins/gen/textureStore/7f7fae.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/7f7fae.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.msl b/test/builtins/gen/textureStore/7f7fae.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.msl
rename to test/builtins/gen/textureStore/7f7fae.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.spvasm b/test/builtins/gen/textureStore/7f7fae.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/7f7fae.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.wgsl b/test/builtins/gen/textureStore/7f7fae.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/7f7fae.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/804942.wgsl b/test/builtins/gen/textureStore/804942.wgsl
new file mode 100644
index 0000000..bcdd0c7
--- /dev/null
+++ b/test/builtins/gen/textureStore/804942.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<i32>)
+fn textureStore_804942() {
+  textureStore(arg_0, vec2<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_804942();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_804942();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_804942();
+}
diff --git a/test/intrinsics/gen/textureStore/804942.wgsl.expected.glsl b/test/builtins/gen/textureStore/804942.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/804942.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/804942.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/804942.wgsl.expected.hlsl b/test/builtins/gen/textureStore/804942.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/804942.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/804942.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/804942.wgsl.expected.msl b/test/builtins/gen/textureStore/804942.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/804942.wgsl.expected.msl
rename to test/builtins/gen/textureStore/804942.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/804942.wgsl.expected.spvasm b/test/builtins/gen/textureStore/804942.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/804942.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/804942.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/804942.wgsl.expected.wgsl b/test/builtins/gen/textureStore/804942.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/804942.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/804942.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/805dae.wgsl b/test/builtins/gen/textureStore/805dae.wgsl
new file mode 100644
index 0000000..15061f9
--- /dev/null
+++ b/test/builtins/gen/textureStore/805dae.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_805dae() {
+  textureStore(arg_0, vec2<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_805dae();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_805dae();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_805dae();
+}
diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.glsl b/test/builtins/gen/textureStore/805dae.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/805dae.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/805dae.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.hlsl b/test/builtins/gen/textureStore/805dae.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/805dae.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/805dae.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.msl b/test/builtins/gen/textureStore/805dae.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/805dae.wgsl.expected.msl
rename to test/builtins/gen/textureStore/805dae.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.spvasm b/test/builtins/gen/textureStore/805dae.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/805dae.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/805dae.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.wgsl b/test/builtins/gen/textureStore/805dae.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/805dae.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/805dae.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/83bcc1.wgsl b/test/builtins/gen/textureStore/83bcc1.wgsl
new file mode 100644
index 0000000..1e13ead
--- /dev/null
+++ b/test/builtins/gen/textureStore/83bcc1.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<u32>)
+fn textureStore_83bcc1() {
+  textureStore(arg_0, 1, vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_83bcc1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_83bcc1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_83bcc1();
+}
diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.glsl b/test/builtins/gen/textureStore/83bcc1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/83bcc1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.hlsl b/test/builtins/gen/textureStore/83bcc1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/83bcc1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.msl b/test/builtins/gen/textureStore/83bcc1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.msl
rename to test/builtins/gen/textureStore/83bcc1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.spvasm b/test/builtins/gen/textureStore/83bcc1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/83bcc1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.wgsl b/test/builtins/gen/textureStore/83bcc1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/83bcc1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/872747.wgsl b/test/builtins/gen/textureStore/872747.wgsl
new file mode 100644
index 0000000..8975750
--- /dev/null
+++ b/test/builtins/gen/textureStore/872747.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<f32>)
+fn textureStore_872747() {
+  textureStore(arg_0, 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_872747();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_872747();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_872747();
+}
diff --git a/test/intrinsics/gen/textureStore/872747.wgsl.expected.glsl b/test/builtins/gen/textureStore/872747.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/872747.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/872747.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/872747.wgsl.expected.hlsl b/test/builtins/gen/textureStore/872747.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/872747.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/872747.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/872747.wgsl.expected.msl b/test/builtins/gen/textureStore/872747.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/872747.wgsl.expected.msl
rename to test/builtins/gen/textureStore/872747.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/872747.wgsl.expected.spvasm b/test/builtins/gen/textureStore/872747.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/872747.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/872747.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/872747.wgsl.expected.wgsl b/test/builtins/gen/textureStore/872747.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/872747.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/872747.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/8e0479.wgsl b/test/builtins/gen/textureStore/8e0479.wgsl
new file mode 100644
index 0000000..265532c
--- /dev/null
+++ b/test/builtins/gen/textureStore/8e0479.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
+fn textureStore_8e0479() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8e0479();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_8e0479();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_8e0479();
+}
diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.glsl b/test/builtins/gen/textureStore/8e0479.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/8e0479.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/8e0479.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.hlsl b/test/builtins/gen/textureStore/8e0479.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/8e0479.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/8e0479.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.msl b/test/builtins/gen/textureStore/8e0479.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/8e0479.wgsl.expected.msl
rename to test/builtins/gen/textureStore/8e0479.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.spvasm b/test/builtins/gen/textureStore/8e0479.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/8e0479.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/8e0479.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.wgsl b/test/builtins/gen/textureStore/8e0479.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/8e0479.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/8e0479.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/8f71a1.wgsl b/test/builtins/gen/textureStore/8f71a1.wgsl
new file mode 100644
index 0000000..e2f77ff
--- /dev/null
+++ b/test/builtins/gen/textureStore/8f71a1.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<i32>)
+fn textureStore_8f71a1() {
+  textureStore(arg_0, vec3<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8f71a1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_8f71a1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_8f71a1();
+}
diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.glsl b/test/builtins/gen/textureStore/8f71a1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/8f71a1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.hlsl b/test/builtins/gen/textureStore/8f71a1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/8f71a1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.msl b/test/builtins/gen/textureStore/8f71a1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.msl
rename to test/builtins/gen/textureStore/8f71a1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.spvasm b/test/builtins/gen/textureStore/8f71a1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/8f71a1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.wgsl b/test/builtins/gen/textureStore/8f71a1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/8f71a1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/969534.wgsl b/test/builtins/gen/textureStore/969534.wgsl
new file mode 100644
index 0000000..c16476d
--- /dev/null
+++ b/test/builtins/gen/textureStore/969534.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<i32>)
+fn textureStore_969534() {
+  textureStore(arg_0, 1, vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_969534();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_969534();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_969534();
+}
diff --git a/test/intrinsics/gen/textureStore/969534.wgsl.expected.glsl b/test/builtins/gen/textureStore/969534.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/969534.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/969534.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/969534.wgsl.expected.hlsl b/test/builtins/gen/textureStore/969534.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/969534.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/969534.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/969534.wgsl.expected.msl b/test/builtins/gen/textureStore/969534.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/969534.wgsl.expected.msl
rename to test/builtins/gen/textureStore/969534.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/969534.wgsl.expected.spvasm b/test/builtins/gen/textureStore/969534.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/969534.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/969534.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/969534.wgsl.expected.wgsl b/test/builtins/gen/textureStore/969534.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/969534.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/969534.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/9a3ecc.wgsl b/test/builtins/gen/textureStore/9a3ecc.wgsl
new file mode 100644
index 0000000..0cb6232
--- /dev/null
+++ b/test/builtins/gen/textureStore/9a3ecc.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<i32>)
+fn textureStore_9a3ecc() {
+  textureStore(arg_0, vec3<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9a3ecc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_9a3ecc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_9a3ecc();
+}
diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.glsl b/test/builtins/gen/textureStore/9a3ecc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/9a3ecc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.hlsl b/test/builtins/gen/textureStore/9a3ecc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/9a3ecc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.msl b/test/builtins/gen/textureStore/9a3ecc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.msl
rename to test/builtins/gen/textureStore/9a3ecc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.spvasm b/test/builtins/gen/textureStore/9a3ecc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/9a3ecc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.wgsl b/test/builtins/gen/textureStore/9a3ecc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/9a3ecc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/9d9cd5.wgsl b/test/builtins/gen/textureStore/9d9cd5.wgsl
new file mode 100644
index 0000000..514db90
--- /dev/null
+++ b/test/builtins/gen/textureStore/9d9cd5.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
+fn textureStore_9d9cd5() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9d9cd5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_9d9cd5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_9d9cd5();
+}
diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.glsl b/test/builtins/gen/textureStore/9d9cd5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/9d9cd5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.hlsl b/test/builtins/gen/textureStore/9d9cd5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/9d9cd5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.msl b/test/builtins/gen/textureStore/9d9cd5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.msl
rename to test/builtins/gen/textureStore/9d9cd5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.spvasm b/test/builtins/gen/textureStore/9d9cd5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/9d9cd5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.wgsl b/test/builtins/gen/textureStore/9d9cd5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/9d9cd5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/9e3ec5.wgsl b/test/builtins/gen/textureStore/9e3ec5.wgsl
new file mode 100644
index 0000000..45a8963
--- /dev/null
+++ b/test/builtins/gen/textureStore/9e3ec5.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<i32>)
+fn textureStore_9e3ec5() {
+  textureStore(arg_0, vec2<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9e3ec5();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_9e3ec5();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_9e3ec5();
+}
diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.glsl b/test/builtins/gen/textureStore/9e3ec5.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/9e3ec5.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.hlsl b/test/builtins/gen/textureStore/9e3ec5.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/9e3ec5.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.msl b/test/builtins/gen/textureStore/9e3ec5.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.msl
rename to test/builtins/gen/textureStore/9e3ec5.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.spvasm b/test/builtins/gen/textureStore/9e3ec5.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/9e3ec5.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.wgsl b/test/builtins/gen/textureStore/9e3ec5.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/9e3ec5.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/ac67aa.wgsl b/test/builtins/gen/textureStore/ac67aa.wgsl
new file mode 100644
index 0000000..3431a53
--- /dev/null
+++ b/test/builtins/gen/textureStore/ac67aa.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rg32uint, write>, coords: vec3<i32>, value: vec4<u32>)
+fn textureStore_ac67aa() {
+  textureStore(arg_0, vec3<i32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_ac67aa();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_ac67aa();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_ac67aa();
+}
diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.glsl b/test/builtins/gen/textureStore/ac67aa.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/ac67aa.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.hlsl b/test/builtins/gen/textureStore/ac67aa.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/ac67aa.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.msl b/test/builtins/gen/textureStore/ac67aa.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.msl
rename to test/builtins/gen/textureStore/ac67aa.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.spvasm b/test/builtins/gen/textureStore/ac67aa.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/ac67aa.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.wgsl b/test/builtins/gen/textureStore/ac67aa.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/ac67aa.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/b706b1.wgsl b/test/builtins/gen/textureStore/b706b1.wgsl
new file mode 100644
index 0000000..3852067
--- /dev/null
+++ b/test/builtins/gen/textureStore/b706b1.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<i32>)
+fn textureStore_b706b1() {
+  textureStore(arg_0, vec3<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b706b1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_b706b1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_b706b1();
+}
diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.glsl b/test/builtins/gen/textureStore/b706b1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/b706b1.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/b706b1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.hlsl b/test/builtins/gen/textureStore/b706b1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/b706b1.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/b706b1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.msl b/test/builtins/gen/textureStore/b706b1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/b706b1.wgsl.expected.msl
rename to test/builtins/gen/textureStore/b706b1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.spvasm b/test/builtins/gen/textureStore/b706b1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/b706b1.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/b706b1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.wgsl b/test/builtins/gen/textureStore/b706b1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/b706b1.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/b706b1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/bbcb7f.wgsl b/test/builtins/gen/textureStore/bbcb7f.wgsl
new file mode 100644
index 0000000..84d3a16
--- /dev/null
+++ b/test/builtins/gen/textureStore/bbcb7f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<i32>)
+fn textureStore_bbcb7f() {
+  textureStore(arg_0, vec2<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_bbcb7f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_bbcb7f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_bbcb7f();
+}
diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.glsl b/test/builtins/gen/textureStore/bbcb7f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/bbcb7f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.hlsl b/test/builtins/gen/textureStore/bbcb7f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/bbcb7f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.msl b/test/builtins/gen/textureStore/bbcb7f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.msl
rename to test/builtins/gen/textureStore/bbcb7f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.spvasm b/test/builtins/gen/textureStore/bbcb7f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/bbcb7f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.wgsl b/test/builtins/gen/textureStore/bbcb7f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/bbcb7f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/be6e30.wgsl b/test/builtins/gen/textureStore/be6e30.wgsl
new file mode 100644
index 0000000..92713bb
--- /dev/null
+++ b/test/builtins/gen/textureStore/be6e30.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_be6e30() {
+  textureStore(arg_0, vec2<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_be6e30();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_be6e30();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_be6e30();
+}
diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.glsl b/test/builtins/gen/textureStore/be6e30.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/be6e30.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/be6e30.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.hlsl b/test/builtins/gen/textureStore/be6e30.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/be6e30.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/be6e30.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.msl b/test/builtins/gen/textureStore/be6e30.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/be6e30.wgsl.expected.msl
rename to test/builtins/gen/textureStore/be6e30.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.spvasm b/test/builtins/gen/textureStore/be6e30.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/be6e30.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/be6e30.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.wgsl b/test/builtins/gen/textureStore/be6e30.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/be6e30.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/be6e30.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/bf775c.wgsl b/test/builtins/gen/textureStore/bf775c.wgsl
new file mode 100644
index 0000000..5dc738f
--- /dev/null
+++ b/test/builtins/gen/textureStore/bf775c.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<i32>)
+fn textureStore_bf775c() {
+  textureStore(arg_0, 1, vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_bf775c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_bf775c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_bf775c();
+}
diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.glsl b/test/builtins/gen/textureStore/bf775c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/bf775c.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/bf775c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.hlsl b/test/builtins/gen/textureStore/bf775c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/bf775c.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/bf775c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.msl b/test/builtins/gen/textureStore/bf775c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/bf775c.wgsl.expected.msl
rename to test/builtins/gen/textureStore/bf775c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.spvasm b/test/builtins/gen/textureStore/bf775c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/bf775c.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/bf775c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.wgsl b/test/builtins/gen/textureStore/bf775c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/bf775c.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/bf775c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/c5af1e.wgsl b/test/builtins/gen/textureStore/c5af1e.wgsl
new file mode 100644
index 0000000..65b7ee8
--- /dev/null
+++ b/test/builtins/gen/textureStore/c5af1e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_c5af1e() {
+  textureStore(arg_0, vec3<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c5af1e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_c5af1e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_c5af1e();
+}
diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.glsl b/test/builtins/gen/textureStore/c5af1e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/c5af1e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.hlsl b/test/builtins/gen/textureStore/c5af1e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/c5af1e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.msl b/test/builtins/gen/textureStore/c5af1e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.msl
rename to test/builtins/gen/textureStore/c5af1e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.spvasm b/test/builtins/gen/textureStore/c5af1e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/c5af1e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.wgsl b/test/builtins/gen/textureStore/c5af1e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/c5af1e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/c863be.wgsl b/test/builtins/gen/textureStore/c863be.wgsl
new file mode 100644
index 0000000..6b97911
--- /dev/null
+++ b/test/builtins/gen/textureStore/c863be.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
+fn textureStore_c863be() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c863be();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_c863be();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_c863be();
+}
diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.glsl b/test/builtins/gen/textureStore/c863be.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/c863be.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/c863be.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.hlsl b/test/builtins/gen/textureStore/c863be.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/c863be.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/c863be.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.msl b/test/builtins/gen/textureStore/c863be.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/c863be.wgsl.expected.msl
rename to test/builtins/gen/textureStore/c863be.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.spvasm b/test/builtins/gen/textureStore/c863be.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/c863be.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/c863be.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.wgsl b/test/builtins/gen/textureStore/c863be.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/c863be.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/c863be.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/d73b5c.wgsl b/test/builtins/gen/textureStore/d73b5c.wgsl
new file mode 100644
index 0000000..ff53404
--- /dev/null
+++ b/test/builtins/gen/textureStore/d73b5c.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<i32>)
+fn textureStore_d73b5c() {
+  textureStore(arg_0, 1, vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d73b5c();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_d73b5c();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_d73b5c();
+}
diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.glsl b/test/builtins/gen/textureStore/d73b5c.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/d73b5c.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.hlsl b/test/builtins/gen/textureStore/d73b5c.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/d73b5c.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.msl b/test/builtins/gen/textureStore/d73b5c.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.msl
rename to test/builtins/gen/textureStore/d73b5c.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.spvasm b/test/builtins/gen/textureStore/d73b5c.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/d73b5c.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.wgsl b/test/builtins/gen/textureStore/d73b5c.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/d73b5c.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/dd7d81.wgsl b/test/builtins/gen/textureStore/dd7d81.wgsl
new file mode 100644
index 0000000..a9e5dda
--- /dev/null
+++ b/test/builtins/gen/textureStore/dd7d81.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_dd7d81() {
+  textureStore(arg_0, vec3<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_dd7d81();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_dd7d81();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_dd7d81();
+}
diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.glsl b/test/builtins/gen/textureStore/dd7d81.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/dd7d81.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.hlsl b/test/builtins/gen/textureStore/dd7d81.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/dd7d81.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.msl b/test/builtins/gen/textureStore/dd7d81.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.msl
rename to test/builtins/gen/textureStore/dd7d81.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.spvasm b/test/builtins/gen/textureStore/dd7d81.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/dd7d81.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.wgsl b/test/builtins/gen/textureStore/dd7d81.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/dd7d81.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/dde364.wgsl b/test/builtins/gen/textureStore/dde364.wgsl
new file mode 100644
index 0000000..1bf72fd
--- /dev/null
+++ b/test/builtins/gen/textureStore/dde364.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
+fn textureStore_dde364() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_dde364();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_dde364();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_dde364();
+}
diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.glsl b/test/builtins/gen/textureStore/dde364.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/dde364.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/dde364.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.hlsl b/test/builtins/gen/textureStore/dde364.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/dde364.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/dde364.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.msl b/test/builtins/gen/textureStore/dde364.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/dde364.wgsl.expected.msl
rename to test/builtins/gen/textureStore/dde364.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.spvasm b/test/builtins/gen/textureStore/dde364.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/dde364.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/dde364.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.wgsl b/test/builtins/gen/textureStore/dde364.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/dde364.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/dde364.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/e885e8.wgsl b/test/builtins/gen/textureStore/e885e8.wgsl
new file mode 100644
index 0000000..1aedddc
--- /dev/null
+++ b/test/builtins/gen/textureStore/e885e8.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<f32>)
+fn textureStore_e885e8() {
+  textureStore(arg_0, 1, vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_e885e8();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_e885e8();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_e885e8();
+}
diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.glsl b/test/builtins/gen/textureStore/e885e8.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/e885e8.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/e885e8.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.hlsl b/test/builtins/gen/textureStore/e885e8.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/e885e8.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/e885e8.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.msl b/test/builtins/gen/textureStore/e885e8.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/e885e8.wgsl.expected.msl
rename to test/builtins/gen/textureStore/e885e8.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.spvasm b/test/builtins/gen/textureStore/e885e8.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/e885e8.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/e885e8.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.wgsl b/test/builtins/gen/textureStore/e885e8.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/e885e8.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/e885e8.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/eb702f.wgsl b/test/builtins/gen/textureStore/eb702f.wgsl
new file mode 100644
index 0000000..0974770
--- /dev/null
+++ b/test/builtins/gen/textureStore/eb702f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_eb702f() {
+  textureStore(arg_0, vec3<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_eb702f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_eb702f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_eb702f();
+}
diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.glsl b/test/builtins/gen/textureStore/eb702f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/eb702f.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/eb702f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.hlsl b/test/builtins/gen/textureStore/eb702f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/eb702f.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/eb702f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.msl b/test/builtins/gen/textureStore/eb702f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/eb702f.wgsl.expected.msl
rename to test/builtins/gen/textureStore/eb702f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.spvasm b/test/builtins/gen/textureStore/eb702f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/eb702f.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/eb702f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.wgsl b/test/builtins/gen/textureStore/eb702f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/eb702f.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/eb702f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/eb78b9.wgsl b/test/builtins/gen/textureStore/eb78b9.wgsl
new file mode 100644
index 0000000..d0416f9
--- /dev/null
+++ b/test/builtins/gen/textureStore/eb78b9.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<i32>)
+fn textureStore_eb78b9() {
+  textureStore(arg_0, vec3<i32>(), vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_eb78b9();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_eb78b9();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_eb78b9();
+}
diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.glsl b/test/builtins/gen/textureStore/eb78b9.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/eb78b9.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.hlsl b/test/builtins/gen/textureStore/eb78b9.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/eb78b9.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.msl b/test/builtins/gen/textureStore/eb78b9.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.msl
rename to test/builtins/gen/textureStore/eb78b9.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.spvasm b/test/builtins/gen/textureStore/eb78b9.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/eb78b9.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.wgsl b/test/builtins/gen/textureStore/eb78b9.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/eb78b9.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/ee6acc.wgsl b/test/builtins/gen/textureStore/ee6acc.wgsl
new file mode 100644
index 0000000..80976c4
--- /dev/null
+++ b/test/builtins/gen/textureStore/ee6acc.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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<i32>, value: vec4<f32>)
+fn textureStore_ee6acc() {
+  textureStore(arg_0, vec3<i32>(), vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_ee6acc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_ee6acc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_ee6acc();
+}
diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.glsl b/test/builtins/gen/textureStore/ee6acc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/ee6acc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.hlsl b/test/builtins/gen/textureStore/ee6acc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/ee6acc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.msl b/test/builtins/gen/textureStore/ee6acc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.msl
rename to test/builtins/gen/textureStore/ee6acc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.spvasm b/test/builtins/gen/textureStore/ee6acc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/ee6acc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.wgsl b/test/builtins/gen/textureStore/ee6acc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/ee6acc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/ef9f2f.wgsl b/test/builtins/gen/textureStore/ef9f2f.wgsl
new file mode 100644
index 0000000..5913a24
--- /dev/null
+++ b/test/builtins/gen/textureStore/ef9f2f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_3d<r32uint, write>, coords: vec3<i32>, value: vec4<u32>)
+fn textureStore_ef9f2f() {
+  textureStore(arg_0, vec3<i32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_ef9f2f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_ef9f2f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_ef9f2f();
+}
diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.glsl b/test/builtins/gen/textureStore/ef9f2f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/ef9f2f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.hlsl b/test/builtins/gen/textureStore/ef9f2f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/ef9f2f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.msl b/test/builtins/gen/textureStore/ef9f2f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.msl
rename to test/builtins/gen/textureStore/ef9f2f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.spvasm b/test/builtins/gen/textureStore/ef9f2f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/ef9f2f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.wgsl b/test/builtins/gen/textureStore/ef9f2f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/ef9f2f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/f8dead.wgsl b/test/builtins/gen/textureStore/f8dead.wgsl
new file mode 100644
index 0000000..955c42c
--- /dev/null
+++ b/test/builtins/gen/textureStore/f8dead.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8uint, write>, coords: vec3<i32>, value: vec4<u32>)
+fn textureStore_f8dead() {
+  textureStore(arg_0, vec3<i32>(), vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_f8dead();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_f8dead();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_f8dead();
+}
diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.glsl b/test/builtins/gen/textureStore/f8dead.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/f8dead.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/f8dead.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.hlsl b/test/builtins/gen/textureStore/f8dead.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/f8dead.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/f8dead.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.msl b/test/builtins/gen/textureStore/f8dead.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/f8dead.wgsl.expected.msl
rename to test/builtins/gen/textureStore/f8dead.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.spvasm b/test/builtins/gen/textureStore/f8dead.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/f8dead.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/f8dead.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.wgsl b/test/builtins/gen/textureStore/f8dead.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/f8dead.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/f8dead.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/f9be83.wgsl b/test/builtins/gen/textureStore/f9be83.wgsl
new file mode 100644
index 0000000..f0627b4
--- /dev/null
+++ b/test/builtins/gen/textureStore/f9be83.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
+fn textureStore_f9be83() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_f9be83();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_f9be83();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_f9be83();
+}
diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.glsl b/test/builtins/gen/textureStore/f9be83.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/f9be83.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/f9be83.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.hlsl b/test/builtins/gen/textureStore/f9be83.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/f9be83.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/f9be83.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.msl b/test/builtins/gen/textureStore/f9be83.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/f9be83.wgsl.expected.msl
rename to test/builtins/gen/textureStore/f9be83.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.spvasm b/test/builtins/gen/textureStore/f9be83.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/f9be83.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/f9be83.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.wgsl b/test/builtins/gen/textureStore/f9be83.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/f9be83.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/f9be83.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/fb9a8f.wgsl b/test/builtins/gen/textureStore/fb9a8f.wgsl
new file mode 100644
index 0000000..9fcc489
--- /dev/null
+++ b/test/builtins/gen/textureStore/fb9a8f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// 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: i32, value: vec4<u32>)
+fn textureStore_fb9a8f() {
+  textureStore(arg_0, 1, vec4<u32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_fb9a8f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_fb9a8f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_fb9a8f();
+}
diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.glsl b/test/builtins/gen/textureStore/fb9a8f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/fb9a8f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.hlsl b/test/builtins/gen/textureStore/fb9a8f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/fb9a8f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.msl b/test/builtins/gen/textureStore/fb9a8f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.msl
rename to test/builtins/gen/textureStore/fb9a8f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.spvasm b/test/builtins/gen/textureStore/fb9a8f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/fb9a8f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.wgsl b/test/builtins/gen/textureStore/fb9a8f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/fb9a8f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/textureStore/fbf53f.wgsl b/test/builtins/gen/textureStore/fbf53f.wgsl
new file mode 100644
index 0000000..158d3f0
--- /dev/null
+++ b/test/builtins/gen/textureStore/fbf53f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
+fn textureStore_fbf53f() {
+  textureStore(arg_0, vec2<i32>(), 1, vec4<i32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_fbf53f();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  textureStore_fbf53f();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  textureStore_fbf53f();
+}
diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.glsl b/test/builtins/gen/textureStore/fbf53f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.glsl
rename to test/builtins/gen/textureStore/fbf53f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.hlsl b/test/builtins/gen/textureStore/fbf53f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.hlsl
rename to test/builtins/gen/textureStore/fbf53f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.msl b/test/builtins/gen/textureStore/fbf53f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.msl
rename to test/builtins/gen/textureStore/fbf53f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.spvasm b/test/builtins/gen/textureStore/fbf53f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.spvasm
rename to test/builtins/gen/textureStore/fbf53f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.wgsl b/test/builtins/gen/textureStore/fbf53f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.wgsl
rename to test/builtins/gen/textureStore/fbf53f.wgsl.expected.wgsl
diff --git a/test/builtins/gen/transpose/2585cd.wgsl b/test/builtins/gen/transpose/2585cd.wgsl
new file mode 100644
index 0000000..93d79ad
--- /dev/null
+++ b/test/builtins/gen/transpose/2585cd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn transpose(mat<4, 3, f32>) -> mat<3, 4, f32>
+fn transpose_2585cd() {
+  var res: mat3x4<f32> = transpose(mat4x3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_2585cd();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  transpose_2585cd();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  transpose_2585cd();
+}
diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.glsl b/test/builtins/gen/transpose/2585cd.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/transpose/2585cd.wgsl.expected.glsl
rename to test/builtins/gen/transpose/2585cd.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.hlsl b/test/builtins/gen/transpose/2585cd.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/transpose/2585cd.wgsl.expected.hlsl
rename to test/builtins/gen/transpose/2585cd.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.msl b/test/builtins/gen/transpose/2585cd.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/transpose/2585cd.wgsl.expected.msl
rename to test/builtins/gen/transpose/2585cd.wgsl.expected.msl
diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.spvasm b/test/builtins/gen/transpose/2585cd.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/transpose/2585cd.wgsl.expected.spvasm
rename to test/builtins/gen/transpose/2585cd.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.wgsl b/test/builtins/gen/transpose/2585cd.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/transpose/2585cd.wgsl.expected.wgsl
rename to test/builtins/gen/transpose/2585cd.wgsl.expected.wgsl
diff --git a/test/builtins/gen/transpose/31d679.wgsl b/test/builtins/gen/transpose/31d679.wgsl
new file mode 100644
index 0000000..0d59682
--- /dev/null
+++ b/test/builtins/gen/transpose/31d679.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn transpose(mat<2, 2, f32>) -> mat<2, 2, f32>
+fn transpose_31d679() {
+  var res: mat2x2<f32> = transpose(mat2x2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_31d679();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  transpose_31d679();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  transpose_31d679();
+}
diff --git a/test/intrinsics/gen/transpose/31d679.wgsl.expected.glsl b/test/builtins/gen/transpose/31d679.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/transpose/31d679.wgsl.expected.glsl
rename to test/builtins/gen/transpose/31d679.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/transpose/31d679.wgsl.expected.hlsl b/test/builtins/gen/transpose/31d679.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/transpose/31d679.wgsl.expected.hlsl
rename to test/builtins/gen/transpose/31d679.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/transpose/31d679.wgsl.expected.msl b/test/builtins/gen/transpose/31d679.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/transpose/31d679.wgsl.expected.msl
rename to test/builtins/gen/transpose/31d679.wgsl.expected.msl
diff --git a/test/intrinsics/gen/transpose/31d679.wgsl.expected.spvasm b/test/builtins/gen/transpose/31d679.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/transpose/31d679.wgsl.expected.spvasm
rename to test/builtins/gen/transpose/31d679.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/transpose/31d679.wgsl.expected.wgsl b/test/builtins/gen/transpose/31d679.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/transpose/31d679.wgsl.expected.wgsl
rename to test/builtins/gen/transpose/31d679.wgsl.expected.wgsl
diff --git a/test/builtins/gen/transpose/31e37e.wgsl b/test/builtins/gen/transpose/31e37e.wgsl
new file mode 100644
index 0000000..9773170
--- /dev/null
+++ b/test/builtins/gen/transpose/31e37e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn transpose(mat<4, 2, f32>) -> mat<2, 4, f32>
+fn transpose_31e37e() {
+  var res: mat2x4<f32> = transpose(mat4x2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_31e37e();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  transpose_31e37e();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  transpose_31e37e();
+}
diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.glsl b/test/builtins/gen/transpose/31e37e.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/transpose/31e37e.wgsl.expected.glsl
rename to test/builtins/gen/transpose/31e37e.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.hlsl b/test/builtins/gen/transpose/31e37e.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/transpose/31e37e.wgsl.expected.hlsl
rename to test/builtins/gen/transpose/31e37e.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.msl b/test/builtins/gen/transpose/31e37e.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/transpose/31e37e.wgsl.expected.msl
rename to test/builtins/gen/transpose/31e37e.wgsl.expected.msl
diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.spvasm b/test/builtins/gen/transpose/31e37e.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/transpose/31e37e.wgsl.expected.spvasm
rename to test/builtins/gen/transpose/31e37e.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.wgsl b/test/builtins/gen/transpose/31e37e.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/transpose/31e37e.wgsl.expected.wgsl
rename to test/builtins/gen/transpose/31e37e.wgsl.expected.wgsl
diff --git a/test/builtins/gen/transpose/4ce359.wgsl b/test/builtins/gen/transpose/4ce359.wgsl
new file mode 100644
index 0000000..88b25bc
--- /dev/null
+++ b/test/builtins/gen/transpose/4ce359.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn transpose(mat<2, 4, f32>) -> mat<4, 2, f32>
+fn transpose_4ce359() {
+  var res: mat4x2<f32> = transpose(mat2x4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_4ce359();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  transpose_4ce359();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  transpose_4ce359();
+}
diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.glsl b/test/builtins/gen/transpose/4ce359.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/transpose/4ce359.wgsl.expected.glsl
rename to test/builtins/gen/transpose/4ce359.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.hlsl b/test/builtins/gen/transpose/4ce359.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/transpose/4ce359.wgsl.expected.hlsl
rename to test/builtins/gen/transpose/4ce359.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.msl b/test/builtins/gen/transpose/4ce359.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/transpose/4ce359.wgsl.expected.msl
rename to test/builtins/gen/transpose/4ce359.wgsl.expected.msl
diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.spvasm b/test/builtins/gen/transpose/4ce359.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/transpose/4ce359.wgsl.expected.spvasm
rename to test/builtins/gen/transpose/4ce359.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.wgsl b/test/builtins/gen/transpose/4ce359.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/transpose/4ce359.wgsl.expected.wgsl
rename to test/builtins/gen/transpose/4ce359.wgsl.expected.wgsl
diff --git a/test/builtins/gen/transpose/4dc9a1.wgsl b/test/builtins/gen/transpose/4dc9a1.wgsl
new file mode 100644
index 0000000..9cc6473
--- /dev/null
+++ b/test/builtins/gen/transpose/4dc9a1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn transpose(mat<2, 3, f32>) -> mat<3, 2, f32>
+fn transpose_4dc9a1() {
+  var res: mat3x2<f32> = transpose(mat2x3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_4dc9a1();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  transpose_4dc9a1();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  transpose_4dc9a1();
+}
diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.glsl b/test/builtins/gen/transpose/4dc9a1.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.glsl
rename to test/builtins/gen/transpose/4dc9a1.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.hlsl b/test/builtins/gen/transpose/4dc9a1.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.hlsl
rename to test/builtins/gen/transpose/4dc9a1.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.msl b/test/builtins/gen/transpose/4dc9a1.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.msl
rename to test/builtins/gen/transpose/4dc9a1.wgsl.expected.msl
diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.spvasm b/test/builtins/gen/transpose/4dc9a1.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.spvasm
rename to test/builtins/gen/transpose/4dc9a1.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.wgsl b/test/builtins/gen/transpose/4dc9a1.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.wgsl
rename to test/builtins/gen/transpose/4dc9a1.wgsl.expected.wgsl
diff --git a/test/builtins/gen/transpose/854336.wgsl b/test/builtins/gen/transpose/854336.wgsl
new file mode 100644
index 0000000..a6ed5e3
--- /dev/null
+++ b/test/builtins/gen/transpose/854336.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn transpose(mat<3, 3, f32>) -> mat<3, 3, f32>
+fn transpose_854336() {
+  var res: mat3x3<f32> = transpose(mat3x3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_854336();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  transpose_854336();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  transpose_854336();
+}
diff --git a/test/intrinsics/gen/transpose/854336.wgsl.expected.glsl b/test/builtins/gen/transpose/854336.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/transpose/854336.wgsl.expected.glsl
rename to test/builtins/gen/transpose/854336.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/transpose/854336.wgsl.expected.hlsl b/test/builtins/gen/transpose/854336.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/transpose/854336.wgsl.expected.hlsl
rename to test/builtins/gen/transpose/854336.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/transpose/854336.wgsl.expected.msl b/test/builtins/gen/transpose/854336.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/transpose/854336.wgsl.expected.msl
rename to test/builtins/gen/transpose/854336.wgsl.expected.msl
diff --git a/test/intrinsics/gen/transpose/854336.wgsl.expected.spvasm b/test/builtins/gen/transpose/854336.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/transpose/854336.wgsl.expected.spvasm
rename to test/builtins/gen/transpose/854336.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/transpose/854336.wgsl.expected.wgsl b/test/builtins/gen/transpose/854336.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/transpose/854336.wgsl.expected.wgsl
rename to test/builtins/gen/transpose/854336.wgsl.expected.wgsl
diff --git a/test/builtins/gen/transpose/c1b600.wgsl b/test/builtins/gen/transpose/c1b600.wgsl
new file mode 100644
index 0000000..fdc47dc
--- /dev/null
+++ b/test/builtins/gen/transpose/c1b600.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn transpose(mat<4, 4, f32>) -> mat<4, 4, f32>
+fn transpose_c1b600() {
+  var res: mat4x4<f32> = transpose(mat4x4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_c1b600();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  transpose_c1b600();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  transpose_c1b600();
+}
diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.glsl b/test/builtins/gen/transpose/c1b600.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/transpose/c1b600.wgsl.expected.glsl
rename to test/builtins/gen/transpose/c1b600.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.hlsl b/test/builtins/gen/transpose/c1b600.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/transpose/c1b600.wgsl.expected.hlsl
rename to test/builtins/gen/transpose/c1b600.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.msl b/test/builtins/gen/transpose/c1b600.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/transpose/c1b600.wgsl.expected.msl
rename to test/builtins/gen/transpose/c1b600.wgsl.expected.msl
diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.spvasm b/test/builtins/gen/transpose/c1b600.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/transpose/c1b600.wgsl.expected.spvasm
rename to test/builtins/gen/transpose/c1b600.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.wgsl b/test/builtins/gen/transpose/c1b600.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/transpose/c1b600.wgsl.expected.wgsl
rename to test/builtins/gen/transpose/c1b600.wgsl.expected.wgsl
diff --git a/test/builtins/gen/transpose/d8f8ba.wgsl b/test/builtins/gen/transpose/d8f8ba.wgsl
new file mode 100644
index 0000000..d22d71d
--- /dev/null
+++ b/test/builtins/gen/transpose/d8f8ba.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn transpose(mat<3, 4, f32>) -> mat<4, 3, f32>
+fn transpose_d8f8ba() {
+  var res: mat4x3<f32> = transpose(mat3x4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_d8f8ba();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  transpose_d8f8ba();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  transpose_d8f8ba();
+}
diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.glsl b/test/builtins/gen/transpose/d8f8ba.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.glsl
rename to test/builtins/gen/transpose/d8f8ba.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.hlsl b/test/builtins/gen/transpose/d8f8ba.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.hlsl
rename to test/builtins/gen/transpose/d8f8ba.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.msl b/test/builtins/gen/transpose/d8f8ba.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.msl
rename to test/builtins/gen/transpose/d8f8ba.wgsl.expected.msl
diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.spvasm b/test/builtins/gen/transpose/d8f8ba.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.spvasm
rename to test/builtins/gen/transpose/d8f8ba.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.wgsl b/test/builtins/gen/transpose/d8f8ba.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.wgsl
rename to test/builtins/gen/transpose/d8f8ba.wgsl.expected.wgsl
diff --git a/test/builtins/gen/transpose/ed4bdc.wgsl b/test/builtins/gen/transpose/ed4bdc.wgsl
new file mode 100644
index 0000000..5fd4e48
--- /dev/null
+++ b/test/builtins/gen/transpose/ed4bdc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn transpose(mat<3, 2, f32>) -> mat<2, 3, f32>
+fn transpose_ed4bdc() {
+  var res: mat2x3<f32> = transpose(mat3x2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_ed4bdc();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  transpose_ed4bdc();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  transpose_ed4bdc();
+}
diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.glsl b/test/builtins/gen/transpose/ed4bdc.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.glsl
rename to test/builtins/gen/transpose/ed4bdc.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.hlsl b/test/builtins/gen/transpose/ed4bdc.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.hlsl
rename to test/builtins/gen/transpose/ed4bdc.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.msl b/test/builtins/gen/transpose/ed4bdc.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.msl
rename to test/builtins/gen/transpose/ed4bdc.wgsl.expected.msl
diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.spvasm b/test/builtins/gen/transpose/ed4bdc.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.spvasm
rename to test/builtins/gen/transpose/ed4bdc.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.wgsl b/test/builtins/gen/transpose/ed4bdc.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.wgsl
rename to test/builtins/gen/transpose/ed4bdc.wgsl.expected.wgsl
diff --git a/test/builtins/gen/trunc/562d05.wgsl b/test/builtins/gen/trunc/562d05.wgsl
new file mode 100644
index 0000000..1d792e8
--- /dev/null
+++ b/test/builtins/gen/trunc/562d05.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn trunc(vec<3, f32>) -> vec<3, f32>
+fn trunc_562d05() {
+  var res: vec3<f32> = trunc(vec3<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_562d05();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  trunc_562d05();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  trunc_562d05();
+}
diff --git a/test/intrinsics/gen/trunc/562d05.wgsl.expected.glsl b/test/builtins/gen/trunc/562d05.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/trunc/562d05.wgsl.expected.glsl
rename to test/builtins/gen/trunc/562d05.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/trunc/562d05.wgsl.expected.hlsl b/test/builtins/gen/trunc/562d05.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/trunc/562d05.wgsl.expected.hlsl
rename to test/builtins/gen/trunc/562d05.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/trunc/562d05.wgsl.expected.msl b/test/builtins/gen/trunc/562d05.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/trunc/562d05.wgsl.expected.msl
rename to test/builtins/gen/trunc/562d05.wgsl.expected.msl
diff --git a/test/intrinsics/gen/trunc/562d05.wgsl.expected.spvasm b/test/builtins/gen/trunc/562d05.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/trunc/562d05.wgsl.expected.spvasm
rename to test/builtins/gen/trunc/562d05.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/trunc/562d05.wgsl.expected.wgsl b/test/builtins/gen/trunc/562d05.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/trunc/562d05.wgsl.expected.wgsl
rename to test/builtins/gen/trunc/562d05.wgsl.expected.wgsl
diff --git a/test/builtins/gen/trunc/e183aa.wgsl b/test/builtins/gen/trunc/e183aa.wgsl
new file mode 100644
index 0000000..d719d01
--- /dev/null
+++ b/test/builtins/gen/trunc/e183aa.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn trunc(vec<4, f32>) -> vec<4, f32>
+fn trunc_e183aa() {
+  var res: vec4<f32> = trunc(vec4<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_e183aa();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  trunc_e183aa();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  trunc_e183aa();
+}
diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.glsl b/test/builtins/gen/trunc/e183aa.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/trunc/e183aa.wgsl.expected.glsl
rename to test/builtins/gen/trunc/e183aa.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.hlsl b/test/builtins/gen/trunc/e183aa.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/trunc/e183aa.wgsl.expected.hlsl
rename to test/builtins/gen/trunc/e183aa.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.msl b/test/builtins/gen/trunc/e183aa.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/trunc/e183aa.wgsl.expected.msl
rename to test/builtins/gen/trunc/e183aa.wgsl.expected.msl
diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.spvasm b/test/builtins/gen/trunc/e183aa.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/trunc/e183aa.wgsl.expected.spvasm
rename to test/builtins/gen/trunc/e183aa.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.wgsl b/test/builtins/gen/trunc/e183aa.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/trunc/e183aa.wgsl.expected.wgsl
rename to test/builtins/gen/trunc/e183aa.wgsl.expected.wgsl
diff --git a/test/builtins/gen/trunc/eb83df.wgsl b/test/builtins/gen/trunc/eb83df.wgsl
new file mode 100644
index 0000000..685dcba
--- /dev/null
+++ b/test/builtins/gen/trunc/eb83df.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn trunc(f32) -> f32
+fn trunc_eb83df() {
+  var res: f32 = trunc(1.0);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_eb83df();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  trunc_eb83df();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  trunc_eb83df();
+}
diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.glsl b/test/builtins/gen/trunc/eb83df.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/trunc/eb83df.wgsl.expected.glsl
rename to test/builtins/gen/trunc/eb83df.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.hlsl b/test/builtins/gen/trunc/eb83df.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/trunc/eb83df.wgsl.expected.hlsl
rename to test/builtins/gen/trunc/eb83df.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.msl b/test/builtins/gen/trunc/eb83df.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/trunc/eb83df.wgsl.expected.msl
rename to test/builtins/gen/trunc/eb83df.wgsl.expected.msl
diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.spvasm b/test/builtins/gen/trunc/eb83df.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/trunc/eb83df.wgsl.expected.spvasm
rename to test/builtins/gen/trunc/eb83df.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.wgsl b/test/builtins/gen/trunc/eb83df.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/trunc/eb83df.wgsl.expected.wgsl
rename to test/builtins/gen/trunc/eb83df.wgsl.expected.wgsl
diff --git a/test/builtins/gen/trunc/f370d3.wgsl b/test/builtins/gen/trunc/f370d3.wgsl
new file mode 100644
index 0000000..dbf5a05
--- /dev/null
+++ b/test/builtins/gen/trunc/f370d3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn trunc(vec<2, f32>) -> vec<2, f32>
+fn trunc_f370d3() {
+  var res: vec2<f32> = trunc(vec2<f32>());
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_f370d3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  trunc_f370d3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  trunc_f370d3();
+}
diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.glsl b/test/builtins/gen/trunc/f370d3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/trunc/f370d3.wgsl.expected.glsl
rename to test/builtins/gen/trunc/f370d3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.hlsl b/test/builtins/gen/trunc/f370d3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/trunc/f370d3.wgsl.expected.hlsl
rename to test/builtins/gen/trunc/f370d3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.msl b/test/builtins/gen/trunc/f370d3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/trunc/f370d3.wgsl.expected.msl
rename to test/builtins/gen/trunc/f370d3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.spvasm b/test/builtins/gen/trunc/f370d3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/trunc/f370d3.wgsl.expected.spvasm
rename to test/builtins/gen/trunc/f370d3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.wgsl b/test/builtins/gen/trunc/f370d3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/trunc/f370d3.wgsl.expected.wgsl
rename to test/builtins/gen/trunc/f370d3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/unpack2x16float/32a5cf.wgsl b/test/builtins/gen/unpack2x16float/32a5cf.wgsl
new file mode 100644
index 0000000..c270720
--- /dev/null
+++ b/test/builtins/gen/unpack2x16float/32a5cf.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn unpack2x16float(u32) -> vec2<f32>
+fn unpack2x16float_32a5cf() {
+  var res: vec2<f32> = unpack2x16float(1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  unpack2x16float_32a5cf();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  unpack2x16float_32a5cf();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  unpack2x16float_32a5cf();
+}
diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.glsl b/test/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.glsl
rename to test/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl b/test/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl
rename to test/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.msl b/test/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.msl
rename to test/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.msl
diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.spvasm b/test/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.spvasm
rename to test/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.wgsl b/test/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.wgsl
rename to test/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.wgsl
diff --git a/test/builtins/gen/unpack2x16snorm/b4aea6.wgsl b/test/builtins/gen/unpack2x16snorm/b4aea6.wgsl
new file mode 100644
index 0000000..7a284ce
--- /dev/null
+++ b/test/builtins/gen/unpack2x16snorm/b4aea6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn unpack2x16snorm(u32) -> vec2<f32>
+fn unpack2x16snorm_b4aea6() {
+  var res: vec2<f32> = unpack2x16snorm(1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  unpack2x16snorm_b4aea6();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  unpack2x16snorm_b4aea6();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  unpack2x16snorm_b4aea6();
+}
diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.glsl b/test/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.glsl
rename to test/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl b/test/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl
rename to test/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl b/test/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl
rename to test/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl
diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.spvasm b/test/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.spvasm
rename to test/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.wgsl b/test/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.wgsl
rename to test/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.wgsl
diff --git a/test/builtins/gen/unpack2x16unorm/7699c0.wgsl b/test/builtins/gen/unpack2x16unorm/7699c0.wgsl
new file mode 100644
index 0000000..9e20260
--- /dev/null
+++ b/test/builtins/gen/unpack2x16unorm/7699c0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn unpack2x16unorm(u32) -> vec2<f32>
+fn unpack2x16unorm_7699c0() {
+  var res: vec2<f32> = unpack2x16unorm(1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  unpack2x16unorm_7699c0();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  unpack2x16unorm_7699c0();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  unpack2x16unorm_7699c0();
+}
diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.glsl b/test/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.glsl
rename to test/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl b/test/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl
rename to test/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.msl b/test/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.msl
rename to test/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.msl
diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.spvasm b/test/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.spvasm
rename to test/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.wgsl b/test/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.wgsl
rename to test/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.wgsl
diff --git a/test/builtins/gen/unpack4x8snorm/523fb3.wgsl b/test/builtins/gen/unpack4x8snorm/523fb3.wgsl
new file mode 100644
index 0000000..a6495ea
--- /dev/null
+++ b/test/builtins/gen/unpack4x8snorm/523fb3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn unpack4x8snorm(u32) -> vec4<f32>
+fn unpack4x8snorm_523fb3() {
+  var res: vec4<f32> = unpack4x8snorm(1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  unpack4x8snorm_523fb3();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  unpack4x8snorm_523fb3();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  unpack4x8snorm_523fb3();
+}
diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.glsl b/test/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.glsl
rename to test/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl b/test/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl
rename to test/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.msl b/test/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.msl
rename to test/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.msl
diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.spvasm b/test/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.spvasm
rename to test/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.wgsl b/test/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.wgsl
rename to test/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.wgsl
diff --git a/test/builtins/gen/unpack4x8unorm/750c74.wgsl b/test/builtins/gen/unpack4x8unorm/750c74.wgsl
new file mode 100644
index 0000000..89fa81c
--- /dev/null
+++ b/test/builtins/gen/unpack4x8unorm/750c74.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn unpack4x8unorm(u32) -> vec4<f32>
+fn unpack4x8unorm_750c74() {
+  var res: vec4<f32> = unpack4x8unorm(1u);
+}
+
+@stage(vertex)
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  unpack4x8unorm_750c74();
+  return vec4<f32>();
+}
+
+@stage(fragment)
+fn fragment_main() {
+  unpack4x8unorm_750c74();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  unpack4x8unorm_750c74();
+}
diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.glsl b/test/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.glsl
rename to test/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl b/test/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl
rename to test/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.msl b/test/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.msl
rename to test/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.msl
diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.spvasm b/test/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.spvasm
rename to test/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.wgsl b/test/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.wgsl
rename to test/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.wgsl
diff --git a/test/builtins/gen/workgroupBarrier/a17f7f.wgsl b/test/builtins/gen/workgroupBarrier/a17f7f.wgsl
new file mode 100644
index 0000000..89fc240
--- /dev/null
+++ b/test/builtins/gen/workgroupBarrier/a17f7f.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   test/builtins/builtins.wgsl.tmpl
+// and the builtin defintion file:
+//   src/builtins.def
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// fn workgroupBarrier()
+fn workgroupBarrier_a17f7f() {
+  workgroupBarrier();
+}
+
+@stage(compute) @workgroup_size(1)
+fn compute_main() {
+  workgroupBarrier_a17f7f();
+}
diff --git a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.glsl b/test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.glsl
rename to test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.glsl
diff --git a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.hlsl b/test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.hlsl
rename to test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.hlsl
diff --git a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.msl b/test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.msl
rename to test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.msl
diff --git a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.spvasm b/test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.spvasm
rename to test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.spvasm
diff --git a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.wgsl b/test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.wgsl
rename to test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.wgsl
diff --git a/test/intrinsics/modf.wgsl b/test/builtins/modf.wgsl
similarity index 100%
rename from test/intrinsics/modf.wgsl
rename to test/builtins/modf.wgsl
diff --git a/test/intrinsics/modf.wgsl.expected.glsl b/test/builtins/modf.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/modf.wgsl.expected.glsl
rename to test/builtins/modf.wgsl.expected.glsl
diff --git a/test/intrinsics/modf.wgsl.expected.hlsl b/test/builtins/modf.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/modf.wgsl.expected.hlsl
rename to test/builtins/modf.wgsl.expected.hlsl
diff --git a/test/intrinsics/modf.wgsl.expected.msl b/test/builtins/modf.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/modf.wgsl.expected.msl
rename to test/builtins/modf.wgsl.expected.msl
diff --git a/test/intrinsics/modf.wgsl.expected.spvasm b/test/builtins/modf.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/modf.wgsl.expected.spvasm
rename to test/builtins/modf.wgsl.expected.spvasm
diff --git a/test/intrinsics/modf.wgsl.expected.wgsl b/test/builtins/modf.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/modf.wgsl.expected.wgsl
rename to test/builtins/modf.wgsl.expected.wgsl
diff --git a/test/intrinsics/radians.spvasm b/test/builtins/radians.spvasm
similarity index 100%
rename from test/intrinsics/radians.spvasm
rename to test/builtins/radians.spvasm
diff --git a/test/intrinsics/radians.spvasm.expected.glsl b/test/builtins/radians.spvasm.expected.glsl
similarity index 100%
rename from test/intrinsics/radians.spvasm.expected.glsl
rename to test/builtins/radians.spvasm.expected.glsl
diff --git a/test/intrinsics/radians.spvasm.expected.hlsl b/test/builtins/radians.spvasm.expected.hlsl
similarity index 100%
rename from test/intrinsics/radians.spvasm.expected.hlsl
rename to test/builtins/radians.spvasm.expected.hlsl
diff --git a/test/intrinsics/radians.spvasm.expected.msl b/test/builtins/radians.spvasm.expected.msl
similarity index 100%
rename from test/intrinsics/radians.spvasm.expected.msl
rename to test/builtins/radians.spvasm.expected.msl
diff --git a/test/intrinsics/radians.spvasm.expected.spvasm b/test/builtins/radians.spvasm.expected.spvasm
similarity index 100%
rename from test/intrinsics/radians.spvasm.expected.spvasm
rename to test/builtins/radians.spvasm.expected.spvasm
diff --git a/test/intrinsics/radians.spvasm.expected.wgsl b/test/builtins/radians.spvasm.expected.wgsl
similarity index 100%
rename from test/intrinsics/radians.spvasm.expected.wgsl
rename to test/builtins/radians.spvasm.expected.wgsl
diff --git a/test/intrinsics/repeated_use.wgsl b/test/builtins/repeated_use.wgsl
similarity index 100%
rename from test/intrinsics/repeated_use.wgsl
rename to test/builtins/repeated_use.wgsl
diff --git a/test/builtins/repeated_use.wgsl.expected.glsl b/test/builtins/repeated_use.wgsl.expected.glsl
new file mode 100644
index 0000000..450afef
--- /dev/null
+++ b/test/builtins/repeated_use.wgsl.expected.glsl
@@ -0,0 +1,105 @@
+SKIP: FAILED
+
+builtins/repeated_use.wgsl:5:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:6:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:7:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>(1., 2., 3., 4.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:9:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:10:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:11:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>(1., 2., 3.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:13:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:14:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:15:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>(1., 2.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:17:9 warning: use of deprecated builtin
+    _ = isNormal(1.);
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:18:9 warning: use of deprecated builtin
+    _ = isNormal(2.);
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:19:9 warning: use of deprecated builtin
+    _ = isNormal(3.);
+        ^^^^^^^^
+
+#version 310 es
+precision mediump float;
+
+bvec4 tint_isNormal(vec4 param_0) {
+  uint4 exponent = asuint(param_0) & 0x7f80000;
+  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+bvec3 tint_isNormal_1(vec3 param_0) {
+  uint3 exponent = asuint(param_0) & 0x7f80000;
+  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+bvec2 tint_isNormal_2(vec2 param_0) {
+  uint2 exponent = asuint(param_0) & 0x7f80000;
+  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+bool tint_isNormal_3(float param_0) {
+  uint exponent = asuint(param_0) & 0x7f80000;
+  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+
+void tint_symbol() {
+  tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+  tint_isNormal(vec4(1.0f));
+  tint_isNormal(vec4(1.0f, 2.0f, 3.0f, 4.0f));
+  tint_isNormal_1(vec3(0.0f, 0.0f, 0.0f));
+  tint_isNormal_1(vec3(1.0f));
+  tint_isNormal_1(vec3(1.0f, 2.0f, 3.0f));
+  tint_isNormal_2(vec2(0.0f, 0.0f));
+  tint_isNormal_2(vec2(1.0f));
+  tint_isNormal_2(vec2(1.0f, 2.0f));
+  tint_isNormal_3(1.0f);
+  tint_isNormal_3(2.0f);
+  tint_isNormal_3(3.0f);
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  tint_symbol();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:5: 'uint4' : undeclared identifier
+ERROR: 0:5: '' : compilation terminated
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/builtins/repeated_use.wgsl.expected.hlsl b/test/builtins/repeated_use.wgsl.expected.hlsl
new file mode 100644
index 0000000..eb05edf
--- /dev/null
+++ b/test/builtins/repeated_use.wgsl.expected.hlsl
@@ -0,0 +1,88 @@
+builtins/repeated_use.wgsl:5:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:6:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:7:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>(1., 2., 3., 4.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:9:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:10:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:11:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>(1., 2., 3.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:13:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:14:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:15:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>(1., 2.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:17:9 warning: use of deprecated builtin
+    _ = isNormal(1.);
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:18:9 warning: use of deprecated builtin
+    _ = isNormal(2.);
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:19:9 warning: use of deprecated builtin
+    _ = isNormal(3.);
+        ^^^^^^^^
+
+bool4 tint_isNormal(float4 param_0) {
+  uint4 exponent = asuint(param_0) & 0x7f80000;
+  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+bool3 tint_isNormal_1(float3 param_0) {
+  uint3 exponent = asuint(param_0) & 0x7f80000;
+  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+bool2 tint_isNormal_2(float2 param_0) {
+  uint2 exponent = asuint(param_0) & 0x7f80000;
+  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+bool tint_isNormal_3(float param_0) {
+  uint exponent = asuint(param_0) & 0x7f80000;
+  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
+  return clamped == exponent;
+}
+
+[numthreads(1, 1, 1)]
+void main() {
+  tint_isNormal(float4(0.0f, 0.0f, 0.0f, 0.0f));
+  tint_isNormal(float4((1.0f).xxxx));
+  tint_isNormal(float4(1.0f, 2.0f, 3.0f, 4.0f));
+  tint_isNormal_1(float3(0.0f, 0.0f, 0.0f));
+  tint_isNormal_1(float3((1.0f).xxx));
+  tint_isNormal_1(float3(1.0f, 2.0f, 3.0f));
+  tint_isNormal_2(float2(0.0f, 0.0f));
+  tint_isNormal_2(float2((1.0f).xx));
+  tint_isNormal_2(float2(1.0f, 2.0f));
+  tint_isNormal_3(1.0f);
+  tint_isNormal_3(2.0f);
+  tint_isNormal_3(3.0f);
+  return;
+}
diff --git a/test/builtins/repeated_use.wgsl.expected.msl b/test/builtins/repeated_use.wgsl.expected.msl
new file mode 100644
index 0000000..5b7314a
--- /dev/null
+++ b/test/builtins/repeated_use.wgsl.expected.msl
@@ -0,0 +1,67 @@
+builtins/repeated_use.wgsl:5:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:6:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:7:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>(1., 2., 3., 4.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:9:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:10:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:11:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>(1., 2., 3.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:13:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:14:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:15:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>(1., 2.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:17:9 warning: use of deprecated builtin
+    _ = isNormal(1.);
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:18:9 warning: use of deprecated builtin
+    _ = isNormal(2.);
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:19:9 warning: use of deprecated builtin
+    _ = isNormal(3.);
+        ^^^^^^^^
+
+#include <metal_stdlib>
+
+using namespace metal;
+kernel void tint_symbol() {
+  isnormal(float4());
+  isnormal(float4(1.0f));
+  isnormal(float4(1.0f, 2.0f, 3.0f, 4.0f));
+  isnormal(float3());
+  isnormal(float3(1.0f));
+  isnormal(float3(1.0f, 2.0f, 3.0f));
+  isnormal(float2());
+  isnormal(float2(1.0f));
+  isnormal(float2(1.0f, 2.0f));
+  isnormal(1.0f);
+  isnormal(2.0f);
+  isnormal(3.0f);
+  return;
+}
+
diff --git a/test/builtins/repeated_use.wgsl.expected.spvasm b/test/builtins/repeated_use.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c50ace
--- /dev/null
+++ b/test/builtins/repeated_use.wgsl.expected.spvasm
@@ -0,0 +1,168 @@
+builtins/repeated_use.wgsl:5:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:6:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:7:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>(1., 2., 3., 4.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:9:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:10:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:11:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>(1., 2., 3.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:13:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:14:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:15:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>(1., 2.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:17:9 warning: use of deprecated builtin
+    _ = isNormal(1.);
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:18:9 warning: use of deprecated builtin
+    _ = isNormal(2.);
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:19:9 warning: use of deprecated builtin
+    _ = isNormal(3.);
+        ^^^^^^^^
+
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 109
+; Schema: 0
+               OpCapability Shader
+         %11 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint GLCompute %main "main"
+               OpExecutionMode %main LocalSize 1 1 1
+               OpName %main "main"
+       %void = OpTypeVoid
+          %1 = OpTypeFunction %void
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+         %10 = OpConstantNull %v4float
+       %uint = OpTypeInt 32 0
+%uint_133693440 = OpConstant %uint 133693440
+%uint_524288 = OpConstant %uint 524288
+%uint_133169152 = OpConstant %uint 133169152
+     %v4uint = OpTypeVector %uint 4
+    %float_1 = OpConstant %float 1
+         %25 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+    %float_2 = OpConstant %float 2
+    %float_3 = OpConstant %float 3
+    %float_4 = OpConstant %float 4
+         %36 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
+     %v3bool = OpTypeVector %bool 3
+    %v3float = OpTypeVector %float 3
+         %46 = OpConstantNull %v3float
+     %v3uint = OpTypeVector %uint 3
+         %55 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+         %63 = OpConstantComposite %v3float %float_1 %float_2 %float_3
+     %v2bool = OpTypeVector %bool 2
+    %v2float = OpTypeVector %float 2
+         %73 = OpConstantNull %v2float
+     %v2uint = OpTypeVector %uint 2
+         %82 = OpConstantComposite %v2float %float_1 %float_1
+         %90 = OpConstantComposite %v2float %float_1 %float_2
+       %main = OpFunction %void None %1
+          %4 = OpLabel
+         %17 = OpCompositeConstruct %v4uint %uint_133693440 %uint_133693440 %uint_133693440 %uint_133693440
+         %18 = OpCompositeConstruct %v4uint %uint_524288 %uint_524288 %uint_524288 %uint_524288
+         %19 = OpCompositeConstruct %v4uint %uint_133169152 %uint_133169152 %uint_133169152 %uint_133169152
+         %20 = OpBitcast %v4uint %10
+         %21 = OpBitwiseAnd %v4uint %20 %17
+         %22 = OpExtInst %v4uint %11 UClamp %21 %18 %19
+          %5 = OpIEqual %v4bool %21 %22
+         %26 = OpCompositeConstruct %v4uint %uint_133693440 %uint_133693440 %uint_133693440 %uint_133693440
+         %27 = OpCompositeConstruct %v4uint %uint_524288 %uint_524288 %uint_524288 %uint_524288
+         %28 = OpCompositeConstruct %v4uint %uint_133169152 %uint_133169152 %uint_133169152 %uint_133169152
+         %29 = OpBitcast %v4uint %25
+         %30 = OpBitwiseAnd %v4uint %29 %26
+         %31 = OpExtInst %v4uint %11 UClamp %30 %27 %28
+         %23 = OpIEqual %v4bool %30 %31
+         %37 = OpCompositeConstruct %v4uint %uint_133693440 %uint_133693440 %uint_133693440 %uint_133693440
+         %38 = OpCompositeConstruct %v4uint %uint_524288 %uint_524288 %uint_524288 %uint_524288
+         %39 = OpCompositeConstruct %v4uint %uint_133169152 %uint_133169152 %uint_133169152 %uint_133169152
+         %40 = OpBitcast %v4uint %36
+         %41 = OpBitwiseAnd %v4uint %40 %37
+         %42 = OpExtInst %v4uint %11 UClamp %41 %38 %39
+         %32 = OpIEqual %v4bool %41 %42
+         %48 = OpCompositeConstruct %v3uint %uint_133693440 %uint_133693440 %uint_133693440
+         %49 = OpCompositeConstruct %v3uint %uint_524288 %uint_524288 %uint_524288
+         %50 = OpCompositeConstruct %v3uint %uint_133169152 %uint_133169152 %uint_133169152
+         %51 = OpBitcast %v3uint %46
+         %52 = OpBitwiseAnd %v3uint %51 %48
+         %53 = OpExtInst %v3uint %11 UClamp %52 %49 %50
+         %43 = OpIEqual %v3bool %52 %53
+         %56 = OpCompositeConstruct %v3uint %uint_133693440 %uint_133693440 %uint_133693440
+         %57 = OpCompositeConstruct %v3uint %uint_524288 %uint_524288 %uint_524288
+         %58 = OpCompositeConstruct %v3uint %uint_133169152 %uint_133169152 %uint_133169152
+         %59 = OpBitcast %v3uint %55
+         %60 = OpBitwiseAnd %v3uint %59 %56
+         %61 = OpExtInst %v3uint %11 UClamp %60 %57 %58
+         %54 = OpIEqual %v3bool %60 %61
+         %64 = OpCompositeConstruct %v3uint %uint_133693440 %uint_133693440 %uint_133693440
+         %65 = OpCompositeConstruct %v3uint %uint_524288 %uint_524288 %uint_524288
+         %66 = OpCompositeConstruct %v3uint %uint_133169152 %uint_133169152 %uint_133169152
+         %67 = OpBitcast %v3uint %63
+         %68 = OpBitwiseAnd %v3uint %67 %64
+         %69 = OpExtInst %v3uint %11 UClamp %68 %65 %66
+         %62 = OpIEqual %v3bool %68 %69
+         %75 = OpCompositeConstruct %v2uint %uint_133693440 %uint_133693440
+         %76 = OpCompositeConstruct %v2uint %uint_524288 %uint_524288
+         %77 = OpCompositeConstruct %v2uint %uint_133169152 %uint_133169152
+         %78 = OpBitcast %v2uint %73
+         %79 = OpBitwiseAnd %v2uint %78 %75
+         %80 = OpExtInst %v2uint %11 UClamp %79 %76 %77
+         %70 = OpIEqual %v2bool %79 %80
+         %83 = OpCompositeConstruct %v2uint %uint_133693440 %uint_133693440
+         %84 = OpCompositeConstruct %v2uint %uint_524288 %uint_524288
+         %85 = OpCompositeConstruct %v2uint %uint_133169152 %uint_133169152
+         %86 = OpBitcast %v2uint %82
+         %87 = OpBitwiseAnd %v2uint %86 %83
+         %88 = OpExtInst %v2uint %11 UClamp %87 %84 %85
+         %81 = OpIEqual %v2bool %87 %88
+         %91 = OpCompositeConstruct %v2uint %uint_133693440 %uint_133693440
+         %92 = OpCompositeConstruct %v2uint %uint_524288 %uint_524288
+         %93 = OpCompositeConstruct %v2uint %uint_133169152 %uint_133169152
+         %94 = OpBitcast %v2uint %90
+         %95 = OpBitwiseAnd %v2uint %94 %91
+         %96 = OpExtInst %v2uint %11 UClamp %95 %92 %93
+         %89 = OpIEqual %v2bool %95 %96
+         %98 = OpBitcast %uint %float_1
+         %99 = OpBitwiseAnd %uint %98 %uint_133693440
+        %100 = OpExtInst %uint %11 UClamp %99 %uint_524288 %uint_133169152
+         %97 = OpIEqual %bool %99 %100
+        %102 = OpBitcast %uint %float_2
+        %103 = OpBitwiseAnd %uint %102 %uint_133693440
+        %104 = OpExtInst %uint %11 UClamp %103 %uint_524288 %uint_133169152
+        %101 = OpIEqual %bool %103 %104
+        %106 = OpBitcast %uint %float_3
+        %107 = OpBitwiseAnd %uint %106 %uint_133693440
+        %108 = OpExtInst %uint %11 UClamp %107 %uint_524288 %uint_133169152
+        %105 = OpIEqual %bool %107 %108
+               OpReturn
+               OpFunctionEnd
diff --git a/test/builtins/repeated_use.wgsl.expected.wgsl b/test/builtins/repeated_use.wgsl.expected.wgsl
new file mode 100644
index 0000000..f33ea1c
--- /dev/null
+++ b/test/builtins/repeated_use.wgsl.expected.wgsl
@@ -0,0 +1,63 @@
+builtins/repeated_use.wgsl:5:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:6:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:7:9 warning: use of deprecated builtin
+    _ = isNormal(vec4<f32>(1., 2., 3., 4.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:9:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:10:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:11:9 warning: use of deprecated builtin
+    _ = isNormal(vec3<f32>(1., 2., 3.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:13:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>());
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:14:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>(1.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:15:9 warning: use of deprecated builtin
+    _ = isNormal(vec2<f32>(1., 2.));
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:17:9 warning: use of deprecated builtin
+    _ = isNormal(1.);
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:18:9 warning: use of deprecated builtin
+    _ = isNormal(2.);
+        ^^^^^^^^
+
+builtins/repeated_use.wgsl:19:9 warning: use of deprecated builtin
+    _ = isNormal(3.);
+        ^^^^^^^^
+
+@stage(compute) @workgroup_size(1)
+fn main() {
+  _ = isNormal(vec4<f32>());
+  _ = isNormal(vec4<f32>(1.0));
+  _ = isNormal(vec4<f32>(1.0, 2.0, 3.0, 4.0));
+  _ = isNormal(vec3<f32>());
+  _ = isNormal(vec3<f32>(1.0));
+  _ = isNormal(vec3<f32>(1.0, 2.0, 3.0));
+  _ = isNormal(vec2<f32>());
+  _ = isNormal(vec2<f32>(1.0));
+  _ = isNormal(vec2<f32>(1.0, 2.0));
+  _ = isNormal(1.0);
+  _ = isNormal(2.0);
+  _ = isNormal(3.0);
+}
diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm b/test/builtins/textureDimensions/depth_ms.spvasm
similarity index 100%
rename from test/intrinsics/textureDimensions/depth_ms.spvasm
rename to test/builtins/textureDimensions/depth_ms.spvasm
diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.glsl b/test/builtins/textureDimensions/depth_ms.spvasm.expected.glsl
similarity index 100%
rename from test/intrinsics/textureDimensions/depth_ms.spvasm.expected.glsl
rename to test/builtins/textureDimensions/depth_ms.spvasm.expected.glsl
diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.hlsl b/test/builtins/textureDimensions/depth_ms.spvasm.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureDimensions/depth_ms.spvasm.expected.hlsl
rename to test/builtins/textureDimensions/depth_ms.spvasm.expected.hlsl
diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.msl b/test/builtins/textureDimensions/depth_ms.spvasm.expected.msl
similarity index 100%
rename from test/intrinsics/textureDimensions/depth_ms.spvasm.expected.msl
rename to test/builtins/textureDimensions/depth_ms.spvasm.expected.msl
diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.spvasm b/test/builtins/textureDimensions/depth_ms.spvasm.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureDimensions/depth_ms.spvasm.expected.spvasm
rename to test/builtins/textureDimensions/depth_ms.spvasm.expected.spvasm
diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.wgsl b/test/builtins/textureDimensions/depth_ms.spvasm.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureDimensions/depth_ms.spvasm.expected.wgsl
rename to test/builtins/textureDimensions/depth_ms.spvasm.expected.wgsl
diff --git a/test/intrinsics/textureGather/f32/alpha.wgsl b/test/builtins/textureGather/f32/alpha.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/alpha.wgsl
rename to test/builtins/textureGather/f32/alpha.wgsl
diff --git a/test/intrinsics/textureGather/f32/alpha.wgsl.expected.glsl b/test/builtins/textureGather/f32/alpha.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/alpha.wgsl.expected.glsl
rename to test/builtins/textureGather/f32/alpha.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/f32/alpha.wgsl.expected.hlsl b/test/builtins/textureGather/f32/alpha.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/alpha.wgsl.expected.hlsl
rename to test/builtins/textureGather/f32/alpha.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/f32/alpha.wgsl.expected.msl b/test/builtins/textureGather/f32/alpha.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/f32/alpha.wgsl.expected.msl
rename to test/builtins/textureGather/f32/alpha.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/f32/alpha.wgsl.expected.spvasm b/test/builtins/textureGather/f32/alpha.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/f32/alpha.wgsl.expected.spvasm
rename to test/builtins/textureGather/f32/alpha.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/f32/alpha.wgsl.expected.wgsl b/test/builtins/textureGather/f32/alpha.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/alpha.wgsl.expected.wgsl
rename to test/builtins/textureGather/f32/alpha.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/f32/blue.wgsl b/test/builtins/textureGather/f32/blue.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/blue.wgsl
rename to test/builtins/textureGather/f32/blue.wgsl
diff --git a/test/intrinsics/textureGather/f32/blue.wgsl.expected.glsl b/test/builtins/textureGather/f32/blue.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/blue.wgsl.expected.glsl
rename to test/builtins/textureGather/f32/blue.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/f32/blue.wgsl.expected.hlsl b/test/builtins/textureGather/f32/blue.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/blue.wgsl.expected.hlsl
rename to test/builtins/textureGather/f32/blue.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/f32/blue.wgsl.expected.msl b/test/builtins/textureGather/f32/blue.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/f32/blue.wgsl.expected.msl
rename to test/builtins/textureGather/f32/blue.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/f32/blue.wgsl.expected.spvasm b/test/builtins/textureGather/f32/blue.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/f32/blue.wgsl.expected.spvasm
rename to test/builtins/textureGather/f32/blue.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/f32/blue.wgsl.expected.wgsl b/test/builtins/textureGather/f32/blue.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/blue.wgsl.expected.wgsl
rename to test/builtins/textureGather/f32/blue.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/f32/green.wgsl b/test/builtins/textureGather/f32/green.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/green.wgsl
rename to test/builtins/textureGather/f32/green.wgsl
diff --git a/test/intrinsics/textureGather/f32/green.wgsl.expected.glsl b/test/builtins/textureGather/f32/green.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/green.wgsl.expected.glsl
rename to test/builtins/textureGather/f32/green.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/f32/green.wgsl.expected.hlsl b/test/builtins/textureGather/f32/green.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/green.wgsl.expected.hlsl
rename to test/builtins/textureGather/f32/green.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/f32/green.wgsl.expected.msl b/test/builtins/textureGather/f32/green.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/f32/green.wgsl.expected.msl
rename to test/builtins/textureGather/f32/green.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/f32/green.wgsl.expected.spvasm b/test/builtins/textureGather/f32/green.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/f32/green.wgsl.expected.spvasm
rename to test/builtins/textureGather/f32/green.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/f32/green.wgsl.expected.wgsl b/test/builtins/textureGather/f32/green.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/green.wgsl.expected.wgsl
rename to test/builtins/textureGather/f32/green.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/f32/red.wgsl b/test/builtins/textureGather/f32/red.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/red.wgsl
rename to test/builtins/textureGather/f32/red.wgsl
diff --git a/test/intrinsics/textureGather/f32/red.wgsl.expected.glsl b/test/builtins/textureGather/f32/red.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/red.wgsl.expected.glsl
rename to test/builtins/textureGather/f32/red.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/f32/red.wgsl.expected.hlsl b/test/builtins/textureGather/f32/red.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/red.wgsl.expected.hlsl
rename to test/builtins/textureGather/f32/red.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/f32/red.wgsl.expected.msl b/test/builtins/textureGather/f32/red.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/f32/red.wgsl.expected.msl
rename to test/builtins/textureGather/f32/red.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/f32/red.wgsl.expected.spvasm b/test/builtins/textureGather/f32/red.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/f32/red.wgsl.expected.spvasm
rename to test/builtins/textureGather/f32/red.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/f32/red.wgsl.expected.wgsl b/test/builtins/textureGather/f32/red.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/f32/red.wgsl.expected.wgsl
rename to test/builtins/textureGather/f32/red.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/i32/alpha.wgsl b/test/builtins/textureGather/i32/alpha.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/alpha.wgsl
rename to test/builtins/textureGather/i32/alpha.wgsl
diff --git a/test/intrinsics/textureGather/i32/alpha.wgsl.expected.glsl b/test/builtins/textureGather/i32/alpha.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/alpha.wgsl.expected.glsl
rename to test/builtins/textureGather/i32/alpha.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/i32/alpha.wgsl.expected.hlsl b/test/builtins/textureGather/i32/alpha.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/alpha.wgsl.expected.hlsl
rename to test/builtins/textureGather/i32/alpha.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/i32/alpha.wgsl.expected.msl b/test/builtins/textureGather/i32/alpha.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/i32/alpha.wgsl.expected.msl
rename to test/builtins/textureGather/i32/alpha.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/i32/alpha.wgsl.expected.spvasm b/test/builtins/textureGather/i32/alpha.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/i32/alpha.wgsl.expected.spvasm
rename to test/builtins/textureGather/i32/alpha.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/i32/alpha.wgsl.expected.wgsl b/test/builtins/textureGather/i32/alpha.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/alpha.wgsl.expected.wgsl
rename to test/builtins/textureGather/i32/alpha.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/i32/blue.wgsl b/test/builtins/textureGather/i32/blue.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/blue.wgsl
rename to test/builtins/textureGather/i32/blue.wgsl
diff --git a/test/intrinsics/textureGather/i32/blue.wgsl.expected.glsl b/test/builtins/textureGather/i32/blue.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/blue.wgsl.expected.glsl
rename to test/builtins/textureGather/i32/blue.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/i32/blue.wgsl.expected.hlsl b/test/builtins/textureGather/i32/blue.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/blue.wgsl.expected.hlsl
rename to test/builtins/textureGather/i32/blue.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/i32/blue.wgsl.expected.msl b/test/builtins/textureGather/i32/blue.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/i32/blue.wgsl.expected.msl
rename to test/builtins/textureGather/i32/blue.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/i32/blue.wgsl.expected.spvasm b/test/builtins/textureGather/i32/blue.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/i32/blue.wgsl.expected.spvasm
rename to test/builtins/textureGather/i32/blue.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/i32/blue.wgsl.expected.wgsl b/test/builtins/textureGather/i32/blue.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/blue.wgsl.expected.wgsl
rename to test/builtins/textureGather/i32/blue.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/i32/green.wgsl b/test/builtins/textureGather/i32/green.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/green.wgsl
rename to test/builtins/textureGather/i32/green.wgsl
diff --git a/test/intrinsics/textureGather/i32/green.wgsl.expected.glsl b/test/builtins/textureGather/i32/green.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/green.wgsl.expected.glsl
rename to test/builtins/textureGather/i32/green.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/i32/green.wgsl.expected.hlsl b/test/builtins/textureGather/i32/green.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/green.wgsl.expected.hlsl
rename to test/builtins/textureGather/i32/green.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/i32/green.wgsl.expected.msl b/test/builtins/textureGather/i32/green.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/i32/green.wgsl.expected.msl
rename to test/builtins/textureGather/i32/green.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/i32/green.wgsl.expected.spvasm b/test/builtins/textureGather/i32/green.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/i32/green.wgsl.expected.spvasm
rename to test/builtins/textureGather/i32/green.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/i32/green.wgsl.expected.wgsl b/test/builtins/textureGather/i32/green.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/green.wgsl.expected.wgsl
rename to test/builtins/textureGather/i32/green.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/i32/red.wgsl b/test/builtins/textureGather/i32/red.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/red.wgsl
rename to test/builtins/textureGather/i32/red.wgsl
diff --git a/test/intrinsics/textureGather/i32/red.wgsl.expected.glsl b/test/builtins/textureGather/i32/red.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/red.wgsl.expected.glsl
rename to test/builtins/textureGather/i32/red.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/i32/red.wgsl.expected.hlsl b/test/builtins/textureGather/i32/red.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/red.wgsl.expected.hlsl
rename to test/builtins/textureGather/i32/red.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/i32/red.wgsl.expected.msl b/test/builtins/textureGather/i32/red.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/i32/red.wgsl.expected.msl
rename to test/builtins/textureGather/i32/red.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/i32/red.wgsl.expected.spvasm b/test/builtins/textureGather/i32/red.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/i32/red.wgsl.expected.spvasm
rename to test/builtins/textureGather/i32/red.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/i32/red.wgsl.expected.wgsl b/test/builtins/textureGather/i32/red.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/i32/red.wgsl.expected.wgsl
rename to test/builtins/textureGather/i32/red.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/u32/alpha.wgsl b/test/builtins/textureGather/u32/alpha.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/alpha.wgsl
rename to test/builtins/textureGather/u32/alpha.wgsl
diff --git a/test/intrinsics/textureGather/u32/alpha.wgsl.expected.glsl b/test/builtins/textureGather/u32/alpha.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/alpha.wgsl.expected.glsl
rename to test/builtins/textureGather/u32/alpha.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/u32/alpha.wgsl.expected.hlsl b/test/builtins/textureGather/u32/alpha.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/alpha.wgsl.expected.hlsl
rename to test/builtins/textureGather/u32/alpha.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/u32/alpha.wgsl.expected.msl b/test/builtins/textureGather/u32/alpha.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/u32/alpha.wgsl.expected.msl
rename to test/builtins/textureGather/u32/alpha.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/u32/alpha.wgsl.expected.spvasm b/test/builtins/textureGather/u32/alpha.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/u32/alpha.wgsl.expected.spvasm
rename to test/builtins/textureGather/u32/alpha.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/u32/alpha.wgsl.expected.wgsl b/test/builtins/textureGather/u32/alpha.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/alpha.wgsl.expected.wgsl
rename to test/builtins/textureGather/u32/alpha.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/u32/blue.wgsl b/test/builtins/textureGather/u32/blue.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/blue.wgsl
rename to test/builtins/textureGather/u32/blue.wgsl
diff --git a/test/intrinsics/textureGather/u32/blue.wgsl.expected.glsl b/test/builtins/textureGather/u32/blue.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/blue.wgsl.expected.glsl
rename to test/builtins/textureGather/u32/blue.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/u32/blue.wgsl.expected.hlsl b/test/builtins/textureGather/u32/blue.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/blue.wgsl.expected.hlsl
rename to test/builtins/textureGather/u32/blue.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/u32/blue.wgsl.expected.msl b/test/builtins/textureGather/u32/blue.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/u32/blue.wgsl.expected.msl
rename to test/builtins/textureGather/u32/blue.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/u32/blue.wgsl.expected.spvasm b/test/builtins/textureGather/u32/blue.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/u32/blue.wgsl.expected.spvasm
rename to test/builtins/textureGather/u32/blue.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/u32/blue.wgsl.expected.wgsl b/test/builtins/textureGather/u32/blue.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/blue.wgsl.expected.wgsl
rename to test/builtins/textureGather/u32/blue.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/u32/green.wgsl b/test/builtins/textureGather/u32/green.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/green.wgsl
rename to test/builtins/textureGather/u32/green.wgsl
diff --git a/test/intrinsics/textureGather/u32/green.wgsl.expected.glsl b/test/builtins/textureGather/u32/green.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/green.wgsl.expected.glsl
rename to test/builtins/textureGather/u32/green.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/u32/green.wgsl.expected.hlsl b/test/builtins/textureGather/u32/green.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/green.wgsl.expected.hlsl
rename to test/builtins/textureGather/u32/green.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/u32/green.wgsl.expected.msl b/test/builtins/textureGather/u32/green.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/u32/green.wgsl.expected.msl
rename to test/builtins/textureGather/u32/green.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/u32/green.wgsl.expected.spvasm b/test/builtins/textureGather/u32/green.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/u32/green.wgsl.expected.spvasm
rename to test/builtins/textureGather/u32/green.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/u32/green.wgsl.expected.wgsl b/test/builtins/textureGather/u32/green.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/green.wgsl.expected.wgsl
rename to test/builtins/textureGather/u32/green.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureGather/u32/red.wgsl b/test/builtins/textureGather/u32/red.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/red.wgsl
rename to test/builtins/textureGather/u32/red.wgsl
diff --git a/test/intrinsics/textureGather/u32/red.wgsl.expected.glsl b/test/builtins/textureGather/u32/red.wgsl.expected.glsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/red.wgsl.expected.glsl
rename to test/builtins/textureGather/u32/red.wgsl.expected.glsl
diff --git a/test/intrinsics/textureGather/u32/red.wgsl.expected.hlsl b/test/builtins/textureGather/u32/red.wgsl.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/red.wgsl.expected.hlsl
rename to test/builtins/textureGather/u32/red.wgsl.expected.hlsl
diff --git a/test/intrinsics/textureGather/u32/red.wgsl.expected.msl b/test/builtins/textureGather/u32/red.wgsl.expected.msl
similarity index 100%
rename from test/intrinsics/textureGather/u32/red.wgsl.expected.msl
rename to test/builtins/textureGather/u32/red.wgsl.expected.msl
diff --git a/test/intrinsics/textureGather/u32/red.wgsl.expected.spvasm b/test/builtins/textureGather/u32/red.wgsl.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureGather/u32/red.wgsl.expected.spvasm
rename to test/builtins/textureGather/u32/red.wgsl.expected.spvasm
diff --git a/test/intrinsics/textureGather/u32/red.wgsl.expected.wgsl b/test/builtins/textureGather/u32/red.wgsl.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureGather/u32/red.wgsl.expected.wgsl
rename to test/builtins/textureGather/u32/red.wgsl.expected.wgsl
diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm b/test/builtins/textureLoad/depth_ms.spvasm
similarity index 100%
rename from test/intrinsics/textureLoad/depth_ms.spvasm
rename to test/builtins/textureLoad/depth_ms.spvasm
diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.glsl b/test/builtins/textureLoad/depth_ms.spvasm.expected.glsl
similarity index 100%
rename from test/intrinsics/textureLoad/depth_ms.spvasm.expected.glsl
rename to test/builtins/textureLoad/depth_ms.spvasm.expected.glsl
diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.hlsl b/test/builtins/textureLoad/depth_ms.spvasm.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureLoad/depth_ms.spvasm.expected.hlsl
rename to test/builtins/textureLoad/depth_ms.spvasm.expected.hlsl
diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.msl b/test/builtins/textureLoad/depth_ms.spvasm.expected.msl
similarity index 100%
rename from test/intrinsics/textureLoad/depth_ms.spvasm.expected.msl
rename to test/builtins/textureLoad/depth_ms.spvasm.expected.msl
diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.spvasm b/test/builtins/textureLoad/depth_ms.spvasm.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureLoad/depth_ms.spvasm.expected.spvasm
rename to test/builtins/textureLoad/depth_ms.spvasm.expected.spvasm
diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.wgsl b/test/builtins/textureLoad/depth_ms.spvasm.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureLoad/depth_ms.spvasm.expected.wgsl
rename to test/builtins/textureLoad/depth_ms.spvasm.expected.wgsl
diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm b/test/builtins/textureNumSamples/depth_ms.spvasm
similarity index 100%
rename from test/intrinsics/textureNumSamples/depth_ms.spvasm
rename to test/builtins/textureNumSamples/depth_ms.spvasm
diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.glsl b/test/builtins/textureNumSamples/depth_ms.spvasm.expected.glsl
similarity index 100%
rename from test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.glsl
rename to test/builtins/textureNumSamples/depth_ms.spvasm.expected.glsl
diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.hlsl b/test/builtins/textureNumSamples/depth_ms.spvasm.expected.hlsl
similarity index 100%
rename from test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.hlsl
rename to test/builtins/textureNumSamples/depth_ms.spvasm.expected.hlsl
diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.msl b/test/builtins/textureNumSamples/depth_ms.spvasm.expected.msl
similarity index 100%
rename from test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.msl
rename to test/builtins/textureNumSamples/depth_ms.spvasm.expected.msl
diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.spvasm b/test/builtins/textureNumSamples/depth_ms.spvasm.expected.spvasm
similarity index 100%
rename from test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.spvasm
rename to test/builtins/textureNumSamples/depth_ms.spvasm.expected.spvasm
diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.wgsl b/test/builtins/textureNumSamples/depth_ms.spvasm.expected.wgsl
similarity index 100%
rename from test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.wgsl
rename to test/builtins/textureNumSamples/depth_ms.spvasm.expected.wgsl
diff --git a/test/intrinsics/gen/abs/002533.wgsl b/test/intrinsics/gen/abs/002533.wgsl
deleted file mode 100644
index 1a7c3f8..0000000
--- a/test/intrinsics/gen/abs/002533.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(vec<4, f32>) -> vec<4, f32>
-fn abs_002533() {
-  var res: vec4<f32> = abs(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_002533();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_002533();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_002533();
-}
diff --git a/test/intrinsics/gen/abs/005174.wgsl b/test/intrinsics/gen/abs/005174.wgsl
deleted file mode 100644
index ecbf409..0000000
--- a/test/intrinsics/gen/abs/005174.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(vec<3, f32>) -> vec<3, f32>
-fn abs_005174() {
-  var res: vec3<f32> = abs(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_005174();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_005174();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_005174();
-}
diff --git a/test/intrinsics/gen/abs/1ce782.wgsl b/test/intrinsics/gen/abs/1ce782.wgsl
deleted file mode 100644
index 7a7666e..0000000
--- a/test/intrinsics/gen/abs/1ce782.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(vec<4, u32>) -> vec<4, u32>
-fn abs_1ce782() {
-  var res: vec4<u32> = abs(vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_1ce782();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_1ce782();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_1ce782();
-}
diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl b/test/intrinsics/gen/abs/1e9d53.wgsl
deleted file mode 100644
index 45cac6d..0000000
--- a/test/intrinsics/gen/abs/1e9d53.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(vec<2, f32>) -> vec<2, f32>
-fn abs_1e9d53() {
-  var res: vec2<f32> = abs(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_1e9d53();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_1e9d53();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_1e9d53();
-}
diff --git a/test/intrinsics/gen/abs/467cd1.wgsl b/test/intrinsics/gen/abs/467cd1.wgsl
deleted file mode 100644
index 99b46e2..0000000
--- a/test/intrinsics/gen/abs/467cd1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(u32) -> u32
-fn abs_467cd1() {
-  var res: u32 = abs(1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_467cd1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_467cd1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_467cd1();
-}
diff --git a/test/intrinsics/gen/abs/4ad288.wgsl b/test/intrinsics/gen/abs/4ad288.wgsl
deleted file mode 100644
index b342fa7..0000000
--- a/test/intrinsics/gen/abs/4ad288.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(i32) -> i32
-fn abs_4ad288() {
-  var res: i32 = abs(1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_4ad288();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_4ad288();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_4ad288();
-}
diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl b/test/intrinsics/gen/abs/5ad50a.wgsl
deleted file mode 100644
index 8cd6725..0000000
--- a/test/intrinsics/gen/abs/5ad50a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(vec<3, i32>) -> vec<3, i32>
-fn abs_5ad50a() {
-  var res: vec3<i32> = abs(vec3<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_5ad50a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_5ad50a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_5ad50a();
-}
diff --git a/test/intrinsics/gen/abs/7326de.wgsl b/test/intrinsics/gen/abs/7326de.wgsl
deleted file mode 100644
index ce2be53..0000000
--- a/test/intrinsics/gen/abs/7326de.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(vec<3, u32>) -> vec<3, u32>
-fn abs_7326de() {
-  var res: vec3<u32> = abs(vec3<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_7326de();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_7326de();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_7326de();
-}
diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl b/test/intrinsics/gen/abs/7f28e6.wgsl
deleted file mode 100644
index cbdeef0..0000000
--- a/test/intrinsics/gen/abs/7f28e6.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(vec<2, u32>) -> vec<2, u32>
-fn abs_7f28e6() {
-  var res: vec2<u32> = abs(vec2<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_7f28e6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_7f28e6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_7f28e6();
-}
diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl b/test/intrinsics/gen/abs/7faa9e.wgsl
deleted file mode 100644
index 8b250ee..0000000
--- a/test/intrinsics/gen/abs/7faa9e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(vec<2, i32>) -> vec<2, i32>
-fn abs_7faa9e() {
-  var res: vec2<i32> = abs(vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_7faa9e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_7faa9e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_7faa9e();
-}
diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl b/test/intrinsics/gen/abs/9c80a6.wgsl
deleted file mode 100644
index 71ef852..0000000
--- a/test/intrinsics/gen/abs/9c80a6.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(vec<4, i32>) -> vec<4, i32>
-fn abs_9c80a6() {
-  var res: vec4<i32> = abs(vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_9c80a6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_9c80a6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_9c80a6();
-}
diff --git a/test/intrinsics/gen/abs/b96037.wgsl b/test/intrinsics/gen/abs/b96037.wgsl
deleted file mode 100644
index dddc75e..0000000
--- a/test/intrinsics/gen/abs/b96037.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn abs(f32) -> f32
-fn abs_b96037() {
-  var res: f32 = abs(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  abs_b96037();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  abs_b96037();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  abs_b96037();
-}
diff --git a/test/intrinsics/gen/acos/489247.wgsl b/test/intrinsics/gen/acos/489247.wgsl
deleted file mode 100644
index d2f227a..0000000
--- a/test/intrinsics/gen/acos/489247.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn acos(f32) -> f32
-fn acos_489247() {
-  var res: f32 = acos(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  acos_489247();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  acos_489247();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  acos_489247();
-}
diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl b/test/intrinsics/gen/acos/8e2acf.wgsl
deleted file mode 100644
index e085fae..0000000
--- a/test/intrinsics/gen/acos/8e2acf.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn acos(vec<4, f32>) -> vec<4, f32>
-fn acos_8e2acf() {
-  var res: vec4<f32> = acos(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  acos_8e2acf();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  acos_8e2acf();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  acos_8e2acf();
-}
diff --git a/test/intrinsics/gen/acos/a610c4.wgsl b/test/intrinsics/gen/acos/a610c4.wgsl
deleted file mode 100644
index 7f7be34..0000000
--- a/test/intrinsics/gen/acos/a610c4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn acos(vec<3, f32>) -> vec<3, f32>
-fn acos_a610c4() {
-  var res: vec3<f32> = acos(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  acos_a610c4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  acos_a610c4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  acos_a610c4();
-}
diff --git a/test/intrinsics/gen/acos/dfc915.wgsl b/test/intrinsics/gen/acos/dfc915.wgsl
deleted file mode 100644
index 5e27bf8..0000000
--- a/test/intrinsics/gen/acos/dfc915.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn acos(vec<2, f32>) -> vec<2, f32>
-fn acos_dfc915() {
-  var res: vec2<f32> = acos(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  acos_dfc915();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  acos_dfc915();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  acos_dfc915();
-}
diff --git a/test/intrinsics/gen/all/353d6a.wgsl b/test/intrinsics/gen/all/353d6a.wgsl
deleted file mode 100644
index fbfe933..0000000
--- a/test/intrinsics/gen/all/353d6a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn all(bool) -> bool
-fn all_353d6a() {
-  var res: bool = all(bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  all_353d6a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  all_353d6a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  all_353d6a();
-}
diff --git a/test/intrinsics/gen/all/986c7b.wgsl b/test/intrinsics/gen/all/986c7b.wgsl
deleted file mode 100644
index 515f3a3..0000000
--- a/test/intrinsics/gen/all/986c7b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn all(vec<4, bool>) -> bool
-fn all_986c7b() {
-  var res: bool = all(vec4<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  all_986c7b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  all_986c7b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  all_986c7b();
-}
diff --git a/test/intrinsics/gen/all/bd2dba.wgsl b/test/intrinsics/gen/all/bd2dba.wgsl
deleted file mode 100644
index 657678f..0000000
--- a/test/intrinsics/gen/all/bd2dba.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn all(vec<3, bool>) -> bool
-fn all_bd2dba() {
-  var res: bool = all(vec3<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  all_bd2dba();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  all_bd2dba();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  all_bd2dba();
-}
diff --git a/test/intrinsics/gen/all/f46790.wgsl b/test/intrinsics/gen/all/f46790.wgsl
deleted file mode 100644
index 875da79..0000000
--- a/test/intrinsics/gen/all/f46790.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn all(vec<2, bool>) -> bool
-fn all_f46790() {
-  var res: bool = all(vec2<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  all_f46790();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  all_f46790();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  all_f46790();
-}
diff --git a/test/intrinsics/gen/any/083428.wgsl b/test/intrinsics/gen/any/083428.wgsl
deleted file mode 100644
index 8aecc0f..0000000
--- a/test/intrinsics/gen/any/083428.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn any(vec<4, bool>) -> bool
-fn any_083428() {
-  var res: bool = any(vec4<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  any_083428();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  any_083428();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  any_083428();
-}
diff --git a/test/intrinsics/gen/any/0e3e58.wgsl b/test/intrinsics/gen/any/0e3e58.wgsl
deleted file mode 100644
index 71bda25..0000000
--- a/test/intrinsics/gen/any/0e3e58.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn any(vec<2, bool>) -> bool
-fn any_0e3e58() {
-  var res: bool = any(vec2<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  any_0e3e58();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  any_0e3e58();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  any_0e3e58();
-}
diff --git a/test/intrinsics/gen/any/2ab91a.wgsl b/test/intrinsics/gen/any/2ab91a.wgsl
deleted file mode 100644
index 6b6b067..0000000
--- a/test/intrinsics/gen/any/2ab91a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn any(bool) -> bool
-fn any_2ab91a() {
-  var res: bool = any(bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  any_2ab91a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  any_2ab91a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  any_2ab91a();
-}
diff --git a/test/intrinsics/gen/any/e755c1.wgsl b/test/intrinsics/gen/any/e755c1.wgsl
deleted file mode 100644
index b27d31a..0000000
--- a/test/intrinsics/gen/any/e755c1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn any(vec<3, bool>) -> bool
-fn any_e755c1() {
-  var res: bool = any(vec3<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  any_e755c1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  any_e755c1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  any_e755c1();
-}
diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl b/test/intrinsics/gen/arrayLength/1588cd.wgsl
deleted file mode 100644
index 727e8bd..0000000
--- a/test/intrinsics/gen/arrayLength/1588cd.wgsl
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RO {
-  arg_0: array<i32>;
-};
-@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
-
-// fn arrayLength(ptr<storage, array<i32>, read>) -> u32
-fn arrayLength_1588cd() {
-  var res: u32 = arrayLength(&sb_ro.arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  arrayLength_1588cd();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  arrayLength_1588cd();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  arrayLength_1588cd();
-}
diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl b/test/intrinsics/gen/arrayLength/61b1c7.wgsl
deleted file mode 100644
index 02b7f3d..0000000
--- a/test/intrinsics/gen/arrayLength/61b1c7.wgsl
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: array<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn arrayLength(ptr<storage, array<i32>, read_write>) -> u32
-fn arrayLength_61b1c7() {
-  var res: u32 = arrayLength(&sb_rw.arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  arrayLength_61b1c7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  arrayLength_61b1c7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  arrayLength_61b1c7();
-}
diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl
deleted file mode 100644
index 192d288..0000000
--- a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RO {
-  arg_0: array<f32>;
-};
-@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
-
-// fn arrayLength(ptr<storage, array<f32>, read>) -> u32
-fn arrayLength_a0f5ca() {
-  var res: u32 = arrayLength(&sb_ro.arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  arrayLength_a0f5ca();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  arrayLength_a0f5ca();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  arrayLength_a0f5ca();
-}
diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl b/test/intrinsics/gen/arrayLength/cdd123.wgsl
deleted file mode 100644
index 03948a9..0000000
--- a/test/intrinsics/gen/arrayLength/cdd123.wgsl
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: array<f32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn arrayLength(ptr<storage, array<f32>, read_write>) -> u32
-fn arrayLength_cdd123() {
-  var res: u32 = arrayLength(&sb_rw.arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  arrayLength_cdd123();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  arrayLength_cdd123();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  arrayLength_cdd123();
-}
diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl b/test/intrinsics/gen/arrayLength/cfca0a.wgsl
deleted file mode 100644
index e3f72dd..0000000
--- a/test/intrinsics/gen/arrayLength/cfca0a.wgsl
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RO {
-  arg_0: array<u32>;
-};
-@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
-
-// fn arrayLength(ptr<storage, array<u32>, read>) -> u32
-fn arrayLength_cfca0a() {
-  var res: u32 = arrayLength(&sb_ro.arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  arrayLength_cfca0a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  arrayLength_cfca0a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  arrayLength_cfca0a();
-}
diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl b/test/intrinsics/gen/arrayLength/eb510f.wgsl
deleted file mode 100644
index 86133e5..0000000
--- a/test/intrinsics/gen/arrayLength/eb510f.wgsl
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: array<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn arrayLength(ptr<storage, array<u32>, read_write>) -> u32
-fn arrayLength_eb510f() {
-  var res: u32 = arrayLength(&sb_rw.arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  arrayLength_eb510f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  arrayLength_eb510f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  arrayLength_eb510f();
-}
diff --git a/test/intrinsics/gen/asin/064953.wgsl b/test/intrinsics/gen/asin/064953.wgsl
deleted file mode 100644
index f72a8c5..0000000
--- a/test/intrinsics/gen/asin/064953.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn asin(vec<4, f32>) -> vec<4, f32>
-fn asin_064953() {
-  var res: vec4<f32> = asin(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  asin_064953();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  asin_064953();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  asin_064953();
-}
diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl b/test/intrinsics/gen/asin/7b6a44.wgsl
deleted file mode 100644
index 6369852..0000000
--- a/test/intrinsics/gen/asin/7b6a44.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn asin(vec<2, f32>) -> vec<2, f32>
-fn asin_7b6a44() {
-  var res: vec2<f32> = asin(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  asin_7b6a44();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  asin_7b6a44();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  asin_7b6a44();
-}
diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl b/test/intrinsics/gen/asin/8cd9c9.wgsl
deleted file mode 100644
index 0f7abb0..0000000
--- a/test/intrinsics/gen/asin/8cd9c9.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn asin(vec<3, f32>) -> vec<3, f32>
-fn asin_8cd9c9() {
-  var res: vec3<f32> = asin(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  asin_8cd9c9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  asin_8cd9c9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  asin_8cd9c9();
-}
diff --git a/test/intrinsics/gen/asin/c0c272.wgsl b/test/intrinsics/gen/asin/c0c272.wgsl
deleted file mode 100644
index b673fe3..0000000
--- a/test/intrinsics/gen/asin/c0c272.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn asin(f32) -> f32
-fn asin_c0c272() {
-  var res: f32 = asin(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  asin_c0c272();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  asin_c0c272();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  asin_c0c272();
-}
diff --git a/test/intrinsics/gen/atan/02979a.wgsl b/test/intrinsics/gen/atan/02979a.wgsl
deleted file mode 100644
index fb9d08232..0000000
--- a/test/intrinsics/gen/atan/02979a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn atan(f32) -> f32
-fn atan_02979a() {
-  var res: f32 = atan(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  atan_02979a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atan_02979a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atan_02979a();
-}
diff --git a/test/intrinsics/gen/atan/331e6d.wgsl b/test/intrinsics/gen/atan/331e6d.wgsl
deleted file mode 100644
index e090a63..0000000
--- a/test/intrinsics/gen/atan/331e6d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn atan(vec<3, f32>) -> vec<3, f32>
-fn atan_331e6d() {
-  var res: vec3<f32> = atan(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  atan_331e6d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atan_331e6d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atan_331e6d();
-}
diff --git a/test/intrinsics/gen/atan/a8b696.wgsl b/test/intrinsics/gen/atan/a8b696.wgsl
deleted file mode 100644
index 8b1c3cf..0000000
--- a/test/intrinsics/gen/atan/a8b696.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn atan(vec<4, f32>) -> vec<4, f32>
-fn atan_a8b696() {
-  var res: vec4<f32> = atan(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  atan_a8b696();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atan_a8b696();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atan_a8b696();
-}
diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl b/test/intrinsics/gen/atan/ad96e4.wgsl
deleted file mode 100644
index b334a9e..0000000
--- a/test/intrinsics/gen/atan/ad96e4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn atan(vec<2, f32>) -> vec<2, f32>
-fn atan_ad96e4() {
-  var res: vec2<f32> = atan(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  atan_ad96e4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atan_ad96e4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atan_ad96e4();
-}
diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl b/test/intrinsics/gen/atan2/57fb13.wgsl
deleted file mode 100644
index c18536f..0000000
--- a/test/intrinsics/gen/atan2/57fb13.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn atan2(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn atan2_57fb13() {
-  var res: vec2<f32> = atan2(vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  atan2_57fb13();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atan2_57fb13();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atan2_57fb13();
-}
diff --git a/test/intrinsics/gen/atan2/96057c.wgsl b/test/intrinsics/gen/atan2/96057c.wgsl
deleted file mode 100644
index 0955766..0000000
--- a/test/intrinsics/gen/atan2/96057c.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn atan2(f32, f32) -> f32
-fn atan2_96057c() {
-  var res: f32 = atan2(1.0, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  atan2_96057c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atan2_96057c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atan2_96057c();
-}
diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl b/test/intrinsics/gen/atan2/a70d0d.wgsl
deleted file mode 100644
index 87a3c7a..0000000
--- a/test/intrinsics/gen/atan2/a70d0d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn atan2(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn atan2_a70d0d() {
-  var res: vec3<f32> = atan2(vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  atan2_a70d0d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atan2_a70d0d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atan2_a70d0d();
-}
diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl b/test/intrinsics/gen/atan2/ae713e.wgsl
deleted file mode 100644
index 381ca2a..0000000
--- a/test/intrinsics/gen/atan2/ae713e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn atan2(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn atan2_ae713e() {
-  var res: vec4<f32> = atan2(vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  atan2_ae713e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atan2_ae713e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atan2_ae713e();
-}
diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl b/test/intrinsics/gen/atomicAdd/794055.wgsl
deleted file mode 100644
index 5963b4f..0000000
--- a/test/intrinsics/gen/atomicAdd/794055.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicAdd(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
-fn atomicAdd_794055() {
-  var res: i32 = atomicAdd(&arg_0, 1);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicAdd_794055();
-}
diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl b/test/intrinsics/gen/atomicAdd/8a199a.wgsl
deleted file mode 100644
index aae79c2..0000000
--- a/test/intrinsics/gen/atomicAdd/8a199a.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicAdd(ptr<storage, atomic<u32>, read_write>, u32) -> u32
-fn atomicAdd_8a199a() {
-  var res: u32 = atomicAdd(&sb_rw.arg_0, 1u);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicAdd_8a199a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicAdd_8a199a();
-}
diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl
deleted file mode 100644
index 4cf4eb6..0000000
--- a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicAdd(ptr<storage, atomic<i32>, read_write>, i32) -> i32
-fn atomicAdd_d32fe4() {
-  var res: i32 = atomicAdd(&sb_rw.arg_0, 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicAdd_d32fe4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicAdd_d32fe4();
-}
diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl
deleted file mode 100644
index 55329bc..0000000
--- a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicAdd(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
-fn atomicAdd_d5db1d() {
-  var res: u32 = atomicAdd(&arg_0, 1u);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicAdd_d5db1d();
-}
diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl b/test/intrinsics/gen/atomicAnd/152966.wgsl
deleted file mode 100644
index b99ab19..0000000
--- a/test/intrinsics/gen/atomicAnd/152966.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicAnd(ptr<storage, atomic<i32>, read_write>, i32) -> i32
-fn atomicAnd_152966() {
-  var res: i32 = atomicAnd(&sb_rw.arg_0, 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicAnd_152966();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicAnd_152966();
-}
diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl b/test/intrinsics/gen/atomicAnd/34edd3.wgsl
deleted file mode 100644
index 567863d..0000000
--- a/test/intrinsics/gen/atomicAnd/34edd3.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicAnd(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
-fn atomicAnd_34edd3() {
-  var res: u32 = atomicAnd(&arg_0, 1u);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicAnd_34edd3();
-}
diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl b/test/intrinsics/gen/atomicAnd/45a819.wgsl
deleted file mode 100644
index 9eef5c3..0000000
--- a/test/intrinsics/gen/atomicAnd/45a819.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicAnd(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
-fn atomicAnd_45a819() {
-  var res: i32 = atomicAnd(&arg_0, 1);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicAnd_45a819();
-}
diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl
deleted file mode 100644
index 042cba6..0000000
--- a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicAnd(ptr<storage, atomic<u32>, read_write>, u32) -> u32
-fn atomicAnd_85a8d9() {
-  var res: u32 = atomicAnd(&sb_rw.arg_0, 1u);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicAnd_85a8d9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicAnd_85a8d9();
-}
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl
deleted file mode 100644
index 3735ad4..0000000
--- a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicCompareExchangeWeak(ptr<storage, atomic<i32>, read_write>, i32, i32) -> vec2<i32>
-fn atomicCompareExchangeWeak_12871c() {
-  var res: vec2<i32> = atomicCompareExchangeWeak(&sb_rw.arg_0, 1, 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicCompareExchangeWeak_12871c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicCompareExchangeWeak_12871c();
-}
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl
deleted file mode 100644
index be43eb0..0000000
--- a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicCompareExchangeWeak(ptr<storage, atomic<u32>, read_write>, u32, u32) -> vec2<u32>
-fn atomicCompareExchangeWeak_6673da() {
-  var res: vec2<u32> = atomicCompareExchangeWeak(&sb_rw.arg_0, 1u, 1u);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicCompareExchangeWeak_6673da();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicCompareExchangeWeak_6673da();
-}
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl
deleted file mode 100644
index 58bf4b5..0000000
--- a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicCompareExchangeWeak(ptr<workgroup, atomic<i32>, read_write>, i32, i32) -> vec2<i32>
-fn atomicCompareExchangeWeak_89ea3b() {
-  var res: vec2<i32> = atomicCompareExchangeWeak(&arg_0, 1, 1);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicCompareExchangeWeak_89ea3b();
-}
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl
deleted file mode 100644
index 38cf645..0000000
--- a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicCompareExchangeWeak(ptr<workgroup, atomic<u32>, read_write>, u32, u32) -> vec2<u32>
-fn atomicCompareExchangeWeak_b2ab2c() {
-  var res: vec2<u32> = atomicCompareExchangeWeak(&arg_0, 1u, 1u);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicCompareExchangeWeak_b2ab2c();
-}
diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl
deleted file mode 100644
index 44ac264..0000000
--- a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicExchange(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
-fn atomicExchange_0a5dca() {
-  var res: u32 = atomicExchange(&arg_0, 1u);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicExchange_0a5dca();
-}
diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl b/test/intrinsics/gen/atomicExchange/d59712.wgsl
deleted file mode 100644
index fc014ee..0000000
--- a/test/intrinsics/gen/atomicExchange/d59712.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicExchange(ptr<storage, atomic<u32>, read_write>, u32) -> u32
-fn atomicExchange_d59712() {
-  var res: u32 = atomicExchange(&sb_rw.arg_0, 1u);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicExchange_d59712();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicExchange_d59712();
-}
diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl b/test/intrinsics/gen/atomicExchange/e114ba.wgsl
deleted file mode 100644
index f52534a..0000000
--- a/test/intrinsics/gen/atomicExchange/e114ba.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicExchange(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
-fn atomicExchange_e114ba() {
-  var res: i32 = atomicExchange(&arg_0, 1);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicExchange_e114ba();
-}
diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl
deleted file mode 100644
index be22ff9..0000000
--- a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicExchange(ptr<storage, atomic<i32>, read_write>, i32) -> i32
-fn atomicExchange_f2e22f() {
-  var res: i32 = atomicExchange(&sb_rw.arg_0, 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicExchange_f2e22f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicExchange_f2e22f();
-}
diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl b/test/intrinsics/gen/atomicLoad/0806ad.wgsl
deleted file mode 100644
index 0981e05..0000000
--- a/test/intrinsics/gen/atomicLoad/0806ad.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicLoad(ptr<storage, atomic<i32>, read_write>) -> i32
-fn atomicLoad_0806ad() {
-  var res: i32 = atomicLoad(&sb_rw.arg_0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicLoad_0806ad();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicLoad_0806ad();
-}
diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl b/test/intrinsics/gen/atomicLoad/361bf1.wgsl
deleted file mode 100644
index 3c51abc..0000000
--- a/test/intrinsics/gen/atomicLoad/361bf1.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicLoad(ptr<workgroup, atomic<u32>, read_write>) -> u32
-fn atomicLoad_361bf1() {
-  var res: u32 = atomicLoad(&arg_0);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicLoad_361bf1();
-}
diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl b/test/intrinsics/gen/atomicLoad/afcc03.wgsl
deleted file mode 100644
index 7585c6f..0000000
--- a/test/intrinsics/gen/atomicLoad/afcc03.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicLoad(ptr<workgroup, atomic<i32>, read_write>) -> i32
-fn atomicLoad_afcc03() {
-  var res: i32 = atomicLoad(&arg_0);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicLoad_afcc03();
-}
diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl
deleted file mode 100644
index d337a1e..0000000
--- a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicLoad(ptr<storage, atomic<u32>, read_write>) -> u32
-fn atomicLoad_fe6cc3() {
-  var res: u32 = atomicLoad(&sb_rw.arg_0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicLoad_fe6cc3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicLoad_fe6cc3();
-}
diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl b/test/intrinsics/gen/atomicMax/51b9be.wgsl
deleted file mode 100644
index 7f2e69c..0000000
--- a/test/intrinsics/gen/atomicMax/51b9be.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicMax(ptr<storage, atomic<u32>, read_write>, u32) -> u32
-fn atomicMax_51b9be() {
-  var res: u32 = atomicMax(&sb_rw.arg_0, 1u);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicMax_51b9be();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicMax_51b9be();
-}
diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl b/test/intrinsics/gen/atomicMax/92aa72.wgsl
deleted file mode 100644
index 603ea33..0000000
--- a/test/intrinsics/gen/atomicMax/92aa72.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicMax(ptr<storage, atomic<i32>, read_write>, i32) -> i32
-fn atomicMax_92aa72() {
-  var res: i32 = atomicMax(&sb_rw.arg_0, 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicMax_92aa72();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicMax_92aa72();
-}
diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl b/test/intrinsics/gen/atomicMax/a89cc3.wgsl
deleted file mode 100644
index f6c65cf..0000000
--- a/test/intrinsics/gen/atomicMax/a89cc3.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicMax(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
-fn atomicMax_a89cc3() {
-  var res: i32 = atomicMax(&arg_0, 1);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicMax_a89cc3();
-}
diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl b/test/intrinsics/gen/atomicMax/beccfc.wgsl
deleted file mode 100644
index c6c4b60..0000000
--- a/test/intrinsics/gen/atomicMax/beccfc.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicMax(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
-fn atomicMax_beccfc() {
-  var res: u32 = atomicMax(&arg_0, 1u);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicMax_beccfc();
-}
diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl b/test/intrinsics/gen/atomicMin/278235.wgsl
deleted file mode 100644
index 2a0cf13..0000000
--- a/test/intrinsics/gen/atomicMin/278235.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicMin(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
-fn atomicMin_278235() {
-  var res: i32 = atomicMin(&arg_0, 1);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicMin_278235();
-}
diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl b/test/intrinsics/gen/atomicMin/69d383.wgsl
deleted file mode 100644
index 41b6284..0000000
--- a/test/intrinsics/gen/atomicMin/69d383.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicMin(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
-fn atomicMin_69d383() {
-  var res: u32 = atomicMin(&arg_0, 1u);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicMin_69d383();
-}
diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl b/test/intrinsics/gen/atomicMin/8e38dc.wgsl
deleted file mode 100644
index 9512528..0000000
--- a/test/intrinsics/gen/atomicMin/8e38dc.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicMin(ptr<storage, atomic<i32>, read_write>, i32) -> i32
-fn atomicMin_8e38dc() {
-  var res: i32 = atomicMin(&sb_rw.arg_0, 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicMin_8e38dc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicMin_8e38dc();
-}
diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl b/test/intrinsics/gen/atomicMin/c67a74.wgsl
deleted file mode 100644
index fe5bb45..0000000
--- a/test/intrinsics/gen/atomicMin/c67a74.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicMin(ptr<storage, atomic<u32>, read_write>, u32) -> u32
-fn atomicMin_c67a74() {
-  var res: u32 = atomicMin(&sb_rw.arg_0, 1u);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicMin_c67a74();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicMin_c67a74();
-}
diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl b/test/intrinsics/gen/atomicOr/5e3d61.wgsl
deleted file mode 100644
index be6bc51..0000000
--- a/test/intrinsics/gen/atomicOr/5e3d61.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicOr(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
-fn atomicOr_5e3d61() {
-  var res: u32 = atomicOr(&arg_0, 1u);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicOr_5e3d61();
-}
diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl b/test/intrinsics/gen/atomicOr/5e95d4.wgsl
deleted file mode 100644
index 356f0d0..0000000
--- a/test/intrinsics/gen/atomicOr/5e95d4.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicOr(ptr<storage, atomic<u32>, read_write>, u32) -> u32
-fn atomicOr_5e95d4() {
-  var res: u32 = atomicOr(&sb_rw.arg_0, 1u);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicOr_5e95d4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicOr_5e95d4();
-}
diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl b/test/intrinsics/gen/atomicOr/8d96a0.wgsl
deleted file mode 100644
index c686a28..0000000
--- a/test/intrinsics/gen/atomicOr/8d96a0.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicOr(ptr<storage, atomic<i32>, read_write>, i32) -> i32
-fn atomicOr_8d96a0() {
-  var res: i32 = atomicOr(&sb_rw.arg_0, 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicOr_8d96a0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicOr_8d96a0();
-}
diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl b/test/intrinsics/gen/atomicOr/d09248.wgsl
deleted file mode 100644
index ead0c34..0000000
--- a/test/intrinsics/gen/atomicOr/d09248.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicOr(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
-fn atomicOr_d09248() {
-  var res: i32 = atomicOr(&arg_0, 1);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicOr_d09248();
-}
diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl b/test/intrinsics/gen/atomicStore/726882.wgsl
deleted file mode 100644
index 3994efb..0000000
--- a/test/intrinsics/gen/atomicStore/726882.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicStore(ptr<workgroup, atomic<u32>, read_write>, u32)
-fn atomicStore_726882() {
-  atomicStore(&arg_0, 1u);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicStore_726882();
-}
diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl b/test/intrinsics/gen/atomicStore/8bea94.wgsl
deleted file mode 100644
index 3ce1a43..0000000
--- a/test/intrinsics/gen/atomicStore/8bea94.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicStore(ptr<workgroup, atomic<i32>, read_write>, i32)
-fn atomicStore_8bea94() {
-  atomicStore(&arg_0, 1);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicStore_8bea94();
-}
diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl b/test/intrinsics/gen/atomicStore/cdc29e.wgsl
deleted file mode 100644
index b9cb390..0000000
--- a/test/intrinsics/gen/atomicStore/cdc29e.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicStore(ptr<storage, atomic<u32>, read_write>, u32)
-fn atomicStore_cdc29e() {
-  atomicStore(&sb_rw.arg_0, 1u);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicStore_cdc29e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicStore_cdc29e();
-}
diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl
deleted file mode 100644
index a4ff095..0000000
--- a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicStore(ptr<storage, atomic<i32>, read_write>, i32)
-fn atomicStore_d1e9a6() {
-  atomicStore(&sb_rw.arg_0, 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicStore_d1e9a6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicStore_d1e9a6();
-}
diff --git a/test/intrinsics/gen/atomicSub/051100.wgsl b/test/intrinsics/gen/atomicSub/051100.wgsl
deleted file mode 100644
index 698b794..0000000
--- a/test/intrinsics/gen/atomicSub/051100.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicSub(ptr<storage, atomic<i32>, read_write>, i32) -> i32
-fn atomicSub_051100() {
-  var res: i32 = atomicSub(&sb_rw.arg_0, 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicSub_051100();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicSub_051100();
-}
diff --git a/test/intrinsics/gen/atomicSub/0d26c2.wgsl b/test/intrinsics/gen/atomicSub/0d26c2.wgsl
deleted file mode 100644
index 84cfa43..0000000
--- a/test/intrinsics/gen/atomicSub/0d26c2.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicSub(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
-fn atomicSub_0d26c2() {
-  var res: u32 = atomicSub(&arg_0, 1u);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicSub_0d26c2();
-}
diff --git a/test/intrinsics/gen/atomicSub/15bfc9.wgsl b/test/intrinsics/gen/atomicSub/15bfc9.wgsl
deleted file mode 100644
index e46889e..0000000
--- a/test/intrinsics/gen/atomicSub/15bfc9.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicSub(ptr<storage, atomic<u32>, read_write>, u32) -> u32
-fn atomicSub_15bfc9() {
-  var res: u32 = atomicSub(&sb_rw.arg_0, 1u);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicSub_15bfc9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicSub_15bfc9();
-}
diff --git a/test/intrinsics/gen/atomicSub/77883a.wgsl b/test/intrinsics/gen/atomicSub/77883a.wgsl
deleted file mode 100644
index fc8fa76..0000000
--- a/test/intrinsics/gen/atomicSub/77883a.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicSub(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
-fn atomicSub_77883a() {
-  var res: i32 = atomicSub(&arg_0, 1);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicSub_77883a();
-}
diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl b/test/intrinsics/gen/atomicXor/54510e.wgsl
deleted file mode 100644
index 6928f87..0000000
--- a/test/intrinsics/gen/atomicXor/54510e.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<u32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicXor(ptr<storage, atomic<u32>, read_write>, u32) -> u32
-fn atomicXor_54510e() {
-  var res: u32 = atomicXor(&sb_rw.arg_0, 1u);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicXor_54510e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicXor_54510e();
-}
diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl b/test/intrinsics/gen/atomicXor/75dc95.wgsl
deleted file mode 100644
index 061d653..0000000
--- a/test/intrinsics/gen/atomicXor/75dc95.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<i32>;
-
-// fn atomicXor(ptr<workgroup, atomic<i32>, read_write>, i32) -> i32
-fn atomicXor_75dc95() {
-  var res: i32 = atomicXor(&arg_0, 1);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicXor_75dc95();
-}
diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl b/test/intrinsics/gen/atomicXor/c1b78c.wgsl
deleted file mode 100644
index 5bbc251..0000000
--- a/test/intrinsics/gen/atomicXor/c1b78c.wgsl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-struct SB_RW {
-  arg_0: atomic<i32>;
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-
-// fn atomicXor(ptr<storage, atomic<i32>, read_write>, i32) -> i32
-fn atomicXor_c1b78c() {
-  var res: i32 = atomicXor(&sb_rw.arg_0, 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  atomicXor_c1b78c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicXor_c1b78c();
-}
diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl b/test/intrinsics/gen/atomicXor/c8e6be.wgsl
deleted file mode 100644
index ce24118..0000000
--- a/test/intrinsics/gen/atomicXor/c8e6be.wgsl
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-var<workgroup> arg_0: atomic<u32>;
-
-// fn atomicXor(ptr<workgroup, atomic<u32>, read_write>, u32) -> u32
-fn atomicXor_c8e6be() {
-  var res: u32 = atomicXor(&arg_0, 1u);
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  atomicXor_c8e6be();
-}
diff --git a/test/intrinsics/gen/ceil/34064b.wgsl b/test/intrinsics/gen/ceil/34064b.wgsl
deleted file mode 100644
index 3d79d91..0000000
--- a/test/intrinsics/gen/ceil/34064b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn ceil(vec<3, f32>) -> vec<3, f32>
-fn ceil_34064b() {
-  var res: vec3<f32> = ceil(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  ceil_34064b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  ceil_34064b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  ceil_34064b();
-}
diff --git a/test/intrinsics/gen/ceil/678655.wgsl b/test/intrinsics/gen/ceil/678655.wgsl
deleted file mode 100644
index 0a49b58..0000000
--- a/test/intrinsics/gen/ceil/678655.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn ceil(f32) -> f32
-fn ceil_678655() {
-  var res: f32 = ceil(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  ceil_678655();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  ceil_678655();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  ceil_678655();
-}
diff --git a/test/intrinsics/gen/ceil/96f597.wgsl b/test/intrinsics/gen/ceil/96f597.wgsl
deleted file mode 100644
index 84647b9..0000000
--- a/test/intrinsics/gen/ceil/96f597.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn ceil(vec<2, f32>) -> vec<2, f32>
-fn ceil_96f597() {
-  var res: vec2<f32> = ceil(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  ceil_96f597();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  ceil_96f597();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  ceil_96f597();
-}
diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl b/test/intrinsics/gen/ceil/b74c16.wgsl
deleted file mode 100644
index 46a48b4..0000000
--- a/test/intrinsics/gen/ceil/b74c16.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn ceil(vec<4, f32>) -> vec<4, f32>
-fn ceil_b74c16() {
-  var res: vec4<f32> = ceil(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  ceil_b74c16();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  ceil_b74c16();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  ceil_b74c16();
-}
diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl b/test/intrinsics/gen/clamp/0acf8f.wgsl
deleted file mode 100644
index a55d7dc..0000000
--- a/test/intrinsics/gen/clamp/0acf8f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn clamp_0acf8f() {
-  var res: vec2<f32> = clamp(vec2<f32>(), vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_0acf8f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_0acf8f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_0acf8f();
-}
diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl b/test/intrinsics/gen/clamp/1a32e3.wgsl
deleted file mode 100644
index 723c134..0000000
--- a/test/intrinsics/gen/clamp/1a32e3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(vec<4, i32>, vec<4, i32>, vec<4, i32>) -> vec<4, i32>
-fn clamp_1a32e3() {
-  var res: vec4<i32> = clamp(vec4<i32>(), vec4<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_1a32e3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_1a32e3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_1a32e3();
-}
diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl b/test/intrinsics/gen/clamp/2bd567.wgsl
deleted file mode 100644
index e8d2ed2..0000000
--- a/test/intrinsics/gen/clamp/2bd567.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(f32, f32, f32) -> f32
-fn clamp_2bd567() {
-  var res: f32 = clamp(1.0, 1.0, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_2bd567();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_2bd567();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_2bd567();
-}
diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl b/test/intrinsics/gen/clamp/2bde41.wgsl
deleted file mode 100644
index 582549c..0000000
--- a/test/intrinsics/gen/clamp/2bde41.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn clamp_2bde41() {
-  var res: vec4<f32> = clamp(vec4<f32>(), vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_2bde41();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_2bde41();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_2bde41();
-}
diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl b/test/intrinsics/gen/clamp/548fc7.wgsl
deleted file mode 100644
index 8863032..0000000
--- a/test/intrinsics/gen/clamp/548fc7.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(vec<3, u32>, vec<3, u32>, vec<3, u32>) -> vec<3, u32>
-fn clamp_548fc7() {
-  var res: vec3<u32> = clamp(vec3<u32>(), vec3<u32>(), vec3<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_548fc7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_548fc7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_548fc7();
-}
diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl b/test/intrinsics/gen/clamp/5f0819.wgsl
deleted file mode 100644
index c128db4..0000000
--- a/test/intrinsics/gen/clamp/5f0819.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(vec<3, i32>, vec<3, i32>, vec<3, i32>) -> vec<3, i32>
-fn clamp_5f0819() {
-  var res: vec3<i32> = clamp(vec3<i32>(), vec3<i32>(), vec3<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_5f0819();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_5f0819();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_5f0819();
-}
diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl b/test/intrinsics/gen/clamp/6c1749.wgsl
deleted file mode 100644
index 3592939..0000000
--- a/test/intrinsics/gen/clamp/6c1749.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(vec<2, i32>, vec<2, i32>, vec<2, i32>) -> vec<2, i32>
-fn clamp_6c1749() {
-  var res: vec2<i32> = clamp(vec2<i32>(), vec2<i32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_6c1749();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_6c1749();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_6c1749();
-}
diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl b/test/intrinsics/gen/clamp/7706d7.wgsl
deleted file mode 100644
index 5e648fe..0000000
--- a/test/intrinsics/gen/clamp/7706d7.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(vec<2, u32>, vec<2, u32>, vec<2, u32>) -> vec<2, u32>
-fn clamp_7706d7() {
-  var res: vec2<u32> = clamp(vec2<u32>(), vec2<u32>(), vec2<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_7706d7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_7706d7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_7706d7();
-}
diff --git a/test/intrinsics/gen/clamp/867397.wgsl b/test/intrinsics/gen/clamp/867397.wgsl
deleted file mode 100644
index 96596d0c..0000000
--- a/test/intrinsics/gen/clamp/867397.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn clamp_867397() {
-  var res: vec3<f32> = clamp(vec3<f32>(), vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_867397();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_867397();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_867397();
-}
diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl b/test/intrinsics/gen/clamp/a2de25.wgsl
deleted file mode 100644
index 403c5bf..0000000
--- a/test/intrinsics/gen/clamp/a2de25.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(u32, u32, u32) -> u32
-fn clamp_a2de25() {
-  var res: u32 = clamp(1u, 1u, 1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_a2de25();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_a2de25();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_a2de25();
-}
diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl b/test/intrinsics/gen/clamp/b07c65.wgsl
deleted file mode 100644
index 1d18709..0000000
--- a/test/intrinsics/gen/clamp/b07c65.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(i32, i32, i32) -> i32
-fn clamp_b07c65() {
-  var res: i32 = clamp(1, 1, 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_b07c65();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_b07c65();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_b07c65();
-}
diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl b/test/intrinsics/gen/clamp/bd43ce.wgsl
deleted file mode 100644
index 45085ef..0000000
--- a/test/intrinsics/gen/clamp/bd43ce.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn clamp(vec<4, u32>, vec<4, u32>, vec<4, u32>) -> vec<4, u32>
-fn clamp_bd43ce() {
-  var res: vec4<u32> = clamp(vec4<u32>(), vec4<u32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  clamp_bd43ce();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  clamp_bd43ce();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  clamp_bd43ce();
-}
diff --git a/test/intrinsics/gen/cos/16dc15.wgsl b/test/intrinsics/gen/cos/16dc15.wgsl
deleted file mode 100644
index 9f92844..0000000
--- a/test/intrinsics/gen/cos/16dc15.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn cos(vec<3, f32>) -> vec<3, f32>
-fn cos_16dc15() {
-  var res: vec3<f32> = cos(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  cos_16dc15();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  cos_16dc15();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  cos_16dc15();
-}
diff --git a/test/intrinsics/gen/cos/29d66d.wgsl b/test/intrinsics/gen/cos/29d66d.wgsl
deleted file mode 100644
index d0082a4..0000000
--- a/test/intrinsics/gen/cos/29d66d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn cos(vec<4, f32>) -> vec<4, f32>
-fn cos_29d66d() {
-  var res: vec4<f32> = cos(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  cos_29d66d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  cos_29d66d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  cos_29d66d();
-}
diff --git a/test/intrinsics/gen/cos/c3b486.wgsl b/test/intrinsics/gen/cos/c3b486.wgsl
deleted file mode 100644
index 58bf973..0000000
--- a/test/intrinsics/gen/cos/c3b486.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn cos(vec<2, f32>) -> vec<2, f32>
-fn cos_c3b486() {
-  var res: vec2<f32> = cos(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  cos_c3b486();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  cos_c3b486();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  cos_c3b486();
-}
diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl b/test/intrinsics/gen/cos/c5c28e.wgsl
deleted file mode 100644
index 249a587..0000000
--- a/test/intrinsics/gen/cos/c5c28e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn cos(f32) -> f32
-fn cos_c5c28e() {
-  var res: f32 = cos(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  cos_c5c28e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  cos_c5c28e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  cos_c5c28e();
-}
diff --git a/test/intrinsics/gen/cosh/377652.wgsl b/test/intrinsics/gen/cosh/377652.wgsl
deleted file mode 100644
index b528307..0000000
--- a/test/intrinsics/gen/cosh/377652.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn cosh(vec<3, f32>) -> vec<3, f32>
-fn cosh_377652() {
-  var res: vec3<f32> = cosh(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  cosh_377652();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  cosh_377652();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  cosh_377652();
-}
diff --git a/test/intrinsics/gen/cosh/c13756.wgsl b/test/intrinsics/gen/cosh/c13756.wgsl
deleted file mode 100644
index fa11315..0000000
--- a/test/intrinsics/gen/cosh/c13756.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn cosh(vec<2, f32>) -> vec<2, f32>
-fn cosh_c13756() {
-  var res: vec2<f32> = cosh(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  cosh_c13756();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  cosh_c13756();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  cosh_c13756();
-}
diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl b/test/intrinsics/gen/cosh/da92dd.wgsl
deleted file mode 100644
index 59eb8df..0000000
--- a/test/intrinsics/gen/cosh/da92dd.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn cosh(f32) -> f32
-fn cosh_da92dd() {
-  var res: f32 = cosh(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  cosh_da92dd();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  cosh_da92dd();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  cosh_da92dd();
-}
diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl b/test/intrinsics/gen/cosh/e0c1de.wgsl
deleted file mode 100644
index 961d55f..0000000
--- a/test/intrinsics/gen/cosh/e0c1de.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn cosh(vec<4, f32>) -> vec<4, f32>
-fn cosh_e0c1de() {
-  var res: vec4<f32> = cosh(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  cosh_e0c1de();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  cosh_e0c1de();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  cosh_e0c1de();
-}
diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl b/test/intrinsics/gen/countOneBits/0d0e46.wgsl
deleted file mode 100644
index dc6b49e..0000000
--- a/test/intrinsics/gen/countOneBits/0d0e46.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn countOneBits(vec<4, u32>) -> vec<4, u32>
-fn countOneBits_0d0e46() {
-  var res: vec4<u32> = countOneBits(vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  countOneBits_0d0e46();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  countOneBits_0d0e46();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  countOneBits_0d0e46();
-}
diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl b/test/intrinsics/gen/countOneBits/0f7980.wgsl
deleted file mode 100644
index cf4b27b..0000000
--- a/test/intrinsics/gen/countOneBits/0f7980.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn countOneBits(vec<4, i32>) -> vec<4, i32>
-fn countOneBits_0f7980() {
-  var res: vec4<i32> = countOneBits(vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  countOneBits_0f7980();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  countOneBits_0f7980();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  countOneBits_0f7980();
-}
diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl b/test/intrinsics/gen/countOneBits/65d2ae.wgsl
deleted file mode 100644
index ba29117..0000000
--- a/test/intrinsics/gen/countOneBits/65d2ae.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn countOneBits(vec<3, i32>) -> vec<3, i32>
-fn countOneBits_65d2ae() {
-  var res: vec3<i32> = countOneBits(vec3<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  countOneBits_65d2ae();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  countOneBits_65d2ae();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  countOneBits_65d2ae();
-}
diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl b/test/intrinsics/gen/countOneBits/690cfc.wgsl
deleted file mode 100644
index 77ce9c4..0000000
--- a/test/intrinsics/gen/countOneBits/690cfc.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn countOneBits(vec<3, u32>) -> vec<3, u32>
-fn countOneBits_690cfc() {
-  var res: vec3<u32> = countOneBits(vec3<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  countOneBits_690cfc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  countOneBits_690cfc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  countOneBits_690cfc();
-}
diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl b/test/intrinsics/gen/countOneBits/94fd81.wgsl
deleted file mode 100644
index ec7f081..0000000
--- a/test/intrinsics/gen/countOneBits/94fd81.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn countOneBits(vec<2, u32>) -> vec<2, u32>
-fn countOneBits_94fd81() {
-  var res: vec2<u32> = countOneBits(vec2<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  countOneBits_94fd81();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  countOneBits_94fd81();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  countOneBits_94fd81();
-}
diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl b/test/intrinsics/gen/countOneBits/ae44f9.wgsl
deleted file mode 100644
index db56395..0000000
--- a/test/intrinsics/gen/countOneBits/ae44f9.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn countOneBits(u32) -> u32
-fn countOneBits_ae44f9() {
-  var res: u32 = countOneBits(1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  countOneBits_ae44f9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  countOneBits_ae44f9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  countOneBits_ae44f9();
-}
diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl b/test/intrinsics/gen/countOneBits/af90e2.wgsl
deleted file mode 100644
index f57048c..0000000
--- a/test/intrinsics/gen/countOneBits/af90e2.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn countOneBits(vec<2, i32>) -> vec<2, i32>
-fn countOneBits_af90e2() {
-  var res: vec2<i32> = countOneBits(vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  countOneBits_af90e2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  countOneBits_af90e2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  countOneBits_af90e2();
-}
diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl b/test/intrinsics/gen/countOneBits/fd88b2.wgsl
deleted file mode 100644
index f95dcc2..0000000
--- a/test/intrinsics/gen/countOneBits/fd88b2.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn countOneBits(i32) -> i32
-fn countOneBits_fd88b2() {
-  var res: i32 = countOneBits(1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  countOneBits_fd88b2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  countOneBits_fd88b2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  countOneBits_fd88b2();
-}
diff --git a/test/intrinsics/gen/cross/041cb0.wgsl b/test/intrinsics/gen/cross/041cb0.wgsl
deleted file mode 100644
index 50f8539..0000000
--- a/test/intrinsics/gen/cross/041cb0.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn cross(vec3<f32>, vec3<f32>) -> vec3<f32>
-fn cross_041cb0() {
-  var res: vec3<f32> = cross(vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  cross_041cb0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  cross_041cb0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  cross_041cb0();
-}
diff --git a/test/intrinsics/gen/degrees/0d170c.wgsl b/test/intrinsics/gen/degrees/0d170c.wgsl
deleted file mode 100644
index b2ee663..0000000
--- a/test/intrinsics/gen/degrees/0d170c.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn degrees(vec<4, f32>) -> vec<4, f32>
-fn degrees_0d170c() {
-  var res: vec4<f32> = degrees(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  degrees_0d170c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  degrees_0d170c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  degrees_0d170c();
-}
diff --git a/test/intrinsics/gen/degrees/1ad5df.wgsl b/test/intrinsics/gen/degrees/1ad5df.wgsl
deleted file mode 100644
index b4c46db..0000000
--- a/test/intrinsics/gen/degrees/1ad5df.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn degrees(vec<2, f32>) -> vec<2, f32>
-fn degrees_1ad5df() {
-  var res: vec2<f32> = degrees(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  degrees_1ad5df();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  degrees_1ad5df();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  degrees_1ad5df();
-}
diff --git a/test/intrinsics/gen/degrees/2af623.wgsl b/test/intrinsics/gen/degrees/2af623.wgsl
deleted file mode 100644
index 22772dd..0000000
--- a/test/intrinsics/gen/degrees/2af623.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn degrees(vec<3, f32>) -> vec<3, f32>
-fn degrees_2af623() {
-  var res: vec3<f32> = degrees(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  degrees_2af623();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  degrees_2af623();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  degrees_2af623();
-}
diff --git a/test/intrinsics/gen/degrees/51f705.wgsl b/test/intrinsics/gen/degrees/51f705.wgsl
deleted file mode 100644
index 71c2e93..0000000
--- a/test/intrinsics/gen/degrees/51f705.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn degrees(f32) -> f32
-fn degrees_51f705() {
-  var res: f32 = degrees(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  degrees_51f705();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  degrees_51f705();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  degrees_51f705();
-}
diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl b/test/intrinsics/gen/determinant/2b62ba.wgsl
deleted file mode 100644
index 10fd4e4..0000000
--- a/test/intrinsics/gen/determinant/2b62ba.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn determinant(mat<3, 3, f32>) -> f32
-fn determinant_2b62ba() {
-  var res: f32 = determinant(mat3x3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  determinant_2b62ba();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  determinant_2b62ba();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  determinant_2b62ba();
-}
diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl b/test/intrinsics/gen/determinant/a0a87c.wgsl
deleted file mode 100644
index b7720f5..0000000
--- a/test/intrinsics/gen/determinant/a0a87c.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn determinant(mat<4, 4, f32>) -> f32
-fn determinant_a0a87c() {
-  var res: f32 = determinant(mat4x4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  determinant_a0a87c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  determinant_a0a87c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  determinant_a0a87c();
-}
diff --git a/test/intrinsics/gen/determinant/e19305.wgsl b/test/intrinsics/gen/determinant/e19305.wgsl
deleted file mode 100644
index 1406a13..0000000
--- a/test/intrinsics/gen/determinant/e19305.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn determinant(mat<2, 2, f32>) -> f32
-fn determinant_e19305() {
-  var res: f32 = determinant(mat2x2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  determinant_e19305();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  determinant_e19305();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  determinant_e19305();
-}
diff --git a/test/intrinsics/gen/distance/0657d4.wgsl b/test/intrinsics/gen/distance/0657d4.wgsl
deleted file mode 100644
index 2c57d82..0000000
--- a/test/intrinsics/gen/distance/0657d4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn distance(vec<3, f32>, vec<3, f32>) -> f32
-fn distance_0657d4() {
-  var res: f32 = distance(vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  distance_0657d4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  distance_0657d4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  distance_0657d4();
-}
diff --git a/test/intrinsics/gen/distance/9646ea.wgsl b/test/intrinsics/gen/distance/9646ea.wgsl
deleted file mode 100644
index 009877c..0000000
--- a/test/intrinsics/gen/distance/9646ea.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn distance(vec<4, f32>, vec<4, f32>) -> f32
-fn distance_9646ea() {
-  var res: f32 = distance(vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  distance_9646ea();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  distance_9646ea();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  distance_9646ea();
-}
diff --git a/test/intrinsics/gen/distance/aa4055.wgsl b/test/intrinsics/gen/distance/aa4055.wgsl
deleted file mode 100644
index 0094477..0000000
--- a/test/intrinsics/gen/distance/aa4055.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn distance(vec<2, f32>, vec<2, f32>) -> f32
-fn distance_aa4055() {
-  var res: f32 = distance(vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  distance_aa4055();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  distance_aa4055();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  distance_aa4055();
-}
diff --git a/test/intrinsics/gen/distance/cfed73.wgsl b/test/intrinsics/gen/distance/cfed73.wgsl
deleted file mode 100644
index c40408d..0000000
--- a/test/intrinsics/gen/distance/cfed73.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn distance(f32, f32) -> f32
-fn distance_cfed73() {
-  var res: f32 = distance(1.0, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  distance_cfed73();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  distance_cfed73();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  distance_cfed73();
-}
diff --git a/test/intrinsics/gen/dot/0c577b.wgsl b/test/intrinsics/gen/dot/0c577b.wgsl
deleted file mode 100644
index 745f4c4..0000000
--- a/test/intrinsics/gen/dot/0c577b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dot(vec<4, f32>, vec<4, f32>) -> f32
-fn dot_0c577b() {
-  var res: f32 = dot(vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  dot_0c577b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dot_0c577b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  dot_0c577b();
-}
diff --git a/test/intrinsics/gen/dot/7548a0.wgsl b/test/intrinsics/gen/dot/7548a0.wgsl
deleted file mode 100644
index 4ee9011f..0000000
--- a/test/intrinsics/gen/dot/7548a0.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dot(vec<3, u32>, vec<3, u32>) -> u32
-fn dot_7548a0() {
-  var res: u32 = dot(vec3<u32>(), vec3<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  dot_7548a0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dot_7548a0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  dot_7548a0();
-}
diff --git a/test/intrinsics/gen/dot/883f0e.wgsl b/test/intrinsics/gen/dot/883f0e.wgsl
deleted file mode 100644
index 3a42f8c..0000000
--- a/test/intrinsics/gen/dot/883f0e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dot(vec<2, f32>, vec<2, f32>) -> f32
-fn dot_883f0e() {
-  var res: f32 = dot(vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  dot_883f0e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dot_883f0e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  dot_883f0e();
-}
diff --git a/test/intrinsics/gen/dot/97c7ee.wgsl b/test/intrinsics/gen/dot/97c7ee.wgsl
deleted file mode 100644
index c8f9459..0000000
--- a/test/intrinsics/gen/dot/97c7ee.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dot(vec<2, u32>, vec<2, u32>) -> u32
-fn dot_97c7ee() {
-  var res: u32 = dot(vec2<u32>(), vec2<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  dot_97c7ee();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dot_97c7ee();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  dot_97c7ee();
-}
diff --git a/test/intrinsics/gen/dot/ba4246.wgsl b/test/intrinsics/gen/dot/ba4246.wgsl
deleted file mode 100644
index fbeb139..0000000
--- a/test/intrinsics/gen/dot/ba4246.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dot(vec<3, f32>, vec<3, f32>) -> f32
-fn dot_ba4246() {
-  var res: f32 = dot(vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  dot_ba4246();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dot_ba4246();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  dot_ba4246();
-}
diff --git a/test/intrinsics/gen/dot/e994c7.wgsl b/test/intrinsics/gen/dot/e994c7.wgsl
deleted file mode 100644
index b78cbc4..0000000
--- a/test/intrinsics/gen/dot/e994c7.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dot(vec<4, u32>, vec<4, u32>) -> u32
-fn dot_e994c7() {
-  var res: u32 = dot(vec4<u32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  dot_e994c7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dot_e994c7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  dot_e994c7();
-}
diff --git a/test/intrinsics/gen/dot/ef6b1d.wgsl b/test/intrinsics/gen/dot/ef6b1d.wgsl
deleted file mode 100644
index 2e01ee2..0000000
--- a/test/intrinsics/gen/dot/ef6b1d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dot(vec<4, i32>, vec<4, i32>) -> i32
-fn dot_ef6b1d() {
-  var res: i32 = dot(vec4<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  dot_ef6b1d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dot_ef6b1d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  dot_ef6b1d();
-}
diff --git a/test/intrinsics/gen/dot/f1312c.wgsl b/test/intrinsics/gen/dot/f1312c.wgsl
deleted file mode 100644
index 6bb0876..0000000
--- a/test/intrinsics/gen/dot/f1312c.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dot(vec<3, i32>, vec<3, i32>) -> i32
-fn dot_f1312c() {
-  var res: i32 = dot(vec3<i32>(), vec3<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  dot_f1312c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dot_f1312c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  dot_f1312c();
-}
diff --git a/test/intrinsics/gen/dot/fc5f7c.wgsl b/test/intrinsics/gen/dot/fc5f7c.wgsl
deleted file mode 100644
index bbadae8..0000000
--- a/test/intrinsics/gen/dot/fc5f7c.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dot(vec<2, i32>, vec<2, i32>) -> i32
-fn dot_fc5f7c() {
-  var res: i32 = dot(vec2<i32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  dot_fc5f7c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dot_fc5f7c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  dot_fc5f7c();
-}
diff --git a/test/intrinsics/gen/dpdx/0763f7.wgsl b/test/intrinsics/gen/dpdx/0763f7.wgsl
deleted file mode 100644
index cbfc41a..0000000
--- a/test/intrinsics/gen/dpdx/0763f7.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdx(vec<3, f32>) -> vec<3, f32>
-fn dpdx_0763f7() {
-  var res: vec3<f32> = dpdx(vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdx_0763f7();
-}
diff --git a/test/intrinsics/gen/dpdx/99edb1.wgsl b/test/intrinsics/gen/dpdx/99edb1.wgsl
deleted file mode 100644
index 84f5126..0000000
--- a/test/intrinsics/gen/dpdx/99edb1.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdx(vec<2, f32>) -> vec<2, f32>
-fn dpdx_99edb1() {
-  var res: vec2<f32> = dpdx(vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdx_99edb1();
-}
diff --git a/test/intrinsics/gen/dpdx/c487fa.wgsl b/test/intrinsics/gen/dpdx/c487fa.wgsl
deleted file mode 100644
index 7b477fb..0000000
--- a/test/intrinsics/gen/dpdx/c487fa.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdx(vec<4, f32>) -> vec<4, f32>
-fn dpdx_c487fa() {
-  var res: vec4<f32> = dpdx(vec4<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdx_c487fa();
-}
diff --git a/test/intrinsics/gen/dpdx/e263de.wgsl b/test/intrinsics/gen/dpdx/e263de.wgsl
deleted file mode 100644
index 60498a7..0000000
--- a/test/intrinsics/gen/dpdx/e263de.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdx(f32) -> f32
-fn dpdx_e263de() {
-  var res: f32 = dpdx(1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdx_e263de();
-}
diff --git a/test/intrinsics/gen/dpdxCoarse/029152.wgsl b/test/intrinsics/gen/dpdxCoarse/029152.wgsl
deleted file mode 100644
index 1a7cc1d..0000000
--- a/test/intrinsics/gen/dpdxCoarse/029152.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdxCoarse(f32) -> f32
-fn dpdxCoarse_029152() {
-  var res: f32 = dpdxCoarse(1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdxCoarse_029152();
-}
diff --git a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl b/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl
deleted file mode 100644
index 5ccf411..0000000
--- a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdxCoarse(vec<2, f32>) -> vec<2, f32>
-fn dpdxCoarse_9581cf() {
-  var res: vec2<f32> = dpdxCoarse(vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdxCoarse_9581cf();
-}
diff --git a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl b/test/intrinsics/gen/dpdxCoarse/c28641.wgsl
deleted file mode 100644
index 8777156..0000000
--- a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdxCoarse(vec<4, f32>) -> vec<4, f32>
-fn dpdxCoarse_c28641() {
-  var res: vec4<f32> = dpdxCoarse(vec4<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdxCoarse_c28641();
-}
diff --git a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl b/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl
deleted file mode 100644
index 40b501c..0000000
--- a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdxCoarse(vec<3, f32>) -> vec<3, f32>
-fn dpdxCoarse_f64d7b() {
-  var res: vec3<f32> = dpdxCoarse(vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdxCoarse_f64d7b();
-}
diff --git a/test/intrinsics/gen/dpdxFine/8c5069.wgsl b/test/intrinsics/gen/dpdxFine/8c5069.wgsl
deleted file mode 100644
index b1db7e3..0000000
--- a/test/intrinsics/gen/dpdxFine/8c5069.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdxFine(vec<4, f32>) -> vec<4, f32>
-fn dpdxFine_8c5069() {
-  var res: vec4<f32> = dpdxFine(vec4<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdxFine_8c5069();
-}
diff --git a/test/intrinsics/gen/dpdxFine/9631de.wgsl b/test/intrinsics/gen/dpdxFine/9631de.wgsl
deleted file mode 100644
index f29dffb..0000000
--- a/test/intrinsics/gen/dpdxFine/9631de.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdxFine(vec<2, f32>) -> vec<2, f32>
-fn dpdxFine_9631de() {
-  var res: vec2<f32> = dpdxFine(vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdxFine_9631de();
-}
diff --git a/test/intrinsics/gen/dpdxFine/f401a2.wgsl b/test/intrinsics/gen/dpdxFine/f401a2.wgsl
deleted file mode 100644
index 405291f..0000000
--- a/test/intrinsics/gen/dpdxFine/f401a2.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdxFine(f32) -> f32
-fn dpdxFine_f401a2() {
-  var res: f32 = dpdxFine(1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdxFine_f401a2();
-}
diff --git a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl b/test/intrinsics/gen/dpdxFine/f92fb6.wgsl
deleted file mode 100644
index 8a3b66d..0000000
--- a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdxFine(vec<3, f32>) -> vec<3, f32>
-fn dpdxFine_f92fb6() {
-  var res: vec3<f32> = dpdxFine(vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdxFine_f92fb6();
-}
diff --git a/test/intrinsics/gen/dpdy/699a05.wgsl b/test/intrinsics/gen/dpdy/699a05.wgsl
deleted file mode 100644
index dc14668..0000000
--- a/test/intrinsics/gen/dpdy/699a05.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdy(vec<4, f32>) -> vec<4, f32>
-fn dpdy_699a05() {
-  var res: vec4<f32> = dpdy(vec4<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdy_699a05();
-}
diff --git a/test/intrinsics/gen/dpdy/7f8d84.wgsl b/test/intrinsics/gen/dpdy/7f8d84.wgsl
deleted file mode 100644
index c468777..0000000
--- a/test/intrinsics/gen/dpdy/7f8d84.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdy(f32) -> f32
-fn dpdy_7f8d84() {
-  var res: f32 = dpdy(1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdy_7f8d84();
-}
diff --git a/test/intrinsics/gen/dpdy/a8b56e.wgsl b/test/intrinsics/gen/dpdy/a8b56e.wgsl
deleted file mode 100644
index e79bff9..0000000
--- a/test/intrinsics/gen/dpdy/a8b56e.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdy(vec<2, f32>) -> vec<2, f32>
-fn dpdy_a8b56e() {
-  var res: vec2<f32> = dpdy(vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdy_a8b56e();
-}
diff --git a/test/intrinsics/gen/dpdy/feb40f.wgsl b/test/intrinsics/gen/dpdy/feb40f.wgsl
deleted file mode 100644
index f3afdc2..0000000
--- a/test/intrinsics/gen/dpdy/feb40f.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdy(vec<3, f32>) -> vec<3, f32>
-fn dpdy_feb40f() {
-  var res: vec3<f32> = dpdy(vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdy_feb40f();
-}
diff --git a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl b/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl
deleted file mode 100644
index 15007a3..0000000
--- a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdyCoarse(vec<2, f32>) -> vec<2, f32>
-fn dpdyCoarse_3e1ab4() {
-  var res: vec2<f32> = dpdyCoarse(vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdyCoarse_3e1ab4();
-}
diff --git a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl b/test/intrinsics/gen/dpdyCoarse/445d24.wgsl
deleted file mode 100644
index b397d4e..0000000
--- a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdyCoarse(vec<4, f32>) -> vec<4, f32>
-fn dpdyCoarse_445d24() {
-  var res: vec4<f32> = dpdyCoarse(vec4<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdyCoarse_445d24();
-}
diff --git a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl b/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl
deleted file mode 100644
index 7fc7907..0000000
--- a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdyCoarse(f32) -> f32
-fn dpdyCoarse_870a7e() {
-  var res: f32 = dpdyCoarse(1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdyCoarse_870a7e();
-}
diff --git a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl b/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl
deleted file mode 100644
index b1f32ef..0000000
--- a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdyCoarse(vec<3, f32>) -> vec<3, f32>
-fn dpdyCoarse_ae1873() {
-  var res: vec3<f32> = dpdyCoarse(vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdyCoarse_ae1873();
-}
diff --git a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl b/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl
deleted file mode 100644
index 3a28460..0000000
--- a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdyFine(vec<3, f32>) -> vec<3, f32>
-fn dpdyFine_1fb7ab() {
-  var res: vec3<f32> = dpdyFine(vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdyFine_1fb7ab();
-}
diff --git a/test/intrinsics/gen/dpdyFine/6eb673.wgsl b/test/intrinsics/gen/dpdyFine/6eb673.wgsl
deleted file mode 100644
index 9469533..0000000
--- a/test/intrinsics/gen/dpdyFine/6eb673.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdyFine(f32) -> f32
-fn dpdyFine_6eb673() {
-  var res: f32 = dpdyFine(1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdyFine_6eb673();
-}
diff --git a/test/intrinsics/gen/dpdyFine/d0a648.wgsl b/test/intrinsics/gen/dpdyFine/d0a648.wgsl
deleted file mode 100644
index 436f5a1..0000000
--- a/test/intrinsics/gen/dpdyFine/d0a648.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdyFine(vec<4, f32>) -> vec<4, f32>
-fn dpdyFine_d0a648() {
-  var res: vec4<f32> = dpdyFine(vec4<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdyFine_d0a648();
-}
diff --git a/test/intrinsics/gen/dpdyFine/df33aa.wgsl b/test/intrinsics/gen/dpdyFine/df33aa.wgsl
deleted file mode 100644
index fdfc9c8..0000000
--- a/test/intrinsics/gen/dpdyFine/df33aa.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn dpdyFine(vec<2, f32>) -> vec<2, f32>
-fn dpdyFine_df33aa() {
-  var res: vec2<f32> = dpdyFine(vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  dpdyFine_df33aa();
-}
diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl b/test/intrinsics/gen/exp/0f70eb.wgsl
deleted file mode 100644
index e65faa4..0000000
--- a/test/intrinsics/gen/exp/0f70eb.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn exp(vec<4, f32>) -> vec<4, f32>
-fn exp_0f70eb() {
-  var res: vec4<f32> = exp(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  exp_0f70eb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  exp_0f70eb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  exp_0f70eb();
-}
diff --git a/test/intrinsics/gen/exp/1951e7.wgsl b/test/intrinsics/gen/exp/1951e7.wgsl
deleted file mode 100644
index 6e006f3..0000000
--- a/test/intrinsics/gen/exp/1951e7.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn exp(vec<2, f32>) -> vec<2, f32>
-fn exp_1951e7() {
-  var res: vec2<f32> = exp(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  exp_1951e7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  exp_1951e7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  exp_1951e7();
-}
diff --git a/test/intrinsics/gen/exp/771fd2.wgsl b/test/intrinsics/gen/exp/771fd2.wgsl
deleted file mode 100644
index a1cb3cd..0000000
--- a/test/intrinsics/gen/exp/771fd2.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn exp(f32) -> f32
-fn exp_771fd2() {
-  var res: f32 = exp(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  exp_771fd2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  exp_771fd2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  exp_771fd2();
-}
diff --git a/test/intrinsics/gen/exp/d98450.wgsl b/test/intrinsics/gen/exp/d98450.wgsl
deleted file mode 100644
index 2404a17..0000000
--- a/test/intrinsics/gen/exp/d98450.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn exp(vec<3, f32>) -> vec<3, f32>
-fn exp_d98450() {
-  var res: vec3<f32> = exp(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  exp_d98450();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  exp_d98450();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  exp_d98450();
-}
diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl b/test/intrinsics/gen/exp2/1f8680.wgsl
deleted file mode 100644
index 0fdaeba..0000000
--- a/test/intrinsics/gen/exp2/1f8680.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn exp2(vec<3, f32>) -> vec<3, f32>
-fn exp2_1f8680() {
-  var res: vec3<f32> = exp2(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  exp2_1f8680();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  exp2_1f8680();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  exp2_1f8680();
-}
diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl b/test/intrinsics/gen/exp2/a9d0a7.wgsl
deleted file mode 100644
index 46e47f7..0000000
--- a/test/intrinsics/gen/exp2/a9d0a7.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn exp2(vec<4, f32>) -> vec<4, f32>
-fn exp2_a9d0a7() {
-  var res: vec4<f32> = exp2(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  exp2_a9d0a7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  exp2_a9d0a7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  exp2_a9d0a7();
-}
diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl b/test/intrinsics/gen/exp2/d6777c.wgsl
deleted file mode 100644
index 42933c0..0000000
--- a/test/intrinsics/gen/exp2/d6777c.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn exp2(vec<2, f32>) -> vec<2, f32>
-fn exp2_d6777c() {
-  var res: vec2<f32> = exp2(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  exp2_d6777c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  exp2_d6777c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  exp2_d6777c();
-}
diff --git a/test/intrinsics/gen/exp2/dea523.wgsl b/test/intrinsics/gen/exp2/dea523.wgsl
deleted file mode 100644
index 26e836a..0000000
--- a/test/intrinsics/gen/exp2/dea523.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn exp2(f32) -> f32
-fn exp2_dea523() {
-  var res: f32 = exp2(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  exp2_dea523();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  exp2_dea523();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  exp2_dea523();
-}
diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl b/test/intrinsics/gen/faceForward/5afbd5.wgsl
deleted file mode 100644
index 3e036f3..0000000
--- a/test/intrinsics/gen/faceForward/5afbd5.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn faceForward(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn faceForward_5afbd5() {
-  var res: vec3<f32> = faceForward(vec3<f32>(), vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  faceForward_5afbd5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  faceForward_5afbd5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  faceForward_5afbd5();
-}
diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl b/test/intrinsics/gen/faceForward/b316e5.wgsl
deleted file mode 100644
index 2e31ca6..0000000
--- a/test/intrinsics/gen/faceForward/b316e5.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn faceForward(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn faceForward_b316e5() {
-  var res: vec4<f32> = faceForward(vec4<f32>(), vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  faceForward_b316e5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  faceForward_b316e5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  faceForward_b316e5();
-}
diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl b/test/intrinsics/gen/faceForward/e6908b.wgsl
deleted file mode 100644
index 4c9a2be..0000000
--- a/test/intrinsics/gen/faceForward/e6908b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn faceForward(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn faceForward_e6908b() {
-  var res: vec2<f32> = faceForward(vec2<f32>(), vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  faceForward_e6908b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  faceForward_e6908b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  faceForward_e6908b();
-}
diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl b/test/intrinsics/gen/floor/3bccc4.wgsl
deleted file mode 100644
index 3d27b57..0000000
--- a/test/intrinsics/gen/floor/3bccc4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn floor(vec<4, f32>) -> vec<4, f32>
-fn floor_3bccc4() {
-  var res: vec4<f32> = floor(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  floor_3bccc4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  floor_3bccc4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  floor_3bccc4();
-}
diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl b/test/intrinsics/gen/floor/5fc9ac.wgsl
deleted file mode 100644
index 49afc11..0000000
--- a/test/intrinsics/gen/floor/5fc9ac.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn floor(vec<2, f32>) -> vec<2, f32>
-fn floor_5fc9ac() {
-  var res: vec2<f32> = floor(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  floor_5fc9ac();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  floor_5fc9ac();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  floor_5fc9ac();
-}
diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl b/test/intrinsics/gen/floor/60d7ea.wgsl
deleted file mode 100644
index 6e4c944..0000000
--- a/test/intrinsics/gen/floor/60d7ea.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn floor(vec<3, f32>) -> vec<3, f32>
-fn floor_60d7ea() {
-  var res: vec3<f32> = floor(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  floor_60d7ea();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  floor_60d7ea();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  floor_60d7ea();
-}
diff --git a/test/intrinsics/gen/floor/66f154.wgsl b/test/intrinsics/gen/floor/66f154.wgsl
deleted file mode 100644
index 8020bf6..0000000
--- a/test/intrinsics/gen/floor/66f154.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn floor(f32) -> f32
-fn floor_66f154() {
-  var res: f32 = floor(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  floor_66f154();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  floor_66f154();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  floor_66f154();
-}
diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl b/test/intrinsics/gen/fma/26a7a9.wgsl
deleted file mode 100644
index bb6f1c0..0000000
--- a/test/intrinsics/gen/fma/26a7a9.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fma(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn fma_26a7a9() {
-  var res: vec2<f32> = fma(vec2<f32>(), vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  fma_26a7a9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fma_26a7a9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  fma_26a7a9();
-}
diff --git a/test/intrinsics/gen/fma/6a3283.wgsl b/test/intrinsics/gen/fma/6a3283.wgsl
deleted file mode 100644
index 2074905..0000000
--- a/test/intrinsics/gen/fma/6a3283.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fma(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn fma_6a3283() {
-  var res: vec4<f32> = fma(vec4<f32>(), vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  fma_6a3283();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fma_6a3283();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  fma_6a3283();
-}
diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl b/test/intrinsics/gen/fma/c10ba3.wgsl
deleted file mode 100644
index 9bd4277..0000000
--- a/test/intrinsics/gen/fma/c10ba3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fma(f32, f32, f32) -> f32
-fn fma_c10ba3() {
-  var res: f32 = fma(1.0, 1.0, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  fma_c10ba3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fma_c10ba3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  fma_c10ba3();
-}
diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl b/test/intrinsics/gen/fma/e17c5c.wgsl
deleted file mode 100644
index a9adbb0..0000000
--- a/test/intrinsics/gen/fma/e17c5c.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fma(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn fma_e17c5c() {
-  var res: vec3<f32> = fma(vec3<f32>(), vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  fma_e17c5c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fma_e17c5c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  fma_e17c5c();
-}
diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl b/test/intrinsics/gen/fract/8bc1e9.wgsl
deleted file mode 100644
index d064af2..0000000
--- a/test/intrinsics/gen/fract/8bc1e9.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fract(vec<4, f32>) -> vec<4, f32>
-fn fract_8bc1e9() {
-  var res: vec4<f32> = fract(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  fract_8bc1e9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fract_8bc1e9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  fract_8bc1e9();
-}
diff --git a/test/intrinsics/gen/fract/943cb1.wgsl b/test/intrinsics/gen/fract/943cb1.wgsl
deleted file mode 100644
index 50d0038..0000000
--- a/test/intrinsics/gen/fract/943cb1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fract(vec<2, f32>) -> vec<2, f32>
-fn fract_943cb1() {
-  var res: vec2<f32> = fract(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  fract_943cb1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fract_943cb1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  fract_943cb1();
-}
diff --git a/test/intrinsics/gen/fract/a49758.wgsl b/test/intrinsics/gen/fract/a49758.wgsl
deleted file mode 100644
index 567a336..0000000
--- a/test/intrinsics/gen/fract/a49758.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fract(vec<3, f32>) -> vec<3, f32>
-fn fract_a49758() {
-  var res: vec3<f32> = fract(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  fract_a49758();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fract_a49758();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  fract_a49758();
-}
diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl b/test/intrinsics/gen/fract/fa5c71.wgsl
deleted file mode 100644
index 35a24e1..0000000
--- a/test/intrinsics/gen/fract/fa5c71.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fract(f32) -> f32
-fn fract_fa5c71() {
-  var res: f32 = fract(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  fract_fa5c71();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fract_fa5c71();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  fract_fa5c71();
-}
diff --git a/test/intrinsics/gen/frexp/368997.wgsl b/test/intrinsics/gen/frexp/368997.wgsl
deleted file mode 100644
index f7d9a71..0000000
--- a/test/intrinsics/gen/frexp/368997.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn frexp(vec<3, f32>) -> __frexp_result_vec<3>
-fn frexp_368997() {
-  var res = frexp(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  frexp_368997();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  frexp_368997();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  frexp_368997();
-}
diff --git a/test/intrinsics/gen/frexp/3c4f48.wgsl b/test/intrinsics/gen/frexp/3c4f48.wgsl
deleted file mode 100644
index 2dd0849..0000000
--- a/test/intrinsics/gen/frexp/3c4f48.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn frexp(vec<4, f32>) -> __frexp_result_vec<4>
-fn frexp_3c4f48() {
-  var res = frexp(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  frexp_3c4f48();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  frexp_3c4f48();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  frexp_3c4f48();
-}
diff --git a/test/intrinsics/gen/frexp/4bdfc7.wgsl b/test/intrinsics/gen/frexp/4bdfc7.wgsl
deleted file mode 100644
index eff4518..0000000
--- a/test/intrinsics/gen/frexp/4bdfc7.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn frexp(vec<2, f32>) -> __frexp_result_vec<2>
-fn frexp_4bdfc7() {
-  var res = frexp(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  frexp_4bdfc7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  frexp_4bdfc7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  frexp_4bdfc7();
-}
diff --git a/test/intrinsics/gen/frexp/eabd40.wgsl b/test/intrinsics/gen/frexp/eabd40.wgsl
deleted file mode 100644
index 3f2f00d..0000000
--- a/test/intrinsics/gen/frexp/eabd40.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn frexp(f32) -> __frexp_result
-fn frexp_eabd40() {
-  var res = frexp(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  frexp_eabd40();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  frexp_eabd40();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  frexp_eabd40();
-}
diff --git a/test/intrinsics/gen/fwidth/5d1b39.wgsl b/test/intrinsics/gen/fwidth/5d1b39.wgsl
deleted file mode 100644
index 8400934..0000000
--- a/test/intrinsics/gen/fwidth/5d1b39.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidth(vec<3, f32>) -> vec<3, f32>
-fn fwidth_5d1b39() {
-  var res: vec3<f32> = fwidth(vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidth_5d1b39();
-}
diff --git a/test/intrinsics/gen/fwidth/b83ebb.wgsl b/test/intrinsics/gen/fwidth/b83ebb.wgsl
deleted file mode 100644
index 36592fd..0000000
--- a/test/intrinsics/gen/fwidth/b83ebb.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidth(vec<2, f32>) -> vec<2, f32>
-fn fwidth_b83ebb() {
-  var res: vec2<f32> = fwidth(vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidth_b83ebb();
-}
diff --git a/test/intrinsics/gen/fwidth/d2ab9a.wgsl b/test/intrinsics/gen/fwidth/d2ab9a.wgsl
deleted file mode 100644
index 49c41ea6..0000000
--- a/test/intrinsics/gen/fwidth/d2ab9a.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidth(vec<4, f32>) -> vec<4, f32>
-fn fwidth_d2ab9a() {
-  var res: vec4<f32> = fwidth(vec4<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidth_d2ab9a();
-}
diff --git a/test/intrinsics/gen/fwidth/df38ef.wgsl b/test/intrinsics/gen/fwidth/df38ef.wgsl
deleted file mode 100644
index 9388812..0000000
--- a/test/intrinsics/gen/fwidth/df38ef.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidth(f32) -> f32
-fn fwidth_df38ef() {
-  var res: f32 = fwidth(1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidth_df38ef();
-}
diff --git a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl b/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl
deleted file mode 100644
index a7c4cd3..0000000
--- a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidthCoarse(f32) -> f32
-fn fwidthCoarse_159c8a() {
-  var res: f32 = fwidthCoarse(1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidthCoarse_159c8a();
-}
diff --git a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl b/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl
deleted file mode 100644
index 044c582..0000000
--- a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidthCoarse(vec<3, f32>) -> vec<3, f32>
-fn fwidthCoarse_1e59d9() {
-  var res: vec3<f32> = fwidthCoarse(vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidthCoarse_1e59d9();
-}
diff --git a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl b/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl
deleted file mode 100644
index da66152..0000000
--- a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidthCoarse(vec<4, f32>) -> vec<4, f32>
-fn fwidthCoarse_4e4fc4() {
-  var res: vec4<f32> = fwidthCoarse(vec4<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidthCoarse_4e4fc4();
-}
diff --git a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl b/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl
deleted file mode 100644
index bfd46bb..0000000
--- a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidthCoarse(vec<2, f32>) -> vec<2, f32>
-fn fwidthCoarse_e653f7() {
-  var res: vec2<f32> = fwidthCoarse(vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidthCoarse_e653f7();
-}
diff --git a/test/intrinsics/gen/fwidthFine/523fdc.wgsl b/test/intrinsics/gen/fwidthFine/523fdc.wgsl
deleted file mode 100644
index d02b674..0000000
--- a/test/intrinsics/gen/fwidthFine/523fdc.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidthFine(vec<3, f32>) -> vec<3, f32>
-fn fwidthFine_523fdc() {
-  var res: vec3<f32> = fwidthFine(vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidthFine_523fdc();
-}
diff --git a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl b/test/intrinsics/gen/fwidthFine/68f4ef.wgsl
deleted file mode 100644
index cd641a0..0000000
--- a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidthFine(vec<4, f32>) -> vec<4, f32>
-fn fwidthFine_68f4ef() {
-  var res: vec4<f32> = fwidthFine(vec4<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidthFine_68f4ef();
-}
diff --git a/test/intrinsics/gen/fwidthFine/f1742d.wgsl b/test/intrinsics/gen/fwidthFine/f1742d.wgsl
deleted file mode 100644
index c78f9b0..0000000
--- a/test/intrinsics/gen/fwidthFine/f1742d.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidthFine(f32) -> f32
-fn fwidthFine_f1742d() {
-  var res: f32 = fwidthFine(1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidthFine_f1742d();
-}
diff --git a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl b/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl
deleted file mode 100644
index 4176ec2..0000000
--- a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn fwidthFine(vec<2, f32>) -> vec<2, f32>
-fn fwidthFine_ff6aa0() {
-  var res: vec2<f32> = fwidthFine(vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  fwidthFine_ff6aa0();
-}
diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl b/test/intrinsics/gen/inverseSqrt/84407e.wgsl
deleted file mode 100644
index f6160f1..0000000
--- a/test/intrinsics/gen/inverseSqrt/84407e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn inverseSqrt(f32) -> f32
-fn inverseSqrt_84407e() {
-  var res: f32 = inverseSqrt(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  inverseSqrt_84407e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  inverseSqrt_84407e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  inverseSqrt_84407e();
-}
diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl
deleted file mode 100644
index e94567e..0000000
--- a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn inverseSqrt(vec<2, f32>) -> vec<2, f32>
-fn inverseSqrt_8f2bd2() {
-  var res: vec2<f32> = inverseSqrt(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  inverseSqrt_8f2bd2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  inverseSqrt_8f2bd2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  inverseSqrt_8f2bd2();
-}
diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl
deleted file mode 100644
index c189515..0000000
--- a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn inverseSqrt(vec<3, f32>) -> vec<3, f32>
-fn inverseSqrt_b197b1() {
-  var res: vec3<f32> = inverseSqrt(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  inverseSqrt_b197b1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  inverseSqrt_b197b1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  inverseSqrt_b197b1();
-}
diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl b/test/intrinsics/gen/inverseSqrt/c22347.wgsl
deleted file mode 100644
index 20e13f2..0000000
--- a/test/intrinsics/gen/inverseSqrt/c22347.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn inverseSqrt(vec<4, f32>) -> vec<4, f32>
-fn inverseSqrt_c22347() {
-  var res: vec4<f32> = inverseSqrt(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  inverseSqrt_c22347();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  inverseSqrt_c22347();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  inverseSqrt_c22347();
-}
diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl b/test/intrinsics/gen/isFinite/34d32b.wgsl
deleted file mode 100644
index 20d8b32..0000000
--- a/test/intrinsics/gen/isFinite/34d32b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isFinite(vec<2, f32>) -> vec<2, bool>
-fn isFinite_34d32b() {
-  var res: vec2<bool> = isFinite(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isFinite_34d32b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isFinite_34d32b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isFinite_34d32b();
-}
diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.glsl b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.glsl
deleted file mode 100644
index e8a8c27..0000000
--- a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.glsl
+++ /dev/null
@@ -1,80 +0,0 @@
-SKIP: FAILED
-
-intrinsics/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isFinite(vec2<f32>());
-                        ^^^^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isFinite_34d32b() {
-  bvec2 res = isfinite(vec2(0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isFinite_34d32b();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 2-component vector of bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-void isFinite_34d32b() {
-  bvec2 res = isfinite(vec2(0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isFinite_34d32b();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 2-component vector of bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-void isFinite_34d32b() {
-  bvec2 res = isfinite(vec2(0.0f, 0.0f));
-}
-
-void compute_main() {
-  isFinite_34d32b();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 2-component vector of bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl
deleted file mode 100644
index 26da207..0000000
--- a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isFinite(vec2<f32>());
-                        ^^^^^^^^
-
-void isFinite_34d32b() {
-  bool2 res = isfinite(float2(0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isFinite_34d32b();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isFinite_34d32b();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isFinite_34d32b();
-  return;
-}
diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl
deleted file mode 100644
index 34352c0..0000000
--- a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isFinite(vec2<f32>());
-                        ^^^^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isFinite_34d32b() {
-  bool2 res = isfinite(float2());
-}
-
-float4 vertex_main_inner() {
-  isFinite_34d32b();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isFinite_34d32b();
-  return;
-}
-
-kernel void compute_main() {
-  isFinite_34d32b();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.spvasm b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.spvasm
deleted file mode 100644
index 831fa2d..0000000
--- a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-intrinsics/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isFinite(vec2<f32>());
-                        ^^^^^^^^
-
-; 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 %isFinite_34d32b "isFinite_34d32b"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v2bool = OpTypeVector %bool 2
-    %v2float = OpTypeVector %float 2
-         %17 = OpConstantNull %v2float
-%_ptr_Function_v2bool = OpTypePointer Function %v2bool
-         %23 = OpConstantNull %v2bool
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isFinite_34d32b = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v2bool Function %23
-         %18 = OpIsInf %v2bool %17
-         %19 = OpIsNan %v2bool %17
-         %20 = OpLogicalOr %v2bool %18 %19
-         %13 = OpLogicalNot %v2bool %20
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %isFinite_34d32b
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %isFinite_34d32b
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %isFinite_34d32b
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.wgsl b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.wgsl
deleted file mode 100644
index 8b38ba9..0000000
--- a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isFinite(vec2<f32>());
-                        ^^^^^^^^
-
-fn isFinite_34d32b() {
-  var res : vec2<bool> = isFinite(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isFinite_34d32b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isFinite_34d32b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isFinite_34d32b();
-}
diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl b/test/intrinsics/gen/isFinite/426f9f.wgsl
deleted file mode 100644
index e43f7a6..0000000
--- a/test/intrinsics/gen/isFinite/426f9f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isFinite(f32) -> bool
-fn isFinite_426f9f() {
-  var res: bool = isFinite(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isFinite_426f9f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isFinite_426f9f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isFinite_426f9f();
-}
diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.glsl b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.glsl
deleted file mode 100644
index 0669ad2..0000000
--- a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.glsl
+++ /dev/null
@@ -1,80 +0,0 @@
-SKIP: FAILED
-
-intrinsics/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isFinite(1.0);
-                  ^^^^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isFinite_426f9f() {
-  bool res = isfinite(1.0f);
-}
-
-vec4 vertex_main() {
-  isFinite_426f9f();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-void isFinite_426f9f() {
-  bool res = isfinite(1.0f);
-}
-
-void fragment_main() {
-  isFinite_426f9f();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-void isFinite_426f9f() {
-  bool res = isfinite(1.0f);
-}
-
-void compute_main() {
-  isFinite_426f9f();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl
deleted file mode 100644
index 9e215be..0000000
--- a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isFinite(1.0);
-                  ^^^^^^^^
-
-void isFinite_426f9f() {
-  bool res = isfinite(1.0f);
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isFinite_426f9f();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isFinite_426f9f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isFinite_426f9f();
-  return;
-}
diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl
deleted file mode 100644
index 39432e0..0000000
--- a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isFinite(1.0);
-                  ^^^^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isFinite_426f9f() {
-  bool res = isfinite(1.0f);
-}
-
-float4 vertex_main_inner() {
-  isFinite_426f9f();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isFinite_426f9f();
-  return;
-}
-
-kernel void compute_main() {
-  isFinite_426f9f();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.spvasm b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.spvasm
deleted file mode 100644
index 5b55562..0000000
--- a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.spvasm
+++ /dev/null
@@ -1,73 +0,0 @@
-intrinsics/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isFinite(1.0);
-                  ^^^^^^^^
-
-; 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 %isFinite_426f9f "isFinite_426f9f"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-    %float_1 = OpConstant %float 1
-%_ptr_Function_bool = OpTypePointer Function %bool
-         %21 = OpConstantNull %bool
-         %22 = OpTypeFunction %v4float
-%isFinite_426f9f = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_bool Function %21
-         %16 = OpIsInf %bool %float_1
-         %17 = OpIsNan %bool %float_1
-         %18 = OpLogicalOr %bool %16 %17
-         %13 = OpLogicalNot %bool %18
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %isFinite_426f9f
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %isFinite_426f9f
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %isFinite_426f9f
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.wgsl b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.wgsl
deleted file mode 100644
index 6dd9547..0000000
--- a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isFinite(1.0);
-                  ^^^^^^^^
-
-fn isFinite_426f9f() {
-  var res : bool = isFinite(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isFinite_426f9f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isFinite_426f9f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isFinite_426f9f();
-}
diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl b/test/intrinsics/gen/isFinite/8a23ad.wgsl
deleted file mode 100644
index 24a52c0..0000000
--- a/test/intrinsics/gen/isFinite/8a23ad.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isFinite(vec<3, f32>) -> vec<3, bool>
-fn isFinite_8a23ad() {
-  var res: vec3<bool> = isFinite(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isFinite_8a23ad();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isFinite_8a23ad();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isFinite_8a23ad();
-}
diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.glsl b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.glsl
deleted file mode 100644
index beb55f0..0000000
--- a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.glsl
+++ /dev/null
@@ -1,80 +0,0 @@
-SKIP: FAILED
-
-intrinsics/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isFinite(vec3<f32>());
-                        ^^^^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isFinite_8a23ad() {
-  bvec3 res = isfinite(vec3(0.0f, 0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isFinite_8a23ad();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 3-component vector of bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-void isFinite_8a23ad() {
-  bvec3 res = isfinite(vec3(0.0f, 0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isFinite_8a23ad();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 3-component vector of bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-void isFinite_8a23ad() {
-  bvec3 res = isfinite(vec3(0.0f, 0.0f, 0.0f));
-}
-
-void compute_main() {
-  isFinite_8a23ad();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 3-component vector of bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl
deleted file mode 100644
index 098b3e7..0000000
--- a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isFinite(vec3<f32>());
-                        ^^^^^^^^
-
-void isFinite_8a23ad() {
-  bool3 res = isfinite(float3(0.0f, 0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isFinite_8a23ad();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isFinite_8a23ad();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isFinite_8a23ad();
-  return;
-}
diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl
deleted file mode 100644
index 5b9e079..0000000
--- a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isFinite(vec3<f32>());
-                        ^^^^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isFinite_8a23ad() {
-  bool3 res = isfinite(float3());
-}
-
-float4 vertex_main_inner() {
-  isFinite_8a23ad();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isFinite_8a23ad();
-  return;
-}
-
-kernel void compute_main() {
-  isFinite_8a23ad();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.spvasm b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.spvasm
deleted file mode 100644
index d496b6e..0000000
--- a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-intrinsics/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isFinite(vec3<f32>());
-                        ^^^^^^^^
-
-; 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 %isFinite_8a23ad "isFinite_8a23ad"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v3bool = OpTypeVector %bool 3
-    %v3float = OpTypeVector %float 3
-         %17 = OpConstantNull %v3float
-%_ptr_Function_v3bool = OpTypePointer Function %v3bool
-         %23 = OpConstantNull %v3bool
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isFinite_8a23ad = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v3bool Function %23
-         %18 = OpIsInf %v3bool %17
-         %19 = OpIsNan %v3bool %17
-         %20 = OpLogicalOr %v3bool %18 %19
-         %13 = OpLogicalNot %v3bool %20
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %isFinite_8a23ad
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %isFinite_8a23ad
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %isFinite_8a23ad
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.wgsl b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.wgsl
deleted file mode 100644
index 6aa23a5..0000000
--- a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isFinite(vec3<f32>());
-                        ^^^^^^^^
-
-fn isFinite_8a23ad() {
-  var res : vec3<bool> = isFinite(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isFinite_8a23ad();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isFinite_8a23ad();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isFinite_8a23ad();
-}
diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl b/test/intrinsics/gen/isFinite/f31987.wgsl
deleted file mode 100644
index 0a3f631..0000000
--- a/test/intrinsics/gen/isFinite/f31987.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isFinite(vec<4, f32>) -> vec<4, bool>
-fn isFinite_f31987() {
-  var res: vec4<bool> = isFinite(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isFinite_f31987();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isFinite_f31987();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isFinite_f31987();
-}
diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.glsl b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.glsl
deleted file mode 100644
index aaf60d1..0000000
--- a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.glsl
+++ /dev/null
@@ -1,80 +0,0 @@
-SKIP: FAILED
-
-intrinsics/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isFinite(vec4<f32>());
-                        ^^^^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isFinite_f31987() {
-  bvec4 res = isfinite(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isFinite_f31987();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 4-component vector of bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-void isFinite_f31987() {
-  bvec4 res = isfinite(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isFinite_f31987();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 4-component vector of bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-void isFinite_f31987() {
-  bvec4 res = isfinite(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-void compute_main() {
-  isFinite_f31987();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'isfinite' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp 4-component vector of bool'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl
deleted file mode 100644
index cb51c62..0000000
--- a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isFinite(vec4<f32>());
-                        ^^^^^^^^
-
-void isFinite_f31987() {
-  bool4 res = isfinite(float4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isFinite_f31987();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isFinite_f31987();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isFinite_f31987();
-  return;
-}
diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl
deleted file mode 100644
index 5e6c504..0000000
--- a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isFinite(vec4<f32>());
-                        ^^^^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isFinite_f31987() {
-  bool4 res = isfinite(float4());
-}
-
-float4 vertex_main_inner() {
-  isFinite_f31987();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isFinite_f31987();
-  return;
-}
-
-kernel void compute_main() {
-  isFinite_f31987();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.spvasm b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.spvasm
deleted file mode 100644
index ee68c59..0000000
--- a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.spvasm
+++ /dev/null
@@ -1,74 +0,0 @@
-intrinsics/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isFinite(vec4<f32>());
-                        ^^^^^^^^
-
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %isFinite_f31987 "isFinite_f31987"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4bool = OpTypePointer Function %v4bool
-         %21 = OpConstantNull %v4bool
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isFinite_f31987 = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v4bool Function %21
-         %16 = OpIsInf %v4bool %5
-         %17 = OpIsNan %v4bool %5
-         %18 = OpLogicalOr %v4bool %16 %17
-         %13 = OpLogicalNot %v4bool %18
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %isFinite_f31987
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %isFinite_f31987
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %isFinite_f31987
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.wgsl b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.wgsl
deleted file mode 100644
index a5e86db..0000000
--- a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isFinite(vec4<f32>());
-                        ^^^^^^^^
-
-fn isFinite_f31987() {
-  var res : vec4<bool> = isFinite(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isFinite_f31987();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isFinite_f31987();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isFinite_f31987();
-}
diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl b/test/intrinsics/gen/isInf/666f2a.wgsl
deleted file mode 100644
index 7550d27..0000000
--- a/test/intrinsics/gen/isInf/666f2a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isInf(vec<3, f32>) -> vec<3, bool>
-fn isInf_666f2a() {
-  var res: vec3<bool> = isInf(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isInf_666f2a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isInf_666f2a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isInf_666f2a();
-}
diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.glsl b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.glsl
deleted file mode 100644
index 0daf17d..0000000
--- a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.glsl
+++ /dev/null
@@ -1,54 +0,0 @@
-intrinsics/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isInf(vec3<f32>());
-                        ^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isInf_666f2a() {
-  bvec3 res = isinf(vec3(0.0f, 0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isInf_666f2a();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = 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;
-
-void isInf_666f2a() {
-  bvec3 res = isinf(vec3(0.0f, 0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isInf_666f2a();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-precision mediump float;
-
-void isInf_666f2a() {
-  bvec3 res = isinf(vec3(0.0f, 0.0f, 0.0f));
-}
-
-void compute_main() {
-  isInf_666f2a();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl
deleted file mode 100644
index cb815e1..0000000
--- a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isInf(vec3<f32>());
-                        ^^^^^
-
-void isInf_666f2a() {
-  bool3 res = isinf(float3(0.0f, 0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isInf_666f2a();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isInf_666f2a();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isInf_666f2a();
-  return;
-}
diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl
deleted file mode 100644
index fa37ad7..0000000
--- a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isInf(vec3<f32>());
-                        ^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isInf_666f2a() {
-  bool3 res = isinf(float3());
-}
-
-float4 vertex_main_inner() {
-  isInf_666f2a();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isInf_666f2a();
-  return;
-}
-
-kernel void compute_main() {
-  isInf_666f2a();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.spvasm b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.spvasm
deleted file mode 100644
index 42db2c1..0000000
--- a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.spvasm
+++ /dev/null
@@ -1,73 +0,0 @@
-intrinsics/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isInf(vec3<f32>());
-                        ^^^^^
-
-; 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 %isInf_666f2a "isInf_666f2a"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v3bool = OpTypeVector %bool 3
-    %v3float = OpTypeVector %float 3
-         %17 = OpConstantNull %v3float
-%_ptr_Function_v3bool = OpTypePointer Function %v3bool
-         %20 = OpConstantNull %v3bool
-         %21 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isInf_666f2a = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v3bool Function %20
-         %13 = OpIsInf %v3bool %17
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %21
-         %23 = OpLabel
-         %24 = OpFunctionCall %void %isInf_666f2a
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %26 = OpLabel
-         %27 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %27
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %isInf_666f2a
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %isInf_666f2a
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.wgsl b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.wgsl
deleted file mode 100644
index 4fa25cb..0000000
--- a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isInf(vec3<f32>());
-                        ^^^^^
-
-fn isInf_666f2a() {
-  var res : vec3<bool> = isInf(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isInf_666f2a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isInf_666f2a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isInf_666f2a();
-}
diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl b/test/intrinsics/gen/isInf/7bd98f.wgsl
deleted file mode 100644
index eaea74d..0000000
--- a/test/intrinsics/gen/isInf/7bd98f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isInf(f32) -> bool
-fn isInf_7bd98f() {
-  var res: bool = isInf(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isInf_7bd98f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isInf_7bd98f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isInf_7bd98f();
-}
diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.glsl b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.glsl
deleted file mode 100644
index b4790ba..0000000
--- a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.glsl
+++ /dev/null
@@ -1,54 +0,0 @@
-intrinsics/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isInf(1.0);
-                  ^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isInf_7bd98f() {
-  bool res = isinf(1.0f);
-}
-
-vec4 vertex_main() {
-  isInf_7bd98f();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = 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;
-
-void isInf_7bd98f() {
-  bool res = isinf(1.0f);
-}
-
-void fragment_main() {
-  isInf_7bd98f();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-precision mediump float;
-
-void isInf_7bd98f() {
-  bool res = isinf(1.0f);
-}
-
-void compute_main() {
-  isInf_7bd98f();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl
deleted file mode 100644
index 710b925..0000000
--- a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isInf(1.0);
-                  ^^^^^
-
-void isInf_7bd98f() {
-  bool res = isinf(1.0f);
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isInf_7bd98f();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isInf_7bd98f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isInf_7bd98f();
-  return;
-}
diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl
deleted file mode 100644
index c2a807b..0000000
--- a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isInf(1.0);
-                  ^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isInf_7bd98f() {
-  bool res = isinf(1.0f);
-}
-
-float4 vertex_main_inner() {
-  isInf_7bd98f();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isInf_7bd98f();
-  return;
-}
-
-kernel void compute_main() {
-  isInf_7bd98f();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.spvasm b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.spvasm
deleted file mode 100644
index b04b2b1..0000000
--- a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.spvasm
+++ /dev/null
@@ -1,70 +0,0 @@
-intrinsics/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isInf(1.0);
-                  ^^^^^
-
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 32
-; Schema: 0
-               OpCapability Shader
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %isInf_7bd98f "isInf_7bd98f"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-    %float_1 = OpConstant %float 1
-%_ptr_Function_bool = OpTypePointer Function %bool
-         %18 = OpConstantNull %bool
-         %19 = OpTypeFunction %v4float
-%isInf_7bd98f = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_bool Function %18
-         %13 = OpIsInf %bool %float_1
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %19
-         %21 = OpLabel
-         %22 = OpFunctionCall %void %isInf_7bd98f
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %24 = OpLabel
-         %25 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %25
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %isInf_7bd98f
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %isInf_7bd98f
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.wgsl b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.wgsl
deleted file mode 100644
index 82deb30..0000000
--- a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isInf(1.0);
-                  ^^^^^
-
-fn isInf_7bd98f() {
-  var res : bool = isInf(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isInf_7bd98f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isInf_7bd98f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isInf_7bd98f();
-}
diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl b/test/intrinsics/gen/isInf/7e81b5.wgsl
deleted file mode 100644
index 0a96753..0000000
--- a/test/intrinsics/gen/isInf/7e81b5.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isInf(vec<4, f32>) -> vec<4, bool>
-fn isInf_7e81b5() {
-  var res: vec4<bool> = isInf(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isInf_7e81b5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isInf_7e81b5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isInf_7e81b5();
-}
diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.glsl b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.glsl
deleted file mode 100644
index 0ed29fd..0000000
--- a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.glsl
+++ /dev/null
@@ -1,54 +0,0 @@
-intrinsics/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isInf(vec4<f32>());
-                        ^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isInf_7e81b5() {
-  bvec4 res = isinf(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isInf_7e81b5();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = 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;
-
-void isInf_7e81b5() {
-  bvec4 res = isinf(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isInf_7e81b5();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-precision mediump float;
-
-void isInf_7e81b5() {
-  bvec4 res = isinf(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-void compute_main() {
-  isInf_7e81b5();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl
deleted file mode 100644
index f04d9c0..0000000
--- a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isInf(vec4<f32>());
-                        ^^^^^
-
-void isInf_7e81b5() {
-  bool4 res = isinf(float4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isInf_7e81b5();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isInf_7e81b5();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isInf_7e81b5();
-  return;
-}
diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl
deleted file mode 100644
index de416fb..0000000
--- a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isInf(vec4<f32>());
-                        ^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isInf_7e81b5() {
-  bool4 res = isinf(float4());
-}
-
-float4 vertex_main_inner() {
-  isInf_7e81b5();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isInf_7e81b5();
-  return;
-}
-
-kernel void compute_main() {
-  isInf_7e81b5();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.spvasm b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.spvasm
deleted file mode 100644
index c8a1781..0000000
--- a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.spvasm
+++ /dev/null
@@ -1,71 +0,0 @@
-intrinsics/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isInf(vec4<f32>());
-                        ^^^^^
-
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 33
-; Schema: 0
-               OpCapability Shader
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %isInf_7e81b5 "isInf_7e81b5"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4bool = OpTypePointer Function %v4bool
-         %18 = OpConstantNull %v4bool
-         %19 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isInf_7e81b5 = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v4bool Function %18
-         %13 = OpIsInf %v4bool %5
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %19
-         %21 = OpLabel
-         %22 = OpFunctionCall %void %isInf_7e81b5
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %24 = OpLabel
-         %25 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %25
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %isInf_7e81b5
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %isInf_7e81b5
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.wgsl b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.wgsl
deleted file mode 100644
index 3fced5a..0000000
--- a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isInf(vec4<f32>());
-                        ^^^^^
-
-fn isInf_7e81b5() {
-  var res : vec4<bool> = isInf(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isInf_7e81b5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isInf_7e81b5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isInf_7e81b5();
-}
diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl b/test/intrinsics/gen/isInf/a46d6f.wgsl
deleted file mode 100644
index 5841a41..0000000
--- a/test/intrinsics/gen/isInf/a46d6f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isInf(vec<2, f32>) -> vec<2, bool>
-fn isInf_a46d6f() {
-  var res: vec2<bool> = isInf(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isInf_a46d6f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isInf_a46d6f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isInf_a46d6f();
-}
diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.glsl b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.glsl
deleted file mode 100644
index 78a4a3a..0000000
--- a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.glsl
+++ /dev/null
@@ -1,54 +0,0 @@
-intrinsics/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isInf(vec2<f32>());
-                        ^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isInf_a46d6f() {
-  bvec2 res = isinf(vec2(0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isInf_a46d6f();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = 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;
-
-void isInf_a46d6f() {
-  bvec2 res = isinf(vec2(0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isInf_a46d6f();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-precision mediump float;
-
-void isInf_a46d6f() {
-  bvec2 res = isinf(vec2(0.0f, 0.0f));
-}
-
-void compute_main() {
-  isInf_a46d6f();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl
deleted file mode 100644
index bb06413..0000000
--- a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isInf(vec2<f32>());
-                        ^^^^^
-
-void isInf_a46d6f() {
-  bool2 res = isinf(float2(0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isInf_a46d6f();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isInf_a46d6f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isInf_a46d6f();
-  return;
-}
diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl
deleted file mode 100644
index f4c9032..0000000
--- a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isInf(vec2<f32>());
-                        ^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isInf_a46d6f() {
-  bool2 res = isinf(float2());
-}
-
-float4 vertex_main_inner() {
-  isInf_a46d6f();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isInf_a46d6f();
-  return;
-}
-
-kernel void compute_main() {
-  isInf_a46d6f();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.spvasm b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.spvasm
deleted file mode 100644
index 52b4ee8..0000000
--- a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.spvasm
+++ /dev/null
@@ -1,73 +0,0 @@
-intrinsics/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isInf(vec2<f32>());
-                        ^^^^^
-
-; 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 %isInf_a46d6f "isInf_a46d6f"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v2bool = OpTypeVector %bool 2
-    %v2float = OpTypeVector %float 2
-         %17 = OpConstantNull %v2float
-%_ptr_Function_v2bool = OpTypePointer Function %v2bool
-         %20 = OpConstantNull %v2bool
-         %21 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isInf_a46d6f = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v2bool Function %20
-         %13 = OpIsInf %v2bool %17
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %21
-         %23 = OpLabel
-         %24 = OpFunctionCall %void %isInf_a46d6f
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %26 = OpLabel
-         %27 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %27
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %isInf_a46d6f
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %isInf_a46d6f
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.wgsl b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.wgsl
deleted file mode 100644
index 3fa68d9..0000000
--- a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isInf(vec2<f32>());
-                        ^^^^^
-
-fn isInf_a46d6f() {
-  var res : vec2<bool> = isInf(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isInf_a46d6f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isInf_a46d6f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isInf_a46d6f();
-}
diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl b/test/intrinsics/gen/isNan/1280ab.wgsl
deleted file mode 100644
index fb5e25c..0000000
--- a/test/intrinsics/gen/isNan/1280ab.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isNan(vec<3, f32>) -> vec<3, bool>
-fn isNan_1280ab() {
-  var res: vec3<bool> = isNan(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNan_1280ab();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNan_1280ab();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNan_1280ab();
-}
diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.glsl b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.glsl
deleted file mode 100644
index 3ca91af..0000000
--- a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.glsl
+++ /dev/null
@@ -1,54 +0,0 @@
-intrinsics/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isNan(vec3<f32>());
-                        ^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isNan_1280ab() {
-  bvec3 res = isnan(vec3(0.0f, 0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isNan_1280ab();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = 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;
-
-void isNan_1280ab() {
-  bvec3 res = isnan(vec3(0.0f, 0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isNan_1280ab();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-precision mediump float;
-
-void isNan_1280ab() {
-  bvec3 res = isnan(vec3(0.0f, 0.0f, 0.0f));
-}
-
-void compute_main() {
-  isNan_1280ab();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.hlsl b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.hlsl
deleted file mode 100644
index 55394cc..0000000
--- a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isNan(vec3<f32>());
-                        ^^^^^
-
-void isNan_1280ab() {
-  bool3 res = isnan(float3(0.0f, 0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isNan_1280ab();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isNan_1280ab();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isNan_1280ab();
-  return;
-}
diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl
deleted file mode 100644
index 7a8c6dd..0000000
--- a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isNan(vec3<f32>());
-                        ^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isNan_1280ab() {
-  bool3 res = isnan(float3());
-}
-
-float4 vertex_main_inner() {
-  isNan_1280ab();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isNan_1280ab();
-  return;
-}
-
-kernel void compute_main() {
-  isNan_1280ab();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.spvasm b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.spvasm
deleted file mode 100644
index 91bdbc9..0000000
--- a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.spvasm
+++ /dev/null
@@ -1,73 +0,0 @@
-intrinsics/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isNan(vec3<f32>());
-                        ^^^^^
-
-; 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 %isNan_1280ab "isNan_1280ab"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v3bool = OpTypeVector %bool 3
-    %v3float = OpTypeVector %float 3
-         %17 = OpConstantNull %v3float
-%_ptr_Function_v3bool = OpTypePointer Function %v3bool
-         %20 = OpConstantNull %v3bool
-         %21 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isNan_1280ab = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v3bool Function %20
-         %13 = OpIsNan %v3bool %17
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %21
-         %23 = OpLabel
-         %24 = OpFunctionCall %void %isNan_1280ab
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %26 = OpLabel
-         %27 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %27
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %isNan_1280ab
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %isNan_1280ab
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.wgsl b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.wgsl
deleted file mode 100644
index ec27bcd..0000000
--- a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isNan(vec3<f32>());
-                        ^^^^^
-
-fn isNan_1280ab() {
-  var res : vec3<bool> = isNan(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNan_1280ab();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNan_1280ab();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNan_1280ab();
-}
diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl b/test/intrinsics/gen/isNan/4d280d.wgsl
deleted file mode 100644
index 330440d..0000000
--- a/test/intrinsics/gen/isNan/4d280d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isNan(vec<4, f32>) -> vec<4, bool>
-fn isNan_4d280d() {
-  var res: vec4<bool> = isNan(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNan_4d280d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNan_4d280d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNan_4d280d();
-}
diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.glsl b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.glsl
deleted file mode 100644
index 61f6600..0000000
--- a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.glsl
+++ /dev/null
@@ -1,54 +0,0 @@
-intrinsics/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isNan(vec4<f32>());
-                        ^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isNan_4d280d() {
-  bvec4 res = isnan(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isNan_4d280d();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = 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;
-
-void isNan_4d280d() {
-  bvec4 res = isnan(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isNan_4d280d();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-precision mediump float;
-
-void isNan_4d280d() {
-  bvec4 res = isnan(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-void compute_main() {
-  isNan_4d280d();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.hlsl b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.hlsl
deleted file mode 100644
index 18a17d5..0000000
--- a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isNan(vec4<f32>());
-                        ^^^^^
-
-void isNan_4d280d() {
-  bool4 res = isnan(float4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isNan_4d280d();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isNan_4d280d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isNan_4d280d();
-  return;
-}
diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl
deleted file mode 100644
index e8c2d9c..0000000
--- a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isNan(vec4<f32>());
-                        ^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isNan_4d280d() {
-  bool4 res = isnan(float4());
-}
-
-float4 vertex_main_inner() {
-  isNan_4d280d();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isNan_4d280d();
-  return;
-}
-
-kernel void compute_main() {
-  isNan_4d280d();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.spvasm b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.spvasm
deleted file mode 100644
index ee5a96e..0000000
--- a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.spvasm
+++ /dev/null
@@ -1,71 +0,0 @@
-intrinsics/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isNan(vec4<f32>());
-                        ^^^^^
-
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 33
-; Schema: 0
-               OpCapability Shader
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %isNan_4d280d "isNan_4d280d"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4bool = OpTypePointer Function %v4bool
-         %18 = OpConstantNull %v4bool
-         %19 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isNan_4d280d = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v4bool Function %18
-         %13 = OpIsNan %v4bool %5
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %19
-         %21 = OpLabel
-         %22 = OpFunctionCall %void %isNan_4d280d
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %24 = OpLabel
-         %25 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %25
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %isNan_4d280d
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %isNan_4d280d
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.wgsl b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.wgsl
deleted file mode 100644
index 57ba354..0000000
--- a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isNan(vec4<f32>());
-                        ^^^^^
-
-fn isNan_4d280d() {
-  var res : vec4<bool> = isNan(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNan_4d280d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNan_4d280d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNan_4d280d();
-}
diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl b/test/intrinsics/gen/isNan/67ecd3.wgsl
deleted file mode 100644
index 9b082ec..0000000
--- a/test/intrinsics/gen/isNan/67ecd3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isNan(vec<2, f32>) -> vec<2, bool>
-fn isNan_67ecd3() {
-  var res: vec2<bool> = isNan(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNan_67ecd3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNan_67ecd3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNan_67ecd3();
-}
diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.glsl b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.glsl
deleted file mode 100644
index d0a67e5..0000000
--- a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.glsl
+++ /dev/null
@@ -1,54 +0,0 @@
-intrinsics/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isNan(vec2<f32>());
-                        ^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isNan_67ecd3() {
-  bvec2 res = isnan(vec2(0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isNan_67ecd3();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = 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;
-
-void isNan_67ecd3() {
-  bvec2 res = isnan(vec2(0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isNan_67ecd3();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-precision mediump float;
-
-void isNan_67ecd3() {
-  bvec2 res = isnan(vec2(0.0f, 0.0f));
-}
-
-void compute_main() {
-  isNan_67ecd3();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.hlsl b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.hlsl
deleted file mode 100644
index c83f79d..0000000
--- a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isNan(vec2<f32>());
-                        ^^^^^
-
-void isNan_67ecd3() {
-  bool2 res = isnan(float2(0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isNan_67ecd3();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isNan_67ecd3();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isNan_67ecd3();
-  return;
-}
diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl
deleted file mode 100644
index 901c4ca..0000000
--- a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isNan(vec2<f32>());
-                        ^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isNan_67ecd3() {
-  bool2 res = isnan(float2());
-}
-
-float4 vertex_main_inner() {
-  isNan_67ecd3();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isNan_67ecd3();
-  return;
-}
-
-kernel void compute_main() {
-  isNan_67ecd3();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.spvasm b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.spvasm
deleted file mode 100644
index 575cb56..0000000
--- a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.spvasm
+++ /dev/null
@@ -1,73 +0,0 @@
-intrinsics/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isNan(vec2<f32>());
-                        ^^^^^
-
-; 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 %isNan_67ecd3 "isNan_67ecd3"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v2bool = OpTypeVector %bool 2
-    %v2float = OpTypeVector %float 2
-         %17 = OpConstantNull %v2float
-%_ptr_Function_v2bool = OpTypePointer Function %v2bool
-         %20 = OpConstantNull %v2bool
-         %21 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isNan_67ecd3 = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v2bool Function %20
-         %13 = OpIsNan %v2bool %17
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %21
-         %23 = OpLabel
-         %24 = OpFunctionCall %void %isNan_67ecd3
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %26 = OpLabel
-         %27 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %27
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %isNan_67ecd3
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %isNan_67ecd3
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.wgsl b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.wgsl
deleted file mode 100644
index 2f9573d..0000000
--- a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isNan(vec2<f32>());
-                        ^^^^^
-
-fn isNan_67ecd3() {
-  var res : vec2<bool> = isNan(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNan_67ecd3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNan_67ecd3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNan_67ecd3();
-}
diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl b/test/intrinsics/gen/isNan/e4978e.wgsl
deleted file mode 100644
index f28a7d1..0000000
--- a/test/intrinsics/gen/isNan/e4978e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isNan(f32) -> bool
-fn isNan_e4978e() {
-  var res: bool = isNan(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNan_e4978e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNan_e4978e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNan_e4978e();
-}
diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.glsl b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.glsl
deleted file mode 100644
index 9f74dfe..0000000
--- a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.glsl
+++ /dev/null
@@ -1,54 +0,0 @@
-intrinsics/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isNan(1.0);
-                  ^^^^^
-
-#version 310 es
-precision mediump float;
-
-void isNan_e4978e() {
-  bool res = isnan(1.0f);
-}
-
-vec4 vertex_main() {
-  isNan_e4978e();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = 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;
-
-void isNan_e4978e() {
-  bool res = isnan(1.0f);
-}
-
-void fragment_main() {
-  isNan_e4978e();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-precision mediump float;
-
-void isNan_e4978e() {
-  bool res = isnan(1.0f);
-}
-
-void compute_main() {
-  isNan_e4978e();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl
deleted file mode 100644
index 99d53a5..0000000
--- a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-intrinsics/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isNan(1.0);
-                  ^^^^^
-
-void isNan_e4978e() {
-  bool res = isnan(1.0f);
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isNan_e4978e();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isNan_e4978e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isNan_e4978e();
-  return;
-}
diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl
deleted file mode 100644
index 89f7640..0000000
--- a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isNan(1.0);
-                  ^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isNan_e4978e() {
-  bool res = isnan(1.0f);
-}
-
-float4 vertex_main_inner() {
-  isNan_e4978e();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isNan_e4978e();
-  return;
-}
-
-kernel void compute_main() {
-  isNan_e4978e();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.spvasm b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.spvasm
deleted file mode 100644
index 08f50a7..0000000
--- a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.spvasm
+++ /dev/null
@@ -1,70 +0,0 @@
-intrinsics/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isNan(1.0);
-                  ^^^^^
-
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 32
-; Schema: 0
-               OpCapability Shader
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %isNan_e4978e "isNan_e4978e"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-    %float_1 = OpConstant %float 1
-%_ptr_Function_bool = OpTypePointer Function %bool
-         %18 = OpConstantNull %bool
-         %19 = OpTypeFunction %v4float
-%isNan_e4978e = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_bool Function %18
-         %13 = OpIsNan %bool %float_1
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %19
-         %21 = OpLabel
-         %22 = OpFunctionCall %void %isNan_e4978e
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %24 = OpLabel
-         %25 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %25
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %isNan_e4978e
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %isNan_e4978e
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.wgsl b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.wgsl
deleted file mode 100644
index 0e27431..0000000
--- a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isNan(1.0);
-                  ^^^^^
-
-fn isNan_e4978e() {
-  var res : bool = isNan(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNan_e4978e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNan_e4978e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNan_e4978e();
-}
diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl b/test/intrinsics/gen/isNormal/863dcd.wgsl
deleted file mode 100644
index a814ddb..0000000
--- a/test/intrinsics/gen/isNormal/863dcd.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isNormal(vec<4, f32>) -> vec<4, bool>
-fn isNormal_863dcd() {
-  var res: vec4<bool> = isNormal(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNormal_863dcd();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNormal_863dcd();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNormal_863dcd();
-}
diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.glsl b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.glsl
deleted file mode 100644
index 45a8806..0000000
--- a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.glsl
+++ /dev/null
@@ -1,98 +0,0 @@
-SKIP: FAILED
-
-intrinsics/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isNormal(vec4<f32>());
-                        ^^^^^^^^
-
-#version 310 es
-precision mediump float;
-
-bvec4 tint_isNormal(vec4 param_0) {
-  uint4 exponent = asuint(param_0) & 0x7f80000;
-  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_863dcd() {
-  bvec4 res = tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isNormal_863dcd();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'uint4' : undeclared identifier 
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-bvec4 tint_isNormal(vec4 param_0) {
-  uint4 exponent = asuint(param_0) & 0x7f80000;
-  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_863dcd() {
-  bvec4 res = tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isNormal_863dcd();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'uint4' : undeclared identifier 
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-bvec4 tint_isNormal(vec4 param_0) {
-  uint4 exponent = asuint(param_0) & 0x7f80000;
-  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_863dcd() {
-  bvec4 res = tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-void compute_main() {
-  isNormal_863dcd();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'uint4' : undeclared identifier 
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl
deleted file mode 100644
index 978aed2..0000000
--- a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl
+++ /dev/null
@@ -1,40 +0,0 @@
-intrinsics/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isNormal(vec4<f32>());
-                        ^^^^^^^^
-
-bool4 tint_isNormal(float4 param_0) {
-  uint4 exponent = asuint(param_0) & 0x7f80000;
-  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-void isNormal_863dcd() {
-  bool4 res = tint_isNormal(float4(0.0f, 0.0f, 0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isNormal_863dcd();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isNormal_863dcd();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isNormal_863dcd();
-  return;
-}
diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl
deleted file mode 100644
index aa87291..0000000
--- a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isNormal(vec4<f32>());
-                        ^^^^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isNormal_863dcd() {
-  bool4 res = isnormal(float4());
-}
-
-float4 vertex_main_inner() {
-  isNormal_863dcd();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isNormal_863dcd();
-  return;
-}
-
-kernel void compute_main() {
-  isNormal_863dcd();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.spvasm b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.spvasm
deleted file mode 100644
index b901c91..0000000
--- a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-intrinsics/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isNormal(vec4<f32>());
-                        ^^^^^^^^
-
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-         %16 = 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 %isNormal_863dcd "isNormal_863dcd"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v4bool = OpTypeVector %bool 4
-       %uint = OpTypeInt 32 0
-%uint_133693440 = OpConstant %uint 133693440
-%uint_524288 = OpConstant %uint 524288
-%uint_133169152 = OpConstant %uint 133169152
-     %v4uint = OpTypeVector %uint 4
-%_ptr_Function_v4bool = OpTypePointer Function %v4bool
-         %30 = OpConstantNull %v4bool
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isNormal_863dcd = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v4bool Function %30
-         %22 = OpCompositeConstruct %v4uint %uint_133693440 %uint_133693440 %uint_133693440 %uint_133693440
-         %23 = OpCompositeConstruct %v4uint %uint_524288 %uint_524288 %uint_524288 %uint_524288
-         %24 = OpCompositeConstruct %v4uint %uint_133169152 %uint_133169152 %uint_133169152 %uint_133169152
-         %25 = OpBitcast %v4uint %5
-         %26 = OpBitwiseAnd %v4uint %25 %22
-         %27 = OpExtInst %v4uint %16 UClamp %26 %23 %24
-         %13 = OpIEqual %v4bool %26 %27
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %isNormal_863dcd
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %isNormal_863dcd
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %isNormal_863dcd
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.wgsl b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.wgsl
deleted file mode 100644
index 79f0261..0000000
--- a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec4<bool> = isNormal(vec4<f32>());
-                        ^^^^^^^^
-
-fn isNormal_863dcd() {
-  var res : vec4<bool> = isNormal(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNormal_863dcd();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNormal_863dcd();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNormal_863dcd();
-}
diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl b/test/intrinsics/gen/isNormal/b00ab1.wgsl
deleted file mode 100644
index 7113dcc..0000000
--- a/test/intrinsics/gen/isNormal/b00ab1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isNormal(vec<2, f32>) -> vec<2, bool>
-fn isNormal_b00ab1() {
-  var res: vec2<bool> = isNormal(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNormal_b00ab1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNormal_b00ab1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNormal_b00ab1();
-}
diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.glsl b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.glsl
deleted file mode 100644
index 038cf35..0000000
--- a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.glsl
+++ /dev/null
@@ -1,98 +0,0 @@
-SKIP: FAILED
-
-intrinsics/gen/isNormal/b00ab1.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isNormal(vec2<f32>());
-                        ^^^^^^^^
-
-#version 310 es
-precision mediump float;
-
-bvec2 tint_isNormal(vec2 param_0) {
-  uint2 exponent = asuint(param_0) & 0x7f80000;
-  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_b00ab1() {
-  bvec2 res = tint_isNormal(vec2(0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isNormal_b00ab1();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'uint2' : undeclared identifier 
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-bvec2 tint_isNormal(vec2 param_0) {
-  uint2 exponent = asuint(param_0) & 0x7f80000;
-  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_b00ab1() {
-  bvec2 res = tint_isNormal(vec2(0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isNormal_b00ab1();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'uint2' : undeclared identifier 
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-bvec2 tint_isNormal(vec2 param_0) {
-  uint2 exponent = asuint(param_0) & 0x7f80000;
-  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_b00ab1() {
-  bvec2 res = tint_isNormal(vec2(0.0f, 0.0f));
-}
-
-void compute_main() {
-  isNormal_b00ab1();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'uint2' : undeclared identifier 
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl
deleted file mode 100644
index 226bf93..0000000
--- a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl
+++ /dev/null
@@ -1,40 +0,0 @@
-intrinsics/gen/isNormal/b00ab1.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isNormal(vec2<f32>());
-                        ^^^^^^^^
-
-bool2 tint_isNormal(float2 param_0) {
-  uint2 exponent = asuint(param_0) & 0x7f80000;
-  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-void isNormal_b00ab1() {
-  bool2 res = tint_isNormal(float2(0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isNormal_b00ab1();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isNormal_b00ab1();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isNormal_b00ab1();
-  return;
-}
diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl
deleted file mode 100644
index d51f774..0000000
--- a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isNormal/b00ab1.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isNormal(vec2<f32>());
-                        ^^^^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isNormal_b00ab1() {
-  bool2 res = isnormal(float2());
-}
-
-float4 vertex_main_inner() {
-  isNormal_b00ab1();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isNormal_b00ab1();
-  return;
-}
-
-kernel void compute_main() {
-  isNormal_b00ab1();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.spvasm b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.spvasm
deleted file mode 100644
index 92ba069..0000000
--- a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.spvasm
+++ /dev/null
@@ -1,85 +0,0 @@
-intrinsics/gen/isNormal/b00ab1.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isNormal(vec2<f32>());
-                        ^^^^^^^^
-
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 47
-; Schema: 0
-               OpCapability Shader
-         %18 = 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 %isNormal_b00ab1 "isNormal_b00ab1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v2bool = OpTypeVector %bool 2
-    %v2float = OpTypeVector %float 2
-         %17 = OpConstantNull %v2float
-       %uint = OpTypeInt 32 0
-%uint_133693440 = OpConstant %uint 133693440
-%uint_524288 = OpConstant %uint 524288
-%uint_133169152 = OpConstant %uint 133169152
-     %v2uint = OpTypeVector %uint 2
-%_ptr_Function_v2bool = OpTypePointer Function %v2bool
-         %32 = OpConstantNull %v2bool
-         %33 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isNormal_b00ab1 = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v2bool Function %32
-         %24 = OpCompositeConstruct %v2uint %uint_133693440 %uint_133693440
-         %25 = OpCompositeConstruct %v2uint %uint_524288 %uint_524288
-         %26 = OpCompositeConstruct %v2uint %uint_133169152 %uint_133169152
-         %27 = OpBitcast %v2uint %17
-         %28 = OpBitwiseAnd %v2uint %27 %24
-         %29 = OpExtInst %v2uint %18 UClamp %28 %25 %26
-         %13 = OpIEqual %v2bool %28 %29
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %isNormal_b00ab1
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %38 = OpLabel
-         %39 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %39
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %42 = OpLabel
-         %43 = OpFunctionCall %void %isNormal_b00ab1
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %45 = OpLabel
-         %46 = OpFunctionCall %void %isNormal_b00ab1
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.wgsl b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.wgsl
deleted file mode 100644
index c6b748c..0000000
--- a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isNormal/b00ab1.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec2<bool> = isNormal(vec2<f32>());
-                        ^^^^^^^^
-
-fn isNormal_b00ab1() {
-  var res : vec2<bool> = isNormal(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNormal_b00ab1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNormal_b00ab1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNormal_b00ab1();
-}
diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl b/test/intrinsics/gen/isNormal/c286b7.wgsl
deleted file mode 100644
index b44cb1f..0000000
--- a/test/intrinsics/gen/isNormal/c286b7.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isNormal(vec<3, f32>) -> vec<3, bool>
-fn isNormal_c286b7() {
-  var res: vec3<bool> = isNormal(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNormal_c286b7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNormal_c286b7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNormal_c286b7();
-}
diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.glsl b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.glsl
deleted file mode 100644
index 4215a0e..0000000
--- a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.glsl
+++ /dev/null
@@ -1,98 +0,0 @@
-SKIP: FAILED
-
-intrinsics/gen/isNormal/c286b7.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isNormal(vec3<f32>());
-                        ^^^^^^^^
-
-#version 310 es
-precision mediump float;
-
-bvec3 tint_isNormal(vec3 param_0) {
-  uint3 exponent = asuint(param_0) & 0x7f80000;
-  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_c286b7() {
-  bvec3 res = tint_isNormal(vec3(0.0f, 0.0f, 0.0f));
-}
-
-vec4 vertex_main() {
-  isNormal_c286b7();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'uint3' : undeclared identifier 
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-bvec3 tint_isNormal(vec3 param_0) {
-  uint3 exponent = asuint(param_0) & 0x7f80000;
-  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_c286b7() {
-  bvec3 res = tint_isNormal(vec3(0.0f, 0.0f, 0.0f));
-}
-
-void fragment_main() {
-  isNormal_c286b7();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'uint3' : undeclared identifier 
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-bvec3 tint_isNormal(vec3 param_0) {
-  uint3 exponent = asuint(param_0) & 0x7f80000;
-  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_c286b7() {
-  bvec3 res = tint_isNormal(vec3(0.0f, 0.0f, 0.0f));
-}
-
-void compute_main() {
-  isNormal_c286b7();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'uint3' : undeclared identifier 
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl
deleted file mode 100644
index eeb5d55..0000000
--- a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl
+++ /dev/null
@@ -1,40 +0,0 @@
-intrinsics/gen/isNormal/c286b7.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isNormal(vec3<f32>());
-                        ^^^^^^^^
-
-bool3 tint_isNormal(float3 param_0) {
-  uint3 exponent = asuint(param_0) & 0x7f80000;
-  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-void isNormal_c286b7() {
-  bool3 res = tint_isNormal(float3(0.0f, 0.0f, 0.0f));
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isNormal_c286b7();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isNormal_c286b7();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isNormal_c286b7();
-  return;
-}
diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl
deleted file mode 100644
index 3717571..0000000
--- a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isNormal/c286b7.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isNormal(vec3<f32>());
-                        ^^^^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isNormal_c286b7() {
-  bool3 res = isnormal(float3());
-}
-
-float4 vertex_main_inner() {
-  isNormal_c286b7();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isNormal_c286b7();
-  return;
-}
-
-kernel void compute_main() {
-  isNormal_c286b7();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.spvasm b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.spvasm
deleted file mode 100644
index b1a0806..0000000
--- a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.spvasm
+++ /dev/null
@@ -1,85 +0,0 @@
-intrinsics/gen/isNormal/c286b7.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isNormal(vec3<f32>());
-                        ^^^^^^^^
-
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 47
-; Schema: 0
-               OpCapability Shader
-         %18 = 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 %isNormal_c286b7 "isNormal_c286b7"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v3bool = OpTypeVector %bool 3
-    %v3float = OpTypeVector %float 3
-         %17 = OpConstantNull %v3float
-       %uint = OpTypeInt 32 0
-%uint_133693440 = OpConstant %uint 133693440
-%uint_524288 = OpConstant %uint 524288
-%uint_133169152 = OpConstant %uint 133169152
-     %v3uint = OpTypeVector %uint 3
-%_ptr_Function_v3bool = OpTypePointer Function %v3bool
-         %32 = OpConstantNull %v3bool
-         %33 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%isNormal_c286b7 = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_v3bool Function %32
-         %24 = OpCompositeConstruct %v3uint %uint_133693440 %uint_133693440 %uint_133693440
-         %25 = OpCompositeConstruct %v3uint %uint_524288 %uint_524288 %uint_524288
-         %26 = OpCompositeConstruct %v3uint %uint_133169152 %uint_133169152 %uint_133169152
-         %27 = OpBitcast %v3uint %17
-         %28 = OpBitwiseAnd %v3uint %27 %24
-         %29 = OpExtInst %v3uint %18 UClamp %28 %25 %26
-         %13 = OpIEqual %v3bool %28 %29
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %isNormal_c286b7
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %38 = OpLabel
-         %39 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %39
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %42 = OpLabel
-         %43 = OpFunctionCall %void %isNormal_c286b7
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %45 = OpLabel
-         %46 = OpFunctionCall %void %isNormal_c286b7
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.wgsl b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.wgsl
deleted file mode 100644
index ca46949..0000000
--- a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isNormal/c286b7.wgsl:28:25 warning: use of deprecated intrinsic
-  var res: vec3<bool> = isNormal(vec3<f32>());
-                        ^^^^^^^^
-
-fn isNormal_c286b7() {
-  var res : vec3<bool> = isNormal(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNormal_c286b7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNormal_c286b7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNormal_c286b7();
-}
diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl b/test/intrinsics/gen/isNormal/c6e880.wgsl
deleted file mode 100644
index a5d8390..0000000
--- a/test/intrinsics/gen/isNormal/c6e880.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn isNormal(f32) -> bool
-fn isNormal_c6e880() {
-  var res: bool = isNormal(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNormal_c6e880();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNormal_c6e880();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNormal_c6e880();
-}
diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.glsl b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.glsl
deleted file mode 100644
index 0361851..0000000
--- a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.glsl
+++ /dev/null
@@ -1,101 +0,0 @@
-SKIP: FAILED
-
-intrinsics/gen/isNormal/c6e880.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isNormal(1.0);
-                  ^^^^^^^^
-
-#version 310 es
-precision mediump float;
-
-bool tint_isNormal(float param_0) {
-  uint exponent = asuint(param_0) & 0x7f80000;
-  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_c6e880() {
-  bool res = tint_isNormal(1.0f);
-}
-
-vec4 vertex_main() {
-  isNormal_c6e880();
-  return vec4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-void main() {
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'asuint' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp highp uint'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-bool tint_isNormal(float param_0) {
-  uint exponent = asuint(param_0) & 0x7f80000;
-  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_c6e880() {
-  bool res = tint_isNormal(1.0f);
-}
-
-void fragment_main() {
-  isNormal_c6e880();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'asuint' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp mediump uint'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-bool tint_isNormal(float param_0) {
-  uint exponent = asuint(param_0) & 0x7f80000;
-  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void isNormal_c6e880() {
-  bool res = tint_isNormal(1.0f);
-}
-
-void compute_main() {
-  isNormal_c6e880();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'asuint' : no matching overloaded function found 
-ERROR: 0:5: '=' :  cannot convert from ' const float' to ' temp highp uint'
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 3 compilation errors.  No code generated.
-
-
-
diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl
deleted file mode 100644
index 5ef69b6..0000000
--- a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl
+++ /dev/null
@@ -1,40 +0,0 @@
-intrinsics/gen/isNormal/c6e880.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isNormal(1.0);
-                  ^^^^^^^^
-
-bool tint_isNormal(float param_0) {
-  uint exponent = asuint(param_0) & 0x7f80000;
-  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-void isNormal_c6e880() {
-  bool res = tint_isNormal(1.0f);
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  isNormal_c6e880();
-  return float4(0.0f, 0.0f, 0.0f, 0.0f);
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  isNormal_c6e880();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  isNormal_c6e880();
-  return;
-}
diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl
deleted file mode 100644
index 148fa0a..0000000
--- a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl
+++ /dev/null
@@ -1,37 +0,0 @@
-intrinsics/gen/isNormal/c6e880.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isNormal(1.0);
-                  ^^^^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-void isNormal_c6e880() {
-  bool res = isnormal(1.0f);
-}
-
-float4 vertex_main_inner() {
-  isNormal_c6e880();
-  return float4();
-}
-
-vertex tint_symbol vertex_main() {
-  float4 const inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main() {
-  isNormal_c6e880();
-  return;
-}
-
-kernel void compute_main() {
-  isNormal_c6e880();
-  return;
-}
-
diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.spvasm b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.spvasm
deleted file mode 100644
index 98da25d..0000000
--- a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-intrinsics/gen/isNormal/c6e880.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isNormal(1.0);
-                  ^^^^^^^^
-
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-         %16 = 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 %isNormal_c6e880 "isNormal_c6e880"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %void = OpTypeVoid
-          %9 = OpTypeFunction %void
-       %bool = OpTypeBool
-    %float_1 = OpConstant %float 1
-       %uint = OpTypeInt 32 0
-%uint_133693440 = OpConstant %uint 133693440
-%uint_524288 = OpConstant %uint 524288
-%uint_133169152 = OpConstant %uint 133169152
-%_ptr_Function_bool = OpTypePointer Function %bool
-         %26 = OpConstantNull %bool
-         %27 = OpTypeFunction %v4float
-%isNormal_c6e880 = OpFunction %void None %9
-         %12 = OpLabel
-        %res = OpVariable %_ptr_Function_bool Function %26
-         %21 = OpBitcast %uint %float_1
-         %22 = OpBitwiseAnd %uint %21 %uint_133693440
-         %23 = OpExtInst %uint %16 UClamp %22 %uint_524288 %uint_133169152
-         %13 = OpIEqual %bool %22 %23
-               OpStore %res %13
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
-         %29 = OpLabel
-         %30 = OpFunctionCall %void %isNormal_c6e880
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %32 = OpLabel
-         %33 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %33
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %isNormal_c6e880
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %isNormal_c6e880
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.wgsl b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.wgsl
deleted file mode 100644
index 1dc6685..0000000
--- a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.wgsl
+++ /dev/null
@@ -1,23 +0,0 @@
-intrinsics/gen/isNormal/c6e880.wgsl:28:19 warning: use of deprecated intrinsic
-  var res: bool = isNormal(1.0);
-                  ^^^^^^^^
-
-fn isNormal_c6e880() {
-  var res : bool = isNormal(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  isNormal_c6e880();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  isNormal_c6e880();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  isNormal_c6e880();
-}
diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl b/test/intrinsics/gen/ldexp/a31cdc.wgsl
deleted file mode 100644
index 2994d5f..0000000
--- a/test/intrinsics/gen/ldexp/a31cdc.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn ldexp(vec<3, f32>, vec<3, i32>) -> vec<3, f32>
-fn ldexp_a31cdc() {
-  var res: vec3<f32> = ldexp(vec3<f32>(), vec3<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  ldexp_a31cdc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  ldexp_a31cdc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  ldexp_a31cdc();
-}
diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl b/test/intrinsics/gen/ldexp/abd718.wgsl
deleted file mode 100644
index 5fec178..0000000
--- a/test/intrinsics/gen/ldexp/abd718.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn ldexp(vec<2, f32>, vec<2, i32>) -> vec<2, f32>
-fn ldexp_abd718() {
-  var res: vec2<f32> = ldexp(vec2<f32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  ldexp_abd718();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  ldexp_abd718();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  ldexp_abd718();
-}
diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl b/test/intrinsics/gen/ldexp/cc9cde.wgsl
deleted file mode 100644
index 9f4702e..0000000
--- a/test/intrinsics/gen/ldexp/cc9cde.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn ldexp(vec<4, f32>, vec<4, i32>) -> vec<4, f32>
-fn ldexp_cc9cde() {
-  var res: vec4<f32> = ldexp(vec4<f32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  ldexp_cc9cde();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  ldexp_cc9cde();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  ldexp_cc9cde();
-}
diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl b/test/intrinsics/gen/ldexp/db8b49.wgsl
deleted file mode 100644
index f0f29a1..0000000
--- a/test/intrinsics/gen/ldexp/db8b49.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn ldexp(f32, i32) -> f32
-fn ldexp_db8b49() {
-  var res: f32 = ldexp(1.0, 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  ldexp_db8b49();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  ldexp_db8b49();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  ldexp_db8b49();
-}
diff --git a/test/intrinsics/gen/length/056071.wgsl b/test/intrinsics/gen/length/056071.wgsl
deleted file mode 100644
index 46dfdfe..0000000
--- a/test/intrinsics/gen/length/056071.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn length(vec<3, f32>) -> f32
-fn length_056071() {
-  var res: f32 = length(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  length_056071();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  length_056071();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  length_056071();
-}
diff --git a/test/intrinsics/gen/length/602a17.wgsl b/test/intrinsics/gen/length/602a17.wgsl
deleted file mode 100644
index 4458a54..0000000
--- a/test/intrinsics/gen/length/602a17.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn length(f32) -> f32
-fn length_602a17() {
-  var res: f32 = length(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  length_602a17();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  length_602a17();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  length_602a17();
-}
diff --git a/test/intrinsics/gen/length/afde8b.wgsl b/test/intrinsics/gen/length/afde8b.wgsl
deleted file mode 100644
index 0e7faf2..0000000
--- a/test/intrinsics/gen/length/afde8b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn length(vec<2, f32>) -> f32
-fn length_afde8b() {
-  var res: f32 = length(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  length_afde8b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  length_afde8b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  length_afde8b();
-}
diff --git a/test/intrinsics/gen/length/becebf.wgsl b/test/intrinsics/gen/length/becebf.wgsl
deleted file mode 100644
index 5029412..0000000
--- a/test/intrinsics/gen/length/becebf.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn length(vec<4, f32>) -> f32
-fn length_becebf() {
-  var res: f32 = length(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  length_becebf();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  length_becebf();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  length_becebf();
-}
diff --git a/test/intrinsics/gen/log/3da25a.wgsl b/test/intrinsics/gen/log/3da25a.wgsl
deleted file mode 100644
index 12e9fe3..0000000
--- a/test/intrinsics/gen/log/3da25a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn log(vec<4, f32>) -> vec<4, f32>
-fn log_3da25a() {
-  var res: vec4<f32> = log(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  log_3da25a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  log_3da25a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  log_3da25a();
-}
diff --git a/test/intrinsics/gen/log/7114a6.wgsl b/test/intrinsics/gen/log/7114a6.wgsl
deleted file mode 100644
index 0332f5b..0000000
--- a/test/intrinsics/gen/log/7114a6.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn log(f32) -> f32
-fn log_7114a6() {
-  var res: f32 = log(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  log_7114a6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  log_7114a6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  log_7114a6();
-}
diff --git a/test/intrinsics/gen/log/b2ce28.wgsl b/test/intrinsics/gen/log/b2ce28.wgsl
deleted file mode 100644
index be0a07b..0000000
--- a/test/intrinsics/gen/log/b2ce28.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn log(vec<2, f32>) -> vec<2, f32>
-fn log_b2ce28() {
-  var res: vec2<f32> = log(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  log_b2ce28();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  log_b2ce28();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  log_b2ce28();
-}
diff --git a/test/intrinsics/gen/log/f4c570.wgsl b/test/intrinsics/gen/log/f4c570.wgsl
deleted file mode 100644
index e705146..0000000
--- a/test/intrinsics/gen/log/f4c570.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn log(vec<3, f32>) -> vec<3, f32>
-fn log_f4c570() {
-  var res: vec3<f32> = log(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  log_f4c570();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  log_f4c570();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  log_f4c570();
-}
diff --git a/test/intrinsics/gen/log2/4036ed.wgsl b/test/intrinsics/gen/log2/4036ed.wgsl
deleted file mode 100644
index 0932fb4..0000000
--- a/test/intrinsics/gen/log2/4036ed.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn log2(f32) -> f32
-fn log2_4036ed() {
-  var res: f32 = log2(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  log2_4036ed();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  log2_4036ed();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  log2_4036ed();
-}
diff --git a/test/intrinsics/gen/log2/902988.wgsl b/test/intrinsics/gen/log2/902988.wgsl
deleted file mode 100644
index 83325a2..0000000
--- a/test/intrinsics/gen/log2/902988.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn log2(vec<4, f32>) -> vec<4, f32>
-fn log2_902988() {
-  var res: vec4<f32> = log2(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  log2_902988();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  log2_902988();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  log2_902988();
-}
diff --git a/test/intrinsics/gen/log2/adb233.wgsl b/test/intrinsics/gen/log2/adb233.wgsl
deleted file mode 100644
index f231a4a..0000000
--- a/test/intrinsics/gen/log2/adb233.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn log2(vec<3, f32>) -> vec<3, f32>
-fn log2_adb233() {
-  var res: vec3<f32> = log2(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  log2_adb233();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  log2_adb233();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  log2_adb233();
-}
diff --git a/test/intrinsics/gen/log2/aea659.wgsl b/test/intrinsics/gen/log2/aea659.wgsl
deleted file mode 100644
index d874511..0000000
--- a/test/intrinsics/gen/log2/aea659.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn log2(vec<2, f32>) -> vec<2, f32>
-fn log2_aea659() {
-  var res: vec2<f32> = log2(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  log2_aea659();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  log2_aea659();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  log2_aea659();
-}
diff --git a/test/intrinsics/gen/max/0c0aae.wgsl b/test/intrinsics/gen/max/0c0aae.wgsl
deleted file mode 100644
index 1dcd5e8..0000000
--- a/test/intrinsics/gen/max/0c0aae.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(u32, u32) -> u32
-fn max_0c0aae() {
-  var res: u32 = max(1u, 1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_0c0aae();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_0c0aae();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_0c0aae();
-}
diff --git a/test/intrinsics/gen/max/25eafe.wgsl b/test/intrinsics/gen/max/25eafe.wgsl
deleted file mode 100644
index 238cba1..0000000
--- a/test/intrinsics/gen/max/25eafe.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(vec<3, i32>, vec<3, i32>) -> vec<3, i32>
-fn max_25eafe() {
-  var res: vec3<i32> = max(vec3<i32>(), vec3<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_25eafe();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_25eafe();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_25eafe();
-}
diff --git a/test/intrinsics/gen/max/320815.wgsl b/test/intrinsics/gen/max/320815.wgsl
deleted file mode 100644
index e4b11d1..0000000
--- a/test/intrinsics/gen/max/320815.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(vec<2, u32>, vec<2, u32>) -> vec<2, u32>
-fn max_320815() {
-  var res: vec2<u32> = max(vec2<u32>(), vec2<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_320815();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_320815();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_320815();
-}
diff --git a/test/intrinsics/gen/max/44a39d.wgsl b/test/intrinsics/gen/max/44a39d.wgsl
deleted file mode 100644
index 9af6704..0000000
--- a/test/intrinsics/gen/max/44a39d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(f32, f32) -> f32
-fn max_44a39d() {
-  var res: f32 = max(1.0, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_44a39d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_44a39d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_44a39d();
-}
diff --git a/test/intrinsics/gen/max/453e04.wgsl b/test/intrinsics/gen/max/453e04.wgsl
deleted file mode 100644
index b3813d9..0000000
--- a/test/intrinsics/gen/max/453e04.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(vec<4, u32>, vec<4, u32>) -> vec<4, u32>
-fn max_453e04() {
-  var res: vec4<u32> = max(vec4<u32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_453e04();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_453e04();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_453e04();
-}
diff --git a/test/intrinsics/gen/max/462050.wgsl b/test/intrinsics/gen/max/462050.wgsl
deleted file mode 100644
index 03523b9..0000000
--- a/test/intrinsics/gen/max/462050.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn max_462050() {
-  var res: vec2<f32> = max(vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_462050();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_462050();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_462050();
-}
diff --git a/test/intrinsics/gen/max/4883ac.wgsl b/test/intrinsics/gen/max/4883ac.wgsl
deleted file mode 100644
index a0244ea..0000000
--- a/test/intrinsics/gen/max/4883ac.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn max_4883ac() {
-  var res: vec3<f32> = max(vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_4883ac();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_4883ac();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_4883ac();
-}
diff --git a/test/intrinsics/gen/max/85e6bc.wgsl b/test/intrinsics/gen/max/85e6bc.wgsl
deleted file mode 100644
index 5e8f666..0000000
--- a/test/intrinsics/gen/max/85e6bc.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(vec<4, i32>, vec<4, i32>) -> vec<4, i32>
-fn max_85e6bc() {
-  var res: vec4<i32> = max(vec4<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_85e6bc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_85e6bc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_85e6bc();
-}
diff --git a/test/intrinsics/gen/max/a93419.wgsl b/test/intrinsics/gen/max/a93419.wgsl
deleted file mode 100644
index 4dc296a..0000000
--- a/test/intrinsics/gen/max/a93419.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn max_a93419() {
-  var res: vec4<f32> = max(vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_a93419();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_a93419();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_a93419();
-}
diff --git a/test/intrinsics/gen/max/b1b73a.wgsl b/test/intrinsics/gen/max/b1b73a.wgsl
deleted file mode 100644
index 17a9808..0000000
--- a/test/intrinsics/gen/max/b1b73a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(vec<3, u32>, vec<3, u32>) -> vec<3, u32>
-fn max_b1b73a() {
-  var res: vec3<u32> = max(vec3<u32>(), vec3<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_b1b73a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_b1b73a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_b1b73a();
-}
diff --git a/test/intrinsics/gen/max/ce7c30.wgsl b/test/intrinsics/gen/max/ce7c30.wgsl
deleted file mode 100644
index 167bd6c..0000000
--- a/test/intrinsics/gen/max/ce7c30.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(i32, i32) -> i32
-fn max_ce7c30() {
-  var res: i32 = max(1, 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_ce7c30();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_ce7c30();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_ce7c30();
-}
diff --git a/test/intrinsics/gen/max/e8192f.wgsl b/test/intrinsics/gen/max/e8192f.wgsl
deleted file mode 100644
index 3691990..0000000
--- a/test/intrinsics/gen/max/e8192f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn max(vec<2, i32>, vec<2, i32>) -> vec<2, i32>
-fn max_e8192f() {
-  var res: vec2<i32> = max(vec2<i32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  max_e8192f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  max_e8192f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  max_e8192f();
-}
diff --git a/test/intrinsics/gen/min/03c7e3.wgsl b/test/intrinsics/gen/min/03c7e3.wgsl
deleted file mode 100644
index ed5cb3d..0000000
--- a/test/intrinsics/gen/min/03c7e3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(vec<2, i32>, vec<2, i32>) -> vec<2, i32>
-fn min_03c7e3() {
-  var res: vec2<i32> = min(vec2<i32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_03c7e3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_03c7e3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_03c7e3();
-}
diff --git a/test/intrinsics/gen/min/0dc614.wgsl b/test/intrinsics/gen/min/0dc614.wgsl
deleted file mode 100644
index 976011e..0000000
--- a/test/intrinsics/gen/min/0dc614.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(vec<4, u32>, vec<4, u32>) -> vec<4, u32>
-fn min_0dc614() {
-  var res: vec4<u32> = min(vec4<u32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_0dc614();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_0dc614();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_0dc614();
-}
diff --git a/test/intrinsics/gen/min/3941e1.wgsl b/test/intrinsics/gen/min/3941e1.wgsl
deleted file mode 100644
index b45498f..0000000
--- a/test/intrinsics/gen/min/3941e1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(vec<4, i32>, vec<4, i32>) -> vec<4, i32>
-fn min_3941e1() {
-  var res: vec4<i32> = min(vec4<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_3941e1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_3941e1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_3941e1();
-}
diff --git a/test/intrinsics/gen/min/46c5d3.wgsl b/test/intrinsics/gen/min/46c5d3.wgsl
deleted file mode 100644
index b3d8710..0000000
--- a/test/intrinsics/gen/min/46c5d3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(u32, u32) -> u32
-fn min_46c5d3() {
-  var res: u32 = min(1u, 1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_46c5d3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_46c5d3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_46c5d3();
-}
diff --git a/test/intrinsics/gen/min/82b28f.wgsl b/test/intrinsics/gen/min/82b28f.wgsl
deleted file mode 100644
index 01dfafd..0000000
--- a/test/intrinsics/gen/min/82b28f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(vec<2, u32>, vec<2, u32>) -> vec<2, u32>
-fn min_82b28f() {
-  var res: vec2<u32> = min(vec2<u32>(), vec2<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_82b28f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_82b28f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_82b28f();
-}
diff --git a/test/intrinsics/gen/min/93cfc4.wgsl b/test/intrinsics/gen/min/93cfc4.wgsl
deleted file mode 100644
index 91bc5af..0000000
--- a/test/intrinsics/gen/min/93cfc4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn min_93cfc4() {
-  var res: vec3<f32> = min(vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_93cfc4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_93cfc4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_93cfc4();
-}
diff --git a/test/intrinsics/gen/min/a45171.wgsl b/test/intrinsics/gen/min/a45171.wgsl
deleted file mode 100644
index 01b49b4..0000000
--- a/test/intrinsics/gen/min/a45171.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(vec<3, i32>, vec<3, i32>) -> vec<3, i32>
-fn min_a45171() {
-  var res: vec3<i32> = min(vec3<i32>(), vec3<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_a45171();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_a45171();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_a45171();
-}
diff --git a/test/intrinsics/gen/min/aa28ad.wgsl b/test/intrinsics/gen/min/aa28ad.wgsl
deleted file mode 100644
index cd9775f..0000000
--- a/test/intrinsics/gen/min/aa28ad.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn min_aa28ad() {
-  var res: vec2<f32> = min(vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_aa28ad();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_aa28ad();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_aa28ad();
-}
diff --git a/test/intrinsics/gen/min/af326d.wgsl b/test/intrinsics/gen/min/af326d.wgsl
deleted file mode 100644
index 0a1cde9d..0000000
--- a/test/intrinsics/gen/min/af326d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(f32, f32) -> f32
-fn min_af326d() {
-  var res: f32 = min(1.0, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_af326d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_af326d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_af326d();
-}
diff --git a/test/intrinsics/gen/min/c70bb7.wgsl b/test/intrinsics/gen/min/c70bb7.wgsl
deleted file mode 100644
index 20d33ea..0000000
--- a/test/intrinsics/gen/min/c70bb7.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(vec<3, u32>, vec<3, u32>) -> vec<3, u32>
-fn min_c70bb7() {
-  var res: vec3<u32> = min(vec3<u32>(), vec3<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_c70bb7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_c70bb7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_c70bb7();
-}
diff --git a/test/intrinsics/gen/min/c73147.wgsl b/test/intrinsics/gen/min/c73147.wgsl
deleted file mode 100644
index 25b6ce2..0000000
--- a/test/intrinsics/gen/min/c73147.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(i32, i32) -> i32
-fn min_c73147() {
-  var res: i32 = min(1, 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_c73147();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_c73147();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_c73147();
-}
diff --git a/test/intrinsics/gen/min/c76fa6.wgsl b/test/intrinsics/gen/min/c76fa6.wgsl
deleted file mode 100644
index 367f8f5..0000000
--- a/test/intrinsics/gen/min/c76fa6.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn min(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn min_c76fa6() {
-  var res: vec4<f32> = min(vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  min_c76fa6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  min_c76fa6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  min_c76fa6();
-}
diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl b/test/intrinsics/gen/mix/0c8c33.wgsl
deleted file mode 100644
index c2ba55d..0000000
--- a/test/intrinsics/gen/mix/0c8c33.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn mix(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn mix_0c8c33() {
-  var res: vec3<f32> = mix(vec3<f32>(), vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  mix_0c8c33();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  mix_0c8c33();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  mix_0c8c33();
-}
diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl b/test/intrinsics/gen/mix/1faeb1.wgsl
deleted file mode 100644
index 948163b..0000000
--- a/test/intrinsics/gen/mix/1faeb1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn mix(vec<4, f32>, vec<4, f32>, f32) -> vec<4, f32>
-fn mix_1faeb1() {
-  var res: vec4<f32> = mix(vec4<f32>(), vec4<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  mix_1faeb1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  mix_1faeb1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  mix_1faeb1();
-}
diff --git a/test/intrinsics/gen/mix/2fadab.wgsl b/test/intrinsics/gen/mix/2fadab.wgsl
deleted file mode 100644
index 94551f9..0000000
--- a/test/intrinsics/gen/mix/2fadab.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn mix(vec<2, f32>, vec<2, f32>, f32) -> vec<2, f32>
-fn mix_2fadab() {
-  var res: vec2<f32> = mix(vec2<f32>(), vec2<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  mix_2fadab();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  mix_2fadab();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  mix_2fadab();
-}
diff --git a/test/intrinsics/gen/mix/315264.wgsl b/test/intrinsics/gen/mix/315264.wgsl
deleted file mode 100644
index 3c8a050..0000000
--- a/test/intrinsics/gen/mix/315264.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn mix(vec<3, f32>, vec<3, f32>, f32) -> vec<3, f32>
-fn mix_315264() {
-  var res: vec3<f32> = mix(vec3<f32>(), vec3<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  mix_315264();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  mix_315264();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  mix_315264();
-}
diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl b/test/intrinsics/gen/mix/4f0b5e.wgsl
deleted file mode 100644
index 327cd1f..0000000
--- a/test/intrinsics/gen/mix/4f0b5e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn mix(f32, f32, f32) -> f32
-fn mix_4f0b5e() {
-  var res: f32 = mix(1.0, 1.0, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  mix_4f0b5e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  mix_4f0b5e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  mix_4f0b5e();
-}
diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl b/test/intrinsics/gen/mix/6f8adc.wgsl
deleted file mode 100644
index ed6872f..0000000
--- a/test/intrinsics/gen/mix/6f8adc.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn mix(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn mix_6f8adc() {
-  var res: vec2<f32> = mix(vec2<f32>(), vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  mix_6f8adc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  mix_6f8adc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  mix_6f8adc();
-}
diff --git a/test/intrinsics/gen/mix/c37ede.wgsl b/test/intrinsics/gen/mix/c37ede.wgsl
deleted file mode 100644
index 59185cf..0000000
--- a/test/intrinsics/gen/mix/c37ede.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn mix(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn mix_c37ede() {
-  var res: vec4<f32> = mix(vec4<f32>(), vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  mix_c37ede();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  mix_c37ede();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  mix_c37ede();
-}
diff --git a/test/intrinsics/gen/modf/180fed.wgsl b/test/intrinsics/gen/modf/180fed.wgsl
deleted file mode 100644
index c9ad660..0000000
--- a/test/intrinsics/gen/modf/180fed.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn modf(f32) -> __modf_result
-fn modf_180fed() {
-  var res = modf(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  modf_180fed();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  modf_180fed();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  modf_180fed();
-}
diff --git a/test/intrinsics/gen/modf/9b75f7.wgsl b/test/intrinsics/gen/modf/9b75f7.wgsl
deleted file mode 100644
index 982a75c..0000000
--- a/test/intrinsics/gen/modf/9b75f7.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn modf(vec<3, f32>) -> __modf_result_vec<3>
-fn modf_9b75f7() {
-  var res = modf(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  modf_9b75f7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  modf_9b75f7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  modf_9b75f7();
-}
diff --git a/test/intrinsics/gen/modf/ec2dbc.wgsl b/test/intrinsics/gen/modf/ec2dbc.wgsl
deleted file mode 100644
index 8de77ad..0000000
--- a/test/intrinsics/gen/modf/ec2dbc.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn modf(vec<4, f32>) -> __modf_result_vec<4>
-fn modf_ec2dbc() {
-  var res = modf(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  modf_ec2dbc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  modf_ec2dbc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  modf_ec2dbc();
-}
diff --git a/test/intrinsics/gen/modf/f5f20d.wgsl b/test/intrinsics/gen/modf/f5f20d.wgsl
deleted file mode 100644
index 0a0dcf5..0000000
--- a/test/intrinsics/gen/modf/f5f20d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn modf(vec<2, f32>) -> __modf_result_vec<2>
-fn modf_f5f20d() {
-  var res = modf(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  modf_f5f20d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  modf_f5f20d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  modf_f5f20d();
-}
diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl b/test/intrinsics/gen/normalize/64d8c0.wgsl
deleted file mode 100644
index 2109b61..0000000
--- a/test/intrinsics/gen/normalize/64d8c0.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn normalize(vec<3, f32>) -> vec<3, f32>
-fn normalize_64d8c0() {
-  var res: vec3<f32> = normalize(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  normalize_64d8c0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  normalize_64d8c0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  normalize_64d8c0();
-}
diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl b/test/intrinsics/gen/normalize/9a0aab.wgsl
deleted file mode 100644
index 12bf4ac..0000000
--- a/test/intrinsics/gen/normalize/9a0aab.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn normalize(vec<4, f32>) -> vec<4, f32>
-fn normalize_9a0aab() {
-  var res: vec4<f32> = normalize(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  normalize_9a0aab();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  normalize_9a0aab();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  normalize_9a0aab();
-}
diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl b/test/intrinsics/gen/normalize/fc2ef1.wgsl
deleted file mode 100644
index 0c11b89..0000000
--- a/test/intrinsics/gen/normalize/fc2ef1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn normalize(vec<2, f32>) -> vec<2, f32>
-fn normalize_fc2ef1() {
-  var res: vec2<f32> = normalize(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  normalize_fc2ef1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  normalize_fc2ef1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  normalize_fc2ef1();
-}
diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl
deleted file mode 100644
index ae2610c..0000000
--- a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn pack2x16float(vec2<f32>) -> u32
-fn pack2x16float_0e97b3() {
-  var res: u32 = pack2x16float(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  pack2x16float_0e97b3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  pack2x16float_0e97b3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  pack2x16float_0e97b3();
-}
diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl
deleted file mode 100644
index 7d0aeb3..0000000
--- a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn pack2x16snorm(vec2<f32>) -> u32
-fn pack2x16snorm_6c169b() {
-  var res: u32 = pack2x16snorm(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  pack2x16snorm_6c169b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  pack2x16snorm_6c169b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  pack2x16snorm_6c169b();
-}
diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl
deleted file mode 100644
index 022aaa6..0000000
--- a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn pack2x16unorm(vec2<f32>) -> u32
-fn pack2x16unorm_0f08e4() {
-  var res: u32 = pack2x16unorm(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  pack2x16unorm_0f08e4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  pack2x16unorm_0f08e4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  pack2x16unorm_0f08e4();
-}
diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl
deleted file mode 100644
index 6495f5e..0000000
--- a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn pack4x8snorm(vec4<f32>) -> u32
-fn pack4x8snorm_4d22e7() {
-  var res: u32 = pack4x8snorm(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  pack4x8snorm_4d22e7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  pack4x8snorm_4d22e7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  pack4x8snorm_4d22e7();
-}
diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl
deleted file mode 100644
index d76e075..0000000
--- a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn pack4x8unorm(vec4<f32>) -> u32
-fn pack4x8unorm_95c456() {
-  var res: u32 = pack4x8unorm(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  pack4x8unorm_95c456();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  pack4x8unorm_95c456();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  pack4x8unorm_95c456();
-}
diff --git a/test/intrinsics/gen/pow/04a908.wgsl b/test/intrinsics/gen/pow/04a908.wgsl
deleted file mode 100644
index cc17d35..0000000
--- a/test/intrinsics/gen/pow/04a908.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn pow(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn pow_04a908() {
-  var res: vec4<f32> = pow(vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  pow_04a908();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  pow_04a908();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  pow_04a908();
-}
diff --git a/test/intrinsics/gen/pow/46e029.wgsl b/test/intrinsics/gen/pow/46e029.wgsl
deleted file mode 100644
index 7366f03..0000000
--- a/test/intrinsics/gen/pow/46e029.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn pow(f32, f32) -> f32
-fn pow_46e029() {
-  var res: f32 = pow(1.0, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  pow_46e029();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  pow_46e029();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  pow_46e029();
-}
diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl b/test/intrinsics/gen/pow/4a46c9.wgsl
deleted file mode 100644
index c6e5af0..0000000
--- a/test/intrinsics/gen/pow/4a46c9.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn pow(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn pow_4a46c9() {
-  var res: vec3<f32> = pow(vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  pow_4a46c9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  pow_4a46c9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  pow_4a46c9();
-}
diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl b/test/intrinsics/gen/pow/e60ea5.wgsl
deleted file mode 100644
index e2080cb..0000000
--- a/test/intrinsics/gen/pow/e60ea5.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn pow(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn pow_e60ea5() {
-  var res: vec2<f32> = pow(vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  pow_e60ea5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  pow_e60ea5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  pow_e60ea5();
-}
diff --git a/test/intrinsics/gen/radians/09b7fc.wgsl b/test/intrinsics/gen/radians/09b7fc.wgsl
deleted file mode 100644
index e397d3a..0000000
--- a/test/intrinsics/gen/radians/09b7fc.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn radians(vec<4, f32>) -> vec<4, f32>
-fn radians_09b7fc() {
-  var res: vec4<f32> = radians(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  radians_09b7fc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  radians_09b7fc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  radians_09b7fc();
-}
diff --git a/test/intrinsics/gen/radians/61687a.wgsl b/test/intrinsics/gen/radians/61687a.wgsl
deleted file mode 100644
index 9ff8560..0000000
--- a/test/intrinsics/gen/radians/61687a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn radians(vec<2, f32>) -> vec<2, f32>
-fn radians_61687a() {
-  var res: vec2<f32> = radians(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  radians_61687a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  radians_61687a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  radians_61687a();
-}
diff --git a/test/intrinsics/gen/radians/6b0ff2.wgsl b/test/intrinsics/gen/radians/6b0ff2.wgsl
deleted file mode 100644
index 8ceaeb2..0000000
--- a/test/intrinsics/gen/radians/6b0ff2.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn radians(f32) -> f32
-fn radians_6b0ff2() {
-  var res: f32 = radians(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  radians_6b0ff2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  radians_6b0ff2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  radians_6b0ff2();
-}
diff --git a/test/intrinsics/gen/radians/f96258.wgsl b/test/intrinsics/gen/radians/f96258.wgsl
deleted file mode 100644
index bca54a5..0000000
--- a/test/intrinsics/gen/radians/f96258.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn radians(vec<3, f32>) -> vec<3, f32>
-fn radians_f96258() {
-  var res: vec3<f32> = radians(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  radians_f96258();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  radians_f96258();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  radians_f96258();
-}
diff --git a/test/intrinsics/gen/reflect/05357e.wgsl b/test/intrinsics/gen/reflect/05357e.wgsl
deleted file mode 100644
index 97aaac7..0000000
--- a/test/intrinsics/gen/reflect/05357e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reflect(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn reflect_05357e() {
-  var res: vec4<f32> = reflect(vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reflect_05357e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reflect_05357e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reflect_05357e();
-}
diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl b/test/intrinsics/gen/reflect/b61e10.wgsl
deleted file mode 100644
index 124022b..0000000
--- a/test/intrinsics/gen/reflect/b61e10.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reflect(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn reflect_b61e10() {
-  var res: vec2<f32> = reflect(vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reflect_b61e10();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reflect_b61e10();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reflect_b61e10();
-}
diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl b/test/intrinsics/gen/reflect/f47fdb.wgsl
deleted file mode 100644
index 3048fe0..0000000
--- a/test/intrinsics/gen/reflect/f47fdb.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reflect(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn reflect_f47fdb() {
-  var res: vec3<f32> = reflect(vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reflect_f47fdb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reflect_f47fdb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reflect_f47fdb();
-}
diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl b/test/intrinsics/gen/refract/7e02e6.wgsl
deleted file mode 100644
index ff46411..0000000
--- a/test/intrinsics/gen/refract/7e02e6.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn refract(vec<4, f32>, vec<4, f32>, f32) -> vec<4, f32>
-fn refract_7e02e6() {
-  var res: vec4<f32> = refract(vec4<f32>(), vec4<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  refract_7e02e6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  refract_7e02e6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  refract_7e02e6();
-}
diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl b/test/intrinsics/gen/refract/cbc1d2.wgsl
deleted file mode 100644
index 40c0531..0000000
--- a/test/intrinsics/gen/refract/cbc1d2.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn refract(vec<3, f32>, vec<3, f32>, f32) -> vec<3, f32>
-fn refract_cbc1d2() {
-  var res: vec3<f32> = refract(vec3<f32>(), vec3<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  refract_cbc1d2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  refract_cbc1d2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  refract_cbc1d2();
-}
diff --git a/test/intrinsics/gen/refract/cd905f.wgsl b/test/intrinsics/gen/refract/cd905f.wgsl
deleted file mode 100644
index 9c9e3fd..0000000
--- a/test/intrinsics/gen/refract/cd905f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn refract(vec<2, f32>, vec<2, f32>, f32) -> vec<2, f32>
-fn refract_cd905f() {
-  var res: vec2<f32> = refract(vec2<f32>(), vec2<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  refract_cd905f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  refract_cd905f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  refract_cd905f();
-}
diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl b/test/intrinsics/gen/reverseBits/222177.wgsl
deleted file mode 100644
index bdbba4a..0000000
--- a/test/intrinsics/gen/reverseBits/222177.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reverseBits(vec<2, i32>) -> vec<2, i32>
-fn reverseBits_222177() {
-  var res: vec2<i32> = reverseBits(vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reverseBits_222177();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reverseBits_222177();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reverseBits_222177();
-}
diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl b/test/intrinsics/gen/reverseBits/35fea9.wgsl
deleted file mode 100644
index 319f6d2..0000000
--- a/test/intrinsics/gen/reverseBits/35fea9.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reverseBits(vec<4, u32>) -> vec<4, u32>
-fn reverseBits_35fea9() {
-  var res: vec4<u32> = reverseBits(vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reverseBits_35fea9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reverseBits_35fea9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reverseBits_35fea9();
-}
diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl
deleted file mode 100644
index 09ab61f..0000000
--- a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reverseBits(vec<4, i32>) -> vec<4, i32>
-fn reverseBits_4dbd6f() {
-  var res: vec4<i32> = reverseBits(vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reverseBits_4dbd6f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reverseBits_4dbd6f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reverseBits_4dbd6f();
-}
diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl b/test/intrinsics/gen/reverseBits/7c4269.wgsl
deleted file mode 100644
index 6be3409..0000000
--- a/test/intrinsics/gen/reverseBits/7c4269.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reverseBits(i32) -> i32
-fn reverseBits_7c4269() {
-  var res: i32 = reverseBits(1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reverseBits_7c4269();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reverseBits_7c4269();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reverseBits_7c4269();
-}
diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl
deleted file mode 100644
index 3559904..0000000
--- a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reverseBits(vec<3, u32>) -> vec<3, u32>
-fn reverseBits_a6ccd4() {
-  var res: vec3<u32> = reverseBits(vec3<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reverseBits_a6ccd4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reverseBits_a6ccd4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reverseBits_a6ccd4();
-}
diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl b/test/intrinsics/gen/reverseBits/c21bc1.wgsl
deleted file mode 100644
index 985e64a..0000000
--- a/test/intrinsics/gen/reverseBits/c21bc1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reverseBits(vec<3, i32>) -> vec<3, i32>
-fn reverseBits_c21bc1() {
-  var res: vec3<i32> = reverseBits(vec3<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reverseBits_c21bc1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reverseBits_c21bc1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reverseBits_c21bc1();
-}
diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl
deleted file mode 100644
index d186157..0000000
--- a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reverseBits(vec<2, u32>) -> vec<2, u32>
-fn reverseBits_e1f4c1() {
-  var res: vec2<u32> = reverseBits(vec2<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reverseBits_e1f4c1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reverseBits_e1f4c1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reverseBits_e1f4c1();
-}
diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl b/test/intrinsics/gen/reverseBits/e31adf.wgsl
deleted file mode 100644
index c32c738..0000000
--- a/test/intrinsics/gen/reverseBits/e31adf.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn reverseBits(u32) -> u32
-fn reverseBits_e31adf() {
-  var res: u32 = reverseBits(1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  reverseBits_e31adf();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  reverseBits_e31adf();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  reverseBits_e31adf();
-}
diff --git a/test/intrinsics/gen/round/106c0b.wgsl b/test/intrinsics/gen/round/106c0b.wgsl
deleted file mode 100644
index 52ebd56..0000000
--- a/test/intrinsics/gen/round/106c0b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn round(vec<4, f32>) -> vec<4, f32>
-fn round_106c0b() {
-  var res: vec4<f32> = round(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  round_106c0b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  round_106c0b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  round_106c0b();
-}
diff --git a/test/intrinsics/gen/round/1c7897.wgsl b/test/intrinsics/gen/round/1c7897.wgsl
deleted file mode 100644
index c0f13ae..0000000
--- a/test/intrinsics/gen/round/1c7897.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn round(vec<3, f32>) -> vec<3, f32>
-fn round_1c7897() {
-  var res: vec3<f32> = round(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  round_1c7897();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  round_1c7897();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  round_1c7897();
-}
diff --git a/test/intrinsics/gen/round/52c84d.wgsl b/test/intrinsics/gen/round/52c84d.wgsl
deleted file mode 100644
index 385bb5e..0000000
--- a/test/intrinsics/gen/round/52c84d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn round(vec<2, f32>) -> vec<2, f32>
-fn round_52c84d() {
-  var res: vec2<f32> = round(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  round_52c84d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  round_52c84d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  round_52c84d();
-}
diff --git a/test/intrinsics/gen/round/9edc38.wgsl b/test/intrinsics/gen/round/9edc38.wgsl
deleted file mode 100644
index e4fd176..0000000
--- a/test/intrinsics/gen/round/9edc38.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn round(f32) -> f32
-fn round_9edc38() {
-  var res: f32 = round(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  round_9edc38();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  round_9edc38();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  round_9edc38();
-}
diff --git a/test/intrinsics/gen/select/00b848.wgsl b/test/intrinsics/gen/select/00b848.wgsl
deleted file mode 100644
index a1f4834..0000000
--- a/test/intrinsics/gen/select/00b848.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<2, i32>, vec<2, i32>, vec<2, bool>) -> vec<2, i32>
-fn select_00b848() {
-  var res: vec2<i32> = select(vec2<i32>(), vec2<i32>(), vec2<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_00b848();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_00b848();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_00b848();
-}
diff --git a/test/intrinsics/gen/select/01e2cd.wgsl b/test/intrinsics/gen/select/01e2cd.wgsl
deleted file mode 100644
index c8e0408..0000000
--- a/test/intrinsics/gen/select/01e2cd.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<3, i32>, vec<3, i32>, vec<3, bool>) -> vec<3, i32>
-fn select_01e2cd() {
-  var res: vec3<i32> = select(vec3<i32>(), vec3<i32>(), vec3<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_01e2cd();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_01e2cd();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_01e2cd();
-}
diff --git a/test/intrinsics/gen/select/087ea4.wgsl b/test/intrinsics/gen/select/087ea4.wgsl
deleted file mode 100644
index f8f7924..0000000
--- a/test/intrinsics/gen/select/087ea4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<4, u32>, vec<4, u32>, bool) -> vec<4, u32>
-fn select_087ea4() {
-  var res: vec4<u32> = select(vec4<u32>(), vec4<u32>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_087ea4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_087ea4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_087ea4();
-}
diff --git a/test/intrinsics/gen/select/1e960b.wgsl b/test/intrinsics/gen/select/1e960b.wgsl
deleted file mode 100644
index 92c0df6..0000000
--- a/test/intrinsics/gen/select/1e960b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<2, u32>, vec<2, u32>, vec<2, bool>) -> vec<2, u32>
-fn select_1e960b() {
-  var res: vec2<u32> = select(vec2<u32>(), vec2<u32>(), vec2<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_1e960b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_1e960b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_1e960b();
-}
diff --git a/test/intrinsics/gen/select/266aff.wgsl b/test/intrinsics/gen/select/266aff.wgsl
deleted file mode 100644
index 6faee8a..0000000
--- a/test/intrinsics/gen/select/266aff.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<2, f32>, vec<2, f32>, vec<2, bool>) -> vec<2, f32>
-fn select_266aff() {
-  var res: vec2<f32> = select(vec2<f32>(), vec2<f32>(), vec2<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_266aff();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_266aff();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_266aff();
-}
diff --git a/test/intrinsics/gen/select/28a27e.wgsl b/test/intrinsics/gen/select/28a27e.wgsl
deleted file mode 100644
index cc515a9..0000000
--- a/test/intrinsics/gen/select/28a27e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<3, u32>, vec<3, u32>, vec<3, bool>) -> vec<3, u32>
-fn select_28a27e() {
-  var res: vec3<u32> = select(vec3<u32>(), vec3<u32>(), vec3<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_28a27e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_28a27e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_28a27e();
-}
diff --git a/test/intrinsics/gen/select/3c25ce.wgsl b/test/intrinsics/gen/select/3c25ce.wgsl
deleted file mode 100644
index 85d68b1..0000000
--- a/test/intrinsics/gen/select/3c25ce.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<3, bool>, vec<3, bool>, bool) -> vec<3, bool>
-fn select_3c25ce() {
-  var res: vec3<bool> = select(vec3<bool>(), vec3<bool>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_3c25ce();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_3c25ce();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_3c25ce();
-}
diff --git a/test/intrinsics/gen/select/416e14.wgsl b/test/intrinsics/gen/select/416e14.wgsl
deleted file mode 100644
index c69cd17..0000000
--- a/test/intrinsics/gen/select/416e14.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(f32, f32, bool) -> f32
-fn select_416e14() {
-  var res: f32 = select(1.0, 1.0, bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_416e14();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_416e14();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_416e14();
-}
diff --git a/test/intrinsics/gen/select/51b047.wgsl b/test/intrinsics/gen/select/51b047.wgsl
deleted file mode 100644
index f774d3f..0000000
--- a/test/intrinsics/gen/select/51b047.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<2, u32>, vec<2, u32>, bool) -> vec<2, u32>
-fn select_51b047() {
-  var res: vec2<u32> = select(vec2<u32>(), vec2<u32>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_51b047();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_51b047();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_51b047();
-}
diff --git a/test/intrinsics/gen/select/713567.wgsl b/test/intrinsics/gen/select/713567.wgsl
deleted file mode 100644
index 9dad142..0000000
--- a/test/intrinsics/gen/select/713567.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<4, f32>, vec<4, f32>, bool) -> vec<4, f32>
-fn select_713567() {
-  var res: vec4<f32> = select(vec4<f32>(), vec4<f32>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_713567();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_713567();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_713567();
-}
diff --git a/test/intrinsics/gen/select/78be5f.wgsl b/test/intrinsics/gen/select/78be5f.wgsl
deleted file mode 100644
index 363cb61..0000000
--- a/test/intrinsics/gen/select/78be5f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<3, f32>, vec<3, f32>, bool) -> vec<3, f32>
-fn select_78be5f() {
-  var res: vec3<f32> = select(vec3<f32>(), vec3<f32>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_78be5f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_78be5f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_78be5f();
-}
diff --git a/test/intrinsics/gen/select/80a9a9.wgsl b/test/intrinsics/gen/select/80a9a9.wgsl
deleted file mode 100644
index 970d4b0..0000000
--- a/test/intrinsics/gen/select/80a9a9.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<3, bool>, vec<3, bool>, vec<3, bool>) -> vec<3, bool>
-fn select_80a9a9() {
-  var res: vec3<bool> = select(vec3<bool>(), vec3<bool>(), vec3<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_80a9a9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_80a9a9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_80a9a9();
-}
diff --git a/test/intrinsics/gen/select/8fa62c.wgsl b/test/intrinsics/gen/select/8fa62c.wgsl
deleted file mode 100644
index 6fd149a..0000000
--- a/test/intrinsics/gen/select/8fa62c.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<3, i32>, vec<3, i32>, bool) -> vec<3, i32>
-fn select_8fa62c() {
-  var res: vec3<i32> = select(vec3<i32>(), vec3<i32>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_8fa62c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_8fa62c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_8fa62c();
-}
diff --git a/test/intrinsics/gen/select/99f883.wgsl b/test/intrinsics/gen/select/99f883.wgsl
deleted file mode 100644
index 25c5a25..0000000
--- a/test/intrinsics/gen/select/99f883.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(u32, u32, bool) -> u32
-fn select_99f883() {
-  var res: u32 = select(1u, 1u, bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_99f883();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_99f883();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_99f883();
-}
diff --git a/test/intrinsics/gen/select/a2860e.wgsl b/test/intrinsics/gen/select/a2860e.wgsl
deleted file mode 100644
index 6b3b0b2..0000000
--- a/test/intrinsics/gen/select/a2860e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<4, i32>, vec<4, i32>, vec<4, bool>) -> vec<4, i32>
-fn select_a2860e() {
-  var res: vec4<i32> = select(vec4<i32>(), vec4<i32>(), vec4<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_a2860e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_a2860e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_a2860e();
-}
diff --git a/test/intrinsics/gen/select/ab069f.wgsl b/test/intrinsics/gen/select/ab069f.wgsl
deleted file mode 100644
index a55fa79..0000000
--- a/test/intrinsics/gen/select/ab069f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<4, i32>, vec<4, i32>, bool) -> vec<4, i32>
-fn select_ab069f() {
-  var res: vec4<i32> = select(vec4<i32>(), vec4<i32>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_ab069f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_ab069f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_ab069f();
-}
diff --git a/test/intrinsics/gen/select/b04721.wgsl b/test/intrinsics/gen/select/b04721.wgsl
deleted file mode 100644
index 1de6739..0000000
--- a/test/intrinsics/gen/select/b04721.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<3, u32>, vec<3, u32>, bool) -> vec<3, u32>
-fn select_b04721() {
-  var res: vec3<u32> = select(vec3<u32>(), vec3<u32>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_b04721();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_b04721();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_b04721();
-}
diff --git a/test/intrinsics/gen/select/bb447f.wgsl b/test/intrinsics/gen/select/bb447f.wgsl
deleted file mode 100644
index f15929a..0000000
--- a/test/intrinsics/gen/select/bb447f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<2, i32>, vec<2, i32>, bool) -> vec<2, i32>
-fn select_bb447f() {
-  var res: vec2<i32> = select(vec2<i32>(), vec2<i32>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_bb447f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_bb447f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_bb447f();
-}
diff --git a/test/intrinsics/gen/select/bb8aae.wgsl b/test/intrinsics/gen/select/bb8aae.wgsl
deleted file mode 100644
index 786f619..0000000
--- a/test/intrinsics/gen/select/bb8aae.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<4, f32>, vec<4, f32>, vec<4, bool>) -> vec<4, f32>
-fn select_bb8aae() {
-  var res: vec4<f32> = select(vec4<f32>(), vec4<f32>(), vec4<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_bb8aae();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_bb8aae();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_bb8aae();
-}
diff --git a/test/intrinsics/gen/select/bf3d29.wgsl b/test/intrinsics/gen/select/bf3d29.wgsl
deleted file mode 100644
index db8e855..0000000
--- a/test/intrinsics/gen/select/bf3d29.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<2, f32>, vec<2, f32>, bool) -> vec<2, f32>
-fn select_bf3d29() {
-  var res: vec2<f32> = select(vec2<f32>(), vec2<f32>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_bf3d29();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_bf3d29();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_bf3d29();
-}
diff --git a/test/intrinsics/gen/select/c31f9e.wgsl b/test/intrinsics/gen/select/c31f9e.wgsl
deleted file mode 100644
index 3f04796..0000000
--- a/test/intrinsics/gen/select/c31f9e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(bool, bool, bool) -> bool
-fn select_c31f9e() {
-  var res: bool = select(bool(), bool(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_c31f9e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_c31f9e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_c31f9e();
-}
diff --git a/test/intrinsics/gen/select/c41bd1.wgsl b/test/intrinsics/gen/select/c41bd1.wgsl
deleted file mode 100644
index a4a0143..0000000
--- a/test/intrinsics/gen/select/c41bd1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<4, bool>, vec<4, bool>, bool) -> vec<4, bool>
-fn select_c41bd1() {
-  var res: vec4<bool> = select(vec4<bool>(), vec4<bool>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_c41bd1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_c41bd1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_c41bd1();
-}
diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl b/test/intrinsics/gen/select/c4a4ef.wgsl
deleted file mode 100644
index 5826ca0..0000000
--- a/test/intrinsics/gen/select/c4a4ef.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<4, u32>, vec<4, u32>, vec<4, bool>) -> vec<4, u32>
-fn select_c4a4ef() {
-  var res: vec4<u32> = select(vec4<u32>(), vec4<u32>(), vec4<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_c4a4ef();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_c4a4ef();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_c4a4ef();
-}
diff --git a/test/intrinsics/gen/select/cb9301.wgsl b/test/intrinsics/gen/select/cb9301.wgsl
deleted file mode 100644
index 1de0ad1..0000000
--- a/test/intrinsics/gen/select/cb9301.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<2, bool>, vec<2, bool>, vec<2, bool>) -> vec<2, bool>
-fn select_cb9301() {
-  var res: vec2<bool> = select(vec2<bool>(), vec2<bool>(), vec2<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_cb9301();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_cb9301();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_cb9301();
-}
diff --git a/test/intrinsics/gen/select/e3e028.wgsl b/test/intrinsics/gen/select/e3e028.wgsl
deleted file mode 100644
index 7d28666..0000000
--- a/test/intrinsics/gen/select/e3e028.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<4, bool>, vec<4, bool>, vec<4, bool>) -> vec<4, bool>
-fn select_e3e028() {
-  var res: vec4<bool> = select(vec4<bool>(), vec4<bool>(), vec4<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_e3e028();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_e3e028();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_e3e028();
-}
diff --git a/test/intrinsics/gen/select/ebfea2.wgsl b/test/intrinsics/gen/select/ebfea2.wgsl
deleted file mode 100644
index bd572c5..0000000
--- a/test/intrinsics/gen/select/ebfea2.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<3, f32>, vec<3, f32>, vec<3, bool>) -> vec<3, f32>
-fn select_ebfea2() {
-  var res: vec3<f32> = select(vec3<f32>(), vec3<f32>(), vec3<bool>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_ebfea2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_ebfea2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_ebfea2();
-}
diff --git a/test/intrinsics/gen/select/ed8a15.wgsl b/test/intrinsics/gen/select/ed8a15.wgsl
deleted file mode 100644
index df1f6ad..0000000
--- a/test/intrinsics/gen/select/ed8a15.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(i32, i32, bool) -> i32
-fn select_ed8a15() {
-  var res: i32 = select(1, 1, bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_ed8a15();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_ed8a15();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_ed8a15();
-}
diff --git a/test/intrinsics/gen/select/fb7e53.wgsl b/test/intrinsics/gen/select/fb7e53.wgsl
deleted file mode 100644
index 92d50f3..0000000
--- a/test/intrinsics/gen/select/fb7e53.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn select(vec<2, bool>, vec<2, bool>, bool) -> vec<2, bool>
-fn select_fb7e53() {
-  var res: vec2<bool> = select(vec2<bool>(), vec2<bool>(), bool());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  select_fb7e53();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  select_fb7e53();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  select_fb7e53();
-}
diff --git a/test/intrinsics/gen/sign/159665.wgsl b/test/intrinsics/gen/sign/159665.wgsl
deleted file mode 100644
index a3d87a4..0000000
--- a/test/intrinsics/gen/sign/159665.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sign(vec<3, f32>) -> vec<3, f32>
-fn sign_159665() {
-  var res: vec3<f32> = sign(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sign_159665();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sign_159665();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sign_159665();
-}
diff --git a/test/intrinsics/gen/sign/b8f634.wgsl b/test/intrinsics/gen/sign/b8f634.wgsl
deleted file mode 100644
index c8ced09..0000000
--- a/test/intrinsics/gen/sign/b8f634.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sign(vec<4, f32>) -> vec<4, f32>
-fn sign_b8f634() {
-  var res: vec4<f32> = sign(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sign_b8f634();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sign_b8f634();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sign_b8f634();
-}
diff --git a/test/intrinsics/gen/sign/d065d8.wgsl b/test/intrinsics/gen/sign/d065d8.wgsl
deleted file mode 100644
index 98d6b5e..0000000
--- a/test/intrinsics/gen/sign/d065d8.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sign(vec<2, f32>) -> vec<2, f32>
-fn sign_d065d8() {
-  var res: vec2<f32> = sign(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sign_d065d8();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sign_d065d8();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sign_d065d8();
-}
diff --git a/test/intrinsics/gen/sign/dd790e.wgsl b/test/intrinsics/gen/sign/dd790e.wgsl
deleted file mode 100644
index 7765ea3..0000000
--- a/test/intrinsics/gen/sign/dd790e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sign(f32) -> f32
-fn sign_dd790e() {
-  var res: f32 = sign(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sign_dd790e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sign_dd790e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sign_dd790e();
-}
diff --git a/test/intrinsics/gen/sin/01f241.wgsl b/test/intrinsics/gen/sin/01f241.wgsl
deleted file mode 100644
index 58c1794..0000000
--- a/test/intrinsics/gen/sin/01f241.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sin(vec<3, f32>) -> vec<3, f32>
-fn sin_01f241() {
-  var res: vec3<f32> = sin(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sin_01f241();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sin_01f241();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sin_01f241();
-}
diff --git a/test/intrinsics/gen/sin/4e3979.wgsl b/test/intrinsics/gen/sin/4e3979.wgsl
deleted file mode 100644
index ae447d2..0000000
--- a/test/intrinsics/gen/sin/4e3979.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sin(vec<4, f32>) -> vec<4, f32>
-fn sin_4e3979() {
-  var res: vec4<f32> = sin(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sin_4e3979();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sin_4e3979();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sin_4e3979();
-}
diff --git a/test/intrinsics/gen/sin/b78c91.wgsl b/test/intrinsics/gen/sin/b78c91.wgsl
deleted file mode 100644
index d8ecd40..0000000
--- a/test/intrinsics/gen/sin/b78c91.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sin(f32) -> f32
-fn sin_b78c91() {
-  var res: f32 = sin(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sin_b78c91();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sin_b78c91();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sin_b78c91();
-}
diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl b/test/intrinsics/gen/sin/fc8bc4.wgsl
deleted file mode 100644
index b828689..0000000
--- a/test/intrinsics/gen/sin/fc8bc4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sin(vec<2, f32>) -> vec<2, f32>
-fn sin_fc8bc4() {
-  var res: vec2<f32> = sin(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sin_fc8bc4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sin_fc8bc4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sin_fc8bc4();
-}
diff --git a/test/intrinsics/gen/sinh/445e33.wgsl b/test/intrinsics/gen/sinh/445e33.wgsl
deleted file mode 100644
index 2bb1e20..0000000
--- a/test/intrinsics/gen/sinh/445e33.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sinh(vec<4, f32>) -> vec<4, f32>
-fn sinh_445e33() {
-  var res: vec4<f32> = sinh(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sinh_445e33();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sinh_445e33();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sinh_445e33();
-}
diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl b/test/intrinsics/gen/sinh/7bb598.wgsl
deleted file mode 100644
index 872b87b..0000000
--- a/test/intrinsics/gen/sinh/7bb598.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sinh(f32) -> f32
-fn sinh_7bb598() {
-  var res: f32 = sinh(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sinh_7bb598();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sinh_7bb598();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sinh_7bb598();
-}
diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl b/test/intrinsics/gen/sinh/b9860e.wgsl
deleted file mode 100644
index 3039b48..0000000
--- a/test/intrinsics/gen/sinh/b9860e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sinh(vec<2, f32>) -> vec<2, f32>
-fn sinh_b9860e() {
-  var res: vec2<f32> = sinh(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sinh_b9860e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sinh_b9860e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sinh_b9860e();
-}
diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl b/test/intrinsics/gen/sinh/c9a5eb.wgsl
deleted file mode 100644
index 9c79e98..0000000
--- a/test/intrinsics/gen/sinh/c9a5eb.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sinh(vec<3, f32>) -> vec<3, f32>
-fn sinh_c9a5eb() {
-  var res: vec3<f32> = sinh(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sinh_c9a5eb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sinh_c9a5eb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sinh_c9a5eb();
-}
diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl b/test/intrinsics/gen/smoothStep/5f615b.wgsl
deleted file mode 100644
index 4b1a4ab..0000000
--- a/test/intrinsics/gen/smoothStep/5f615b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn smoothStep(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn smoothStep_5f615b() {
-  var res: vec4<f32> = smoothStep(vec4<f32>(), vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  smoothStep_5f615b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  smoothStep_5f615b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  smoothStep_5f615b();
-}
diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl b/test/intrinsics/gen/smoothStep/658be3.wgsl
deleted file mode 100644
index 8e39364..0000000
--- a/test/intrinsics/gen/smoothStep/658be3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn smoothStep(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn smoothStep_658be3() {
-  var res: vec3<f32> = smoothStep(vec3<f32>(), vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  smoothStep_658be3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  smoothStep_658be3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  smoothStep_658be3();
-}
diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl b/test/intrinsics/gen/smoothStep/c11eef.wgsl
deleted file mode 100644
index 7839f09..0000000
--- a/test/intrinsics/gen/smoothStep/c11eef.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn smoothStep(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn smoothStep_c11eef() {
-  var res: vec2<f32> = smoothStep(vec2<f32>(), vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  smoothStep_c11eef();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  smoothStep_c11eef();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  smoothStep_c11eef();
-}
diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl
deleted file mode 100644
index 5c6c8c2..0000000
--- a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn smoothStep(f32, f32, f32) -> f32
-fn smoothStep_cb0bfb() {
-  var res: f32 = smoothStep(1.0, 1.0, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  smoothStep_cb0bfb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  smoothStep_cb0bfb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  smoothStep_cb0bfb();
-}
diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl b/test/intrinsics/gen/sqrt/20c74e.wgsl
deleted file mode 100644
index b954397..0000000
--- a/test/intrinsics/gen/sqrt/20c74e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sqrt(f32) -> f32
-fn sqrt_20c74e() {
-  var res: f32 = sqrt(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sqrt_20c74e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sqrt_20c74e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sqrt_20c74e();
-}
diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl b/test/intrinsics/gen/sqrt/8c7024.wgsl
deleted file mode 100644
index 4e929d6..0000000
--- a/test/intrinsics/gen/sqrt/8c7024.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sqrt(vec<2, f32>) -> vec<2, f32>
-fn sqrt_8c7024() {
-  var res: vec2<f32> = sqrt(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sqrt_8c7024();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sqrt_8c7024();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sqrt_8c7024();
-}
diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl b/test/intrinsics/gen/sqrt/aa0d7a.wgsl
deleted file mode 100644
index e15b170..0000000
--- a/test/intrinsics/gen/sqrt/aa0d7a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sqrt(vec<4, f32>) -> vec<4, f32>
-fn sqrt_aa0d7a() {
-  var res: vec4<f32> = sqrt(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sqrt_aa0d7a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sqrt_aa0d7a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sqrt_aa0d7a();
-}
diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl b/test/intrinsics/gen/sqrt/f8c59a.wgsl
deleted file mode 100644
index 5916a9f..0000000
--- a/test/intrinsics/gen/sqrt/f8c59a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn sqrt(vec<3, f32>) -> vec<3, f32>
-fn sqrt_f8c59a() {
-  var res: vec3<f32> = sqrt(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  sqrt_f8c59a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  sqrt_f8c59a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  sqrt_f8c59a();
-}
diff --git a/test/intrinsics/gen/step/0b073b.wgsl b/test/intrinsics/gen/step/0b073b.wgsl
deleted file mode 100644
index 5d88c86..0000000
--- a/test/intrinsics/gen/step/0b073b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn step(f32, f32) -> f32
-fn step_0b073b() {
-  var res: f32 = step(1.0, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  step_0b073b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  step_0b073b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  step_0b073b();
-}
diff --git a/test/intrinsics/gen/step/19accd.wgsl b/test/intrinsics/gen/step/19accd.wgsl
deleted file mode 100644
index 9493036..0000000
--- a/test/intrinsics/gen/step/19accd.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn step(vec<2, f32>, vec<2, f32>) -> vec<2, f32>
-fn step_19accd() {
-  var res: vec2<f32> = step(vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  step_19accd();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  step_19accd();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  step_19accd();
-}
diff --git a/test/intrinsics/gen/step/334303.wgsl b/test/intrinsics/gen/step/334303.wgsl
deleted file mode 100644
index 63d3ead..0000000
--- a/test/intrinsics/gen/step/334303.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn step(vec<3, f32>, vec<3, f32>) -> vec<3, f32>
-fn step_334303() {
-  var res: vec3<f32> = step(vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  step_334303();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  step_334303();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  step_334303();
-}
diff --git a/test/intrinsics/gen/step/e2b337.wgsl b/test/intrinsics/gen/step/e2b337.wgsl
deleted file mode 100644
index e691130..0000000
--- a/test/intrinsics/gen/step/e2b337.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn step(vec<4, f32>, vec<4, f32>) -> vec<4, f32>
-fn step_e2b337() {
-  var res: vec4<f32> = step(vec4<f32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  step_e2b337();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  step_e2b337();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  step_e2b337();
-}
diff --git a/test/intrinsics/gen/storageBarrier/d87211.wgsl b/test/intrinsics/gen/storageBarrier/d87211.wgsl
deleted file mode 100644
index 2931174..0000000
--- a/test/intrinsics/gen/storageBarrier/d87211.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn storageBarrier()
-fn storageBarrier_d87211() {
-  storageBarrier();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  storageBarrier_d87211();
-}
diff --git a/test/intrinsics/gen/tan/244e2a.wgsl b/test/intrinsics/gen/tan/244e2a.wgsl
deleted file mode 100644
index 599499f..0000000
--- a/test/intrinsics/gen/tan/244e2a.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn tan(vec<4, f32>) -> vec<4, f32>
-fn tan_244e2a() {
-  var res: vec4<f32> = tan(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  tan_244e2a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  tan_244e2a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  tan_244e2a();
-}
diff --git a/test/intrinsics/gen/tan/2f030e.wgsl b/test/intrinsics/gen/tan/2f030e.wgsl
deleted file mode 100644
index 3ee8e72..0000000
--- a/test/intrinsics/gen/tan/2f030e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn tan(f32) -> f32
-fn tan_2f030e() {
-  var res: f32 = tan(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  tan_2f030e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  tan_2f030e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  tan_2f030e();
-}
diff --git a/test/intrinsics/gen/tan/7ea104.wgsl b/test/intrinsics/gen/tan/7ea104.wgsl
deleted file mode 100644
index 6250daa..0000000
--- a/test/intrinsics/gen/tan/7ea104.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn tan(vec<3, f32>) -> vec<3, f32>
-fn tan_7ea104() {
-  var res: vec3<f32> = tan(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  tan_7ea104();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  tan_7ea104();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  tan_7ea104();
-}
diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl b/test/intrinsics/gen/tan/8ce3e9.wgsl
deleted file mode 100644
index 85765f1..0000000
--- a/test/intrinsics/gen/tan/8ce3e9.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn tan(vec<2, f32>) -> vec<2, f32>
-fn tan_8ce3e9() {
-  var res: vec2<f32> = tan(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  tan_8ce3e9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  tan_8ce3e9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  tan_8ce3e9();
-}
diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl b/test/intrinsics/gen/tanh/5663c5.wgsl
deleted file mode 100644
index 96b2fdb..0000000
--- a/test/intrinsics/gen/tanh/5663c5.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn tanh(vec<4, f32>) -> vec<4, f32>
-fn tanh_5663c5() {
-  var res: vec4<f32> = tanh(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  tanh_5663c5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  tanh_5663c5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  tanh_5663c5();
-}
diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl b/test/intrinsics/gen/tanh/5724b3.wgsl
deleted file mode 100644
index c0f35098..0000000
--- a/test/intrinsics/gen/tanh/5724b3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn tanh(vec<2, f32>) -> vec<2, f32>
-fn tanh_5724b3() {
-  var res: vec2<f32> = tanh(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  tanh_5724b3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  tanh_5724b3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  tanh_5724b3();
-}
diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl b/test/intrinsics/gen/tanh/9f9fb9.wgsl
deleted file mode 100644
index e83ed57..0000000
--- a/test/intrinsics/gen/tanh/9f9fb9.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn tanh(vec<3, f32>) -> vec<3, f32>
-fn tanh_9f9fb9() {
-  var res: vec3<f32> = tanh(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  tanh_9f9fb9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  tanh_9f9fb9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  tanh_9f9fb9();
-}
diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl b/test/intrinsics/gen/tanh/c15fdb.wgsl
deleted file mode 100644
index 20c69fd..0000000
--- a/test/intrinsics/gen/tanh/c15fdb.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn tanh(f32) -> f32
-fn tanh_c15fdb() {
-  var res: f32 = tanh(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  tanh_c15fdb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  tanh_c15fdb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  tanh_c15fdb();
-}
diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl b/test/intrinsics/gen/textureDimensions/002b2a.wgsl
deleted file mode 100644
index 96f16b2..0000000
--- a/test/intrinsics/gen/textureDimensions/002b2a.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<f32>;
-
-// fn textureDimensions(texture: texture_1d<f32>) -> i32
-fn textureDimensions_002b2a() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_002b2a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_002b2a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_002b2a();
-}
diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl b/test/intrinsics/gen/textureDimensions/012b82.wgsl
deleted file mode 100644
index b1697be..0000000
--- a/test/intrinsics/gen/textureDimensions/012b82.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<r32sint, write>) -> vec2<i32>
-fn textureDimensions_012b82() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_012b82();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_012b82();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_012b82();
-}
diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl b/test/intrinsics/gen/textureDimensions/08753d.wgsl
deleted file mode 100644
index 05fcbdd..0000000
--- a/test/intrinsics/gen/textureDimensions/08753d.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba16sint, write>) -> i32
-fn textureDimensions_08753d() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_08753d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_08753d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_08753d();
-}
diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl b/test/intrinsics/gen/textureDimensions/0c4772.wgsl
deleted file mode 100644
index daad042..0000000
--- a/test/intrinsics/gen/textureDimensions/0c4772.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba16float, write>) -> vec3<i32>
-fn textureDimensions_0c4772() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0c4772();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_0c4772();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0c4772();
-}
diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl b/test/intrinsics/gen/textureDimensions/0cce40.wgsl
deleted file mode 100644
index a9ae133..0000000
--- a/test/intrinsics/gen/textureDimensions/0cce40.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<r32sint, write>) -> i32
-fn textureDimensions_0cce40() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0cce40();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_0cce40();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0cce40();
-}
diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl
deleted file mode 100644
index 1fef317..0000000
--- a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba16uint, write>) -> vec2<i32>
-fn textureDimensions_0cf2ff() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0cf2ff();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_0cf2ff();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0cf2ff();
-}
diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl
deleted file mode 100644
index 255f1ee..0000000
--- a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<r32uint, write>) -> vec2<i32>
-fn textureDimensions_0d8b7e() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0d8b7e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_0d8b7e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0d8b7e();
-}
diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl
deleted file mode 100644
index be5b433..0000000
--- a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba16uint, write>) -> vec3<i32>
-fn textureDimensions_0e32ee() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0e32ee();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_0e32ee();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0e32ee();
-}
diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl
deleted file mode 100644
index 2cc8fec..0000000
--- a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
-
-// fn textureDimensions(texture: texture_2d_array<i32>) -> vec2<i32>
-fn textureDimensions_0f3c50() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0f3c50();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_0f3c50();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0f3c50();
-}
diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl b/test/intrinsics/gen/textureDimensions/1191a5.wgsl
deleted file mode 100644
index 6b0382b..0000000
--- a/test/intrinsics/gen/textureDimensions/1191a5.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<u32>;
-
-// fn textureDimensions(texture: texture_2d<u32>) -> vec2<i32>
-fn textureDimensions_1191a5() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1191a5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_1191a5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1191a5();
-}
diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl
deleted file mode 100644
index b2fa3ef..0000000
--- a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-
-// fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
-fn textureDimensions_12c9bb() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_12c9bb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_12c9bb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_12c9bb();
-}
diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl b/test/intrinsics/gen/textureDimensions/147998.wgsl
deleted file mode 100644
index 41ebd81..0000000
--- a/test/intrinsics/gen/textureDimensions/147998.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rg32float, write>) -> vec2<i32>
-fn textureDimensions_147998() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_147998();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_147998();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_147998();
-}
diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl b/test/intrinsics/gen/textureDimensions/16036c.wgsl
deleted file mode 100644
index c231cc4..0000000
--- a/test/intrinsics/gen/textureDimensions/16036c.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba8sint, write>) -> vec2<i32>
-fn textureDimensions_16036c() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_16036c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_16036c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_16036c();
-}
diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl
deleted file mode 100644
index 558f3e3..0000000
--- a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba16sint, write>) -> vec3<i32>
-fn textureDimensions_1b71f0() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1b71f0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_1b71f0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1b71f0();
-}
diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl
deleted file mode 100644
index d2d2980..0000000
--- a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba8unorm, write>) -> vec2<i32>
-fn textureDimensions_1d6c26() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1d6c26();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_1d6c26();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1d6c26();
-}
diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl
deleted file mode 100644
index a30fbe0..0000000
--- a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba16float, write>) -> i32
-fn textureDimensions_1e9e39() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1e9e39();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_1e9e39();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1e9e39();
-}
diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl
deleted file mode 100644
index 0e49717..0000000
--- a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
-
-// fn textureDimensions(texture: texture_2d_array<u32>) -> vec2<i32>
-fn textureDimensions_1f20c5() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1f20c5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_1f20c5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1f20c5();
-}
diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl b/test/intrinsics/gen/textureDimensions/214dd4.wgsl
deleted file mode 100644
index 27c2d8a..0000000
--- a/test/intrinsics/gen/textureDimensions/214dd4.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba8sint, write>) -> vec3<i32>
-fn textureDimensions_214dd4() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_214dd4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_214dd4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_214dd4();
-}
diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl b/test/intrinsics/gen/textureDimensions/221f22.wgsl
deleted file mode 100644
index 70098d7..0000000
--- a/test/intrinsics/gen/textureDimensions/221f22.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec2<i32>
-fn textureDimensions_221f22() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_221f22();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_221f22();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_221f22();
-}
diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl b/test/intrinsics/gen/textureDimensions/267788.wgsl
deleted file mode 100644
index d431dc7..0000000
--- a/test/intrinsics/gen/textureDimensions/267788.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec2<i32>
-fn textureDimensions_267788() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_267788();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_267788();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_267788();
-}
diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl
deleted file mode 100644
index 4100047..0000000
--- a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-
-// fn textureDimensions(texture: texture_3d<f32>, level: i32) -> vec3<i32>
-fn textureDimensions_26bdfa() {
-  var res: vec3<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_26bdfa();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_26bdfa();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_26bdfa();
-}
diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl
deleted file mode 100644
index ec36468..0000000
--- a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba8uint, write>) -> vec2<i32>
-fn textureDimensions_26ef6c() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_26ef6c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_26ef6c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_26ef6c();
-}
diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl b/test/intrinsics/gen/textureDimensions/2ad087.wgsl
deleted file mode 100644
index 74ab99e..0000000
--- a/test/intrinsics/gen/textureDimensions/2ad087.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba16sint, write>) -> vec2<i32>
-fn textureDimensions_2ad087() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2ad087();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_2ad087();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2ad087();
-}
diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl b/test/intrinsics/gen/textureDimensions/2efa05.wgsl
deleted file mode 100644
index b5da206..0000000
--- a/test/intrinsics/gen/textureDimensions/2efa05.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<u32>;
-
-// fn textureDimensions(texture: texture_3d<u32>, level: i32) -> vec3<i32>
-fn textureDimensions_2efa05() {
-  var res: vec3<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2efa05();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_2efa05();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2efa05();
-}
diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl b/test/intrinsics/gen/textureDimensions/2f289f.wgsl
deleted file mode 100644
index 0ac6e35..0000000
--- a/test/intrinsics/gen/textureDimensions/2f289f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<r32sint, write>) -> vec3<i32>
-fn textureDimensions_2f289f() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2f289f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_2f289f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2f289f();
-}
diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl
deleted file mode 100644
index 0bd62a0..0000000
--- a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-
-// fn textureDimensions(texture: texture_2d<f32>, level: i32) -> vec2<i32>
-fn textureDimensions_2fe1cc() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2fe1cc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_2fe1cc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2fe1cc();
-}
diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl b/test/intrinsics/gen/textureDimensions/318ecc.wgsl
deleted file mode 100644
index 015839c..0000000
--- a/test/intrinsics/gen/textureDimensions/318ecc.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba16uint, write>) -> i32
-fn textureDimensions_318ecc() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_318ecc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_318ecc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_318ecc();
-}
diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl b/test/intrinsics/gen/textureDimensions/340d06.wgsl
deleted file mode 100644
index 71af9d0..0000000
--- a/test/intrinsics/gen/textureDimensions/340d06.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<r32uint, write>) -> vec3<i32>
-fn textureDimensions_340d06() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_340d06();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_340d06();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_340d06();
-}
diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl b/test/intrinsics/gen/textureDimensions/398e30.wgsl
deleted file mode 100644
index 0bdd487..0000000
--- a/test/intrinsics/gen/textureDimensions/398e30.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba32uint, write>) -> vec2<i32>
-fn textureDimensions_398e30() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_398e30();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_398e30();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_398e30();
-}
diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl
deleted file mode 100644
index eb60d1e..0000000
--- a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rg32uint, write>) -> vec2<i32>
-fn textureDimensions_3a94ea() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_3a94ea();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_3a94ea();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_3a94ea();
-}
diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl b/test/intrinsics/gen/textureDimensions/3aca08.wgsl
deleted file mode 100644
index 3d96944..0000000
--- a/test/intrinsics/gen/textureDimensions/3aca08.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba32float, write>) -> i32
-fn textureDimensions_3aca08() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_3aca08();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_3aca08();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_3aca08();
-}
diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl
deleted file mode 100644
index e3837a8..0000000
--- a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba8sint, write>) -> vec2<i32>
-fn textureDimensions_3c5ad8() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_3c5ad8();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_3c5ad8();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_3c5ad8();
-}
diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl b/test/intrinsics/gen/textureDimensions/4152a6.wgsl
deleted file mode 100644
index f13d3ce..0000000
--- a/test/intrinsics/gen/textureDimensions/4152a6.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
-
-// fn textureDimensions(texture: texture_cube_array<u32>) -> vec2<i32>
-fn textureDimensions_4152a6() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4152a6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_4152a6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4152a6();
-}
diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl b/test/intrinsics/gen/textureDimensions/423f99.wgsl
deleted file mode 100644
index d76008d..0000000
--- a/test/intrinsics/gen/textureDimensions/423f99.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<i32>;
-
-// fn textureDimensions(texture: texture_1d<i32>) -> i32
-fn textureDimensions_423f99() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_423f99();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_423f99();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_423f99();
-}
diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl b/test/intrinsics/gen/textureDimensions/4267ee.wgsl
deleted file mode 100644
index 77143ec..0000000
--- a/test/intrinsics/gen/textureDimensions/4267ee.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba32float, write>) -> vec2<i32>
-fn textureDimensions_4267ee() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4267ee();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_4267ee();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4267ee();
-}
diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl
deleted file mode 100644
index 8638394..0000000
--- a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba8unorm, write>) -> i32
-fn textureDimensions_42d4e6() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_42d4e6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_42d4e6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_42d4e6();
-}
diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl b/test/intrinsics/gen/textureDimensions/48cb89.wgsl
deleted file mode 100644
index 12414cd..0000000
--- a/test/intrinsics/gen/textureDimensions/48cb89.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba16float, write>) -> vec2<i32>
-fn textureDimensions_48cb89() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_48cb89();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_48cb89();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_48cb89();
-}
diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl b/test/intrinsics/gen/textureDimensions/49d274.wgsl
deleted file mode 100644
index b4569f0..0000000
--- a/test/intrinsics/gen/textureDimensions/49d274.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rg32sint, write>) -> vec2<i32>
-fn textureDimensions_49d274() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_49d274();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_49d274();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_49d274();
-}
diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl
deleted file mode 100644
index 5c8a80e..0000000
--- a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rg32uint, write>) -> i32
-fn textureDimensions_4df9a8() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4df9a8();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_4df9a8();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4df9a8();
-}
diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl
deleted file mode 100644
index ab5dab1..0000000
--- a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec2<i32>
-fn textureDimensions_50a9ee() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_50a9ee();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_50a9ee();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_50a9ee();
-}
diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl b/test/intrinsics/gen/textureDimensions/52045c.wgsl
deleted file mode 100644
index 25dfd9d..0000000
--- a/test/intrinsics/gen/textureDimensions/52045c.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<i32>;
-
-// fn textureDimensions(texture: texture_1d<i32>, level: i32) -> i32
-fn textureDimensions_52045c() {
-  var res: i32 = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_52045c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_52045c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_52045c();
-}
diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl b/test/intrinsics/gen/textureDimensions/55b23e.wgsl
deleted file mode 100644
index 182bd4f..0000000
--- a/test/intrinsics/gen/textureDimensions/55b23e.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rg32float, write>) -> i32
-fn textureDimensions_55b23e() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_55b23e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_55b23e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_55b23e();
-}
diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl b/test/intrinsics/gen/textureDimensions/579629.wgsl
deleted file mode 100644
index 3892c0a..0000000
--- a/test/intrinsics/gen/textureDimensions/579629.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_multisampled_2d<u32>;
-
-// fn textureDimensions(texture: texture_multisampled_2d<u32>) -> vec2<i32>
-fn textureDimensions_579629() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_579629();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_579629();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_579629();
-}
diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl b/test/intrinsics/gen/textureDimensions/57da0b.wgsl
deleted file mode 100644
index 92e1e1a..0000000
--- a/test/intrinsics/gen/textureDimensions/57da0b.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<r32uint, write>) -> i32
-fn textureDimensions_57da0b() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_57da0b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_57da0b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_57da0b();
-}
diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl b/test/intrinsics/gen/textureDimensions/57e28f.wgsl
deleted file mode 100644
index b0cf7cc..0000000
--- a/test/intrinsics/gen/textureDimensions/57e28f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube;
-
-// fn textureDimensions(texture: texture_depth_cube) -> vec2<i32>
-fn textureDimensions_57e28f() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_57e28f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_57e28f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_57e28f();
-}
diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl b/test/intrinsics/gen/textureDimensions/58a515.wgsl
deleted file mode 100644
index 9cbebcb..0000000
--- a/test/intrinsics/gen/textureDimensions/58a515.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba16float, write>) -> vec2<i32>
-fn textureDimensions_58a515() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_58a515();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_58a515();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_58a515();
-}
diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl b/test/intrinsics/gen/textureDimensions/5985f3.wgsl
deleted file mode 100644
index 9c37e5f..0000000
--- a/test/intrinsics/gen/textureDimensions/5985f3.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba32sint, write>) -> vec2<i32>
-fn textureDimensions_5985f3() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5985f3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_5985f3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5985f3();
-}
diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl
deleted file mode 100644
index 3701763..0000000
--- a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba32uint, write>) -> i32
-fn textureDimensions_5caa5e() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5caa5e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_5caa5e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5caa5e();
-}
diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl b/test/intrinsics/gen/textureDimensions/5e295d.wgsl
deleted file mode 100644
index 3e4cd1b..0000000
--- a/test/intrinsics/gen/textureDimensions/5e295d.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba16uint, write>) -> vec2<i32>
-fn textureDimensions_5e295d() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5e295d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_5e295d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5e295d();
-}
diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl b/test/intrinsics/gen/textureDimensions/60bf54.wgsl
deleted file mode 100644
index fd0c02b..0000000
--- a/test/intrinsics/gen/textureDimensions/60bf54.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rg32sint, write>) -> vec3<i32>
-fn textureDimensions_60bf54() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_60bf54();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_60bf54();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_60bf54();
-}
diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl
deleted file mode 100644
index 7cab4b8..0000000
--- a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rg32float, write>) -> vec3<i32>
-fn textureDimensions_63f3cf() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_63f3cf();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_63f3cf();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_63f3cf();
-}
diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl b/test/intrinsics/gen/textureDimensions/68105c.wgsl
deleted file mode 100644
index 9e15d77..0000000
--- a/test/intrinsics/gen/textureDimensions/68105c.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba32uint, write>) -> vec2<i32>
-fn textureDimensions_68105c() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_68105c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_68105c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_68105c();
-}
diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl b/test/intrinsics/gen/textureDimensions/686ef2.wgsl
deleted file mode 100644
index 6ed1d53..0000000
--- a/test/intrinsics/gen/textureDimensions/686ef2.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<i32>;
-
-// fn textureDimensions(texture: texture_cube<i32>, level: i32) -> vec2<i32>
-fn textureDimensions_686ef2() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_686ef2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_686ef2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_686ef2();
-}
diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl b/test/intrinsics/gen/textureDimensions/6adac6.wgsl
deleted file mode 100644
index f35d628..0000000
--- a/test/intrinsics/gen/textureDimensions/6adac6.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba32sint, write>) -> i32
-fn textureDimensions_6adac6() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6adac6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_6adac6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6adac6();
-}
diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl
deleted file mode 100644
index a8718fb..0000000
--- a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<u32>;
-
-// fn textureDimensions(texture: texture_3d<u32>) -> vec3<i32>
-fn textureDimensions_6ec1b4() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6ec1b4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_6ec1b4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6ec1b4();
-}
diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl
deleted file mode 100644
index 395a6e0..0000000
--- a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba8snorm, write>) -> vec2<i32>
-fn textureDimensions_6f0d79() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6f0d79();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_6f0d79();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6f0d79();
-}
diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl b/test/intrinsics/gen/textureDimensions/702c53.wgsl
deleted file mode 100644
index 401f1ea..0000000
--- a/test/intrinsics/gen/textureDimensions/702c53.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba8unorm, write>) -> vec2<i32>
-fn textureDimensions_702c53() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_702c53();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_702c53();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_702c53();
-}
diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl
deleted file mode 100644
index 309d93f..0000000
--- a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec2<i32>
-fn textureDimensions_72e5d6() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_72e5d6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_72e5d6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_72e5d6();
-}
diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl b/test/intrinsics/gen/textureDimensions/79df87.wgsl
deleted file mode 100644
index 4319d63..0000000
--- a/test/intrinsics/gen/textureDimensions/79df87.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<u32>;
-
-// fn textureDimensions(texture: texture_1d<u32>, level: i32) -> i32
-fn textureDimensions_79df87() {
-  var res: i32 = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_79df87();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_79df87();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_79df87();
-}
diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl b/test/intrinsics/gen/textureDimensions/7bf826.wgsl
deleted file mode 100644
index 5f5b47c..0000000
--- a/test/intrinsics/gen/textureDimensions/7bf826.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d_array;
-
-// fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
-fn textureDimensions_7bf826() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_7bf826();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_7bf826();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_7bf826();
-}
diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl
deleted file mode 100644
index f74769c..0000000
--- a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rg32sint, write>) -> vec2<i32>
-fn textureDimensions_7f5c2e() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_7f5c2e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_7f5c2e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_7f5c2e();
-}
diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl b/test/intrinsics/gen/textureDimensions/8028f3.wgsl
deleted file mode 100644
index ade160d..0000000
--- a/test/intrinsics/gen/textureDimensions/8028f3.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<r32float, write>) -> vec3<i32>
-fn textureDimensions_8028f3() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8028f3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_8028f3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8028f3();
-}
diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl b/test/intrinsics/gen/textureDimensions/811679.wgsl
deleted file mode 100644
index 70b9a6c..0000000
--- a/test/intrinsics/gen/textureDimensions/811679.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba32uint, write>) -> vec3<i32>
-fn textureDimensions_811679() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_811679();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_811679();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_811679();
-}
diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl b/test/intrinsics/gen/textureDimensions/820596.wgsl
deleted file mode 100644
index f17caf0..0000000
--- a/test/intrinsics/gen/textureDimensions/820596.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rg32uint, write>) -> vec3<i32>
-fn textureDimensions_820596() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_820596();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_820596();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_820596();
-}
diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl
deleted file mode 100644
index ff1a2bb..0000000
--- a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba32sint, write>) -> vec2<i32>
-fn textureDimensions_83ee5a() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_83ee5a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_83ee5a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_83ee5a();
-}
diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl b/test/intrinsics/gen/textureDimensions/85d556.wgsl
deleted file mode 100644
index 91d1ef8..0000000
--- a/test/intrinsics/gen/textureDimensions/85d556.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec2<i32>
-fn textureDimensions_85d556() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_85d556();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_85d556();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_85d556();
-}
diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl b/test/intrinsics/gen/textureDimensions/88ad17.wgsl
deleted file mode 100644
index 7d9e6a8..0000000
--- a/test/intrinsics/gen/textureDimensions/88ad17.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<u32>;
-
-// fn textureDimensions(texture: texture_cube<u32>, level: i32) -> vec2<i32>
-fn textureDimensions_88ad17() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_88ad17();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_88ad17();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_88ad17();
-}
diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl
deleted file mode 100644
index abe1be4..0000000
--- a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-
-// fn textureDimensions(texture: texture_3d<f32>) -> vec3<i32>
-fn textureDimensions_8aa4c4() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8aa4c4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_8aa4c4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8aa4c4();
-}
diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl
deleted file mode 100644
index 1e056c5..0000000
--- a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<i32>;
-
-// fn textureDimensions(texture: texture_3d<i32>) -> vec3<i32>
-fn textureDimensions_8deb5e() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8deb5e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_8deb5e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8deb5e();
-}
diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl
deleted file mode 100644
index 11b2d27..0000000
--- a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
-
-// fn textureDimensions(texture: texture_cube_array<f32>) -> vec2<i32>
-fn textureDimensions_8f20bf() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8f20bf();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_8f20bf();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8f20bf();
-}
diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl
deleted file mode 100644
index e86c393..0000000
--- a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba32float, write>) -> vec3<i32>
-fn textureDimensions_8fca0f() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8fca0f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_8fca0f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8fca0f();
-}
diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl b/test/intrinsics/gen/textureDimensions/90340b.wgsl
deleted file mode 100644
index 3528ecf..0000000
--- a/test/intrinsics/gen/textureDimensions/90340b.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube_array;
-
-// fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
-fn textureDimensions_90340b() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_90340b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_90340b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_90340b();
-}
diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl b/test/intrinsics/gen/textureDimensions/9042ab.wgsl
deleted file mode 100644
index 6a02da1..0000000
--- a/test/intrinsics/gen/textureDimensions/9042ab.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rg32uint, write>) -> vec2<i32>
-fn textureDimensions_9042ab() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9042ab();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_9042ab();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9042ab();
-}
diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl b/test/intrinsics/gen/textureDimensions/9393b0.wgsl
deleted file mode 100644
index 0ce4834..0000000
--- a/test/intrinsics/gen/textureDimensions/9393b0.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube;
-
-// fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
-fn textureDimensions_9393b0() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9393b0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_9393b0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9393b0();
-}
diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl b/test/intrinsics/gen/textureDimensions/939fdb.wgsl
deleted file mode 100644
index d29eec0..0000000
--- a/test/intrinsics/gen/textureDimensions/939fdb.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-
-// fn textureDimensions(texture: texture_depth_2d) -> vec2<i32>
-fn textureDimensions_939fdb() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_939fdb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_939fdb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_939fdb();
-}
diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl b/test/intrinsics/gen/textureDimensions/962dcd.wgsl
deleted file mode 100644
index 8831eb6..0000000
--- a/test/intrinsics/gen/textureDimensions/962dcd.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<i32>;
-
-// fn textureDimensions(texture: texture_cube<i32>) -> vec2<i32>
-fn textureDimensions_962dcd() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_962dcd();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_962dcd();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_962dcd();
-}
diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl
deleted file mode 100644
index 463f897..0000000
--- a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba32float, write>) -> vec2<i32>
-fn textureDimensions_9abfe5() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9abfe5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_9abfe5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9abfe5();
-}
diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl
deleted file mode 100644
index 62bdec3..0000000
--- a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec2<i32>
-fn textureDimensions_9c9c57() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9c9c57();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_9c9c57();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9c9c57();
-}
diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl
deleted file mode 100644
index 6c82fcc..0000000
--- a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba8sint, write>) -> i32
-fn textureDimensions_9da9e2() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9da9e2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_9da9e2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9da9e2();
-}
diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl
deleted file mode 100644
index 09afe70..0000000
--- a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<r32uint, write>) -> vec2<i32>
-fn textureDimensions_9eb8d8() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9eb8d8();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_9eb8d8();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9eb8d8();
-}
diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl
deleted file mode 100644
index 1892e82..0000000
--- a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-
-// fn textureDimensions(texture: texture_2d<f32>) -> vec2<i32>
-fn textureDimensions_9f8e46() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9f8e46();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_9f8e46();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9f8e46();
-}
diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl b/test/intrinsics/gen/textureDimensions/a01845.wgsl
deleted file mode 100644
index 3b7b193..0000000
--- a/test/intrinsics/gen/textureDimensions/a01845.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec2<i32>
-fn textureDimensions_a01845() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a01845();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_a01845();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a01845();
-}
diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl b/test/intrinsics/gen/textureDimensions/a7d565.wgsl
deleted file mode 100644
index 88779cb..0000000
--- a/test/intrinsics/gen/textureDimensions/a7d565.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<u32>;
-
-// fn textureDimensions(texture: texture_1d<u32>) -> i32
-fn textureDimensions_a7d565() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a7d565();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_a7d565();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a7d565();
-}
diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl b/test/intrinsics/gen/textureDimensions/a863f2.wgsl
deleted file mode 100644
index 61b668c..0000000
--- a/test/intrinsics/gen/textureDimensions/a863f2.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<r32float, write>) -> i32
-fn textureDimensions_a863f2() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a863f2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_a863f2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a863f2();
-}
diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl
deleted file mode 100644
index e10dcd1..0000000
--- a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<f32>;
-
-// fn textureDimensions(texture: texture_cube<f32>, level: i32) -> vec2<i32>
-fn textureDimensions_a9c9c1() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a9c9c1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_a9c9c1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a9c9c1();
-}
diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl
deleted file mode 100644
index a1cc174..0000000
--- a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<i32>;
-
-// fn textureDimensions(texture: texture_2d<i32>, level: i32) -> vec2<i32>
-fn textureDimensions_b0e16d() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b0e16d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_b0e16d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b0e16d();
-}
diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl b/test/intrinsics/gen/textureDimensions/b3c954.wgsl
deleted file mode 100644
index bdd8173..0000000
--- a/test/intrinsics/gen/textureDimensions/b3c954.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<u32>;
-
-// fn textureDimensions(texture: texture_cube<u32>) -> vec2<i32>
-fn textureDimensions_b3c954() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b3c954();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_b3c954();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b3c954();
-}
diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl b/test/intrinsics/gen/textureDimensions/b3e407.wgsl
deleted file mode 100644
index 8c7d95c..0000000
--- a/test/intrinsics/gen/textureDimensions/b3e407.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<f32>;
-
-// fn textureDimensions(texture: texture_1d<f32>, level: i32) -> i32
-fn textureDimensions_b3e407() {
-  var res: i32 = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b3e407();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_b3e407();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b3e407();
-}
diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl b/test/intrinsics/gen/textureDimensions/b91240.wgsl
deleted file mode 100644
index baf2591..0000000
--- a/test/intrinsics/gen/textureDimensions/b91240.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba8snorm, write>) -> vec2<i32>
-fn textureDimensions_b91240() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b91240();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_b91240();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b91240();
-}
diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl b/test/intrinsics/gen/textureDimensions/ba1481.wgsl
deleted file mode 100644
index c372ea1..0000000
--- a/test/intrinsics/gen/textureDimensions/ba1481.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_external;
-
-// fn textureDimensions(texture: texture_external) -> vec2<i32>
-fn textureDimensions_ba1481() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_ba1481();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_ba1481();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_ba1481();
-}
diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl
deleted file mode 100644
index 5519317..0000000
--- a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba32sint, write>) -> vec3<i32>
-fn textureDimensions_bb3dde() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_bb3dde();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_bb3dde();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_bb3dde();
-}
diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl b/test/intrinsics/gen/textureDimensions/c30e75.wgsl
deleted file mode 100644
index 275a7ca..0000000
--- a/test/intrinsics/gen/textureDimensions/c30e75.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<r32sint, write>) -> vec2<i32>
-fn textureDimensions_c30e75() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_c30e75();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_c30e75();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_c30e75();
-}
diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl b/test/intrinsics/gen/textureDimensions/c7943d.wgsl
deleted file mode 100644
index 98ad655..0000000
--- a/test/intrinsics/gen/textureDimensions/c7943d.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba8uint, write>) -> vec2<i32>
-fn textureDimensions_c7943d() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_c7943d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_c7943d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_c7943d();
-}
diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl b/test/intrinsics/gen/textureDimensions/cc968c.wgsl
deleted file mode 100644
index 2c32bb9..0000000
--- a/test/intrinsics/gen/textureDimensions/cc968c.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rg32sint, write>) -> i32
-fn textureDimensions_cc968c() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cc968c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_cc968c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cc968c();
-}
diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl
deleted file mode 100644
index 71072cc..0000000
--- a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba8snorm, write>) -> i32
-fn textureDimensions_cccc8f() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cccc8f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_cccc8f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cccc8f();
-}
diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl
deleted file mode 100644
index 79da9f1..0000000
--- a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba8unorm, write>) -> vec3<i32>
-fn textureDimensions_cd76a7() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cd76a7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_cd76a7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cd76a7();
-}
diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl b/test/intrinsics/gen/textureDimensions/cdf473.wgsl
deleted file mode 100644
index 25ceca3..0000000
--- a/test/intrinsics/gen/textureDimensions/cdf473.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba16sint, write>) -> vec2<i32>
-fn textureDimensions_cdf473() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cdf473();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_cdf473();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cdf473();
-}
diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl b/test/intrinsics/gen/textureDimensions/cec841.wgsl
deleted file mode 100644
index 0710769..0000000
--- a/test/intrinsics/gen/textureDimensions/cec841.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
-
-// fn textureDimensions(texture: texture_2d_array<f32>) -> vec2<i32>
-fn textureDimensions_cec841() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cec841();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_cec841();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cec841();
-}
diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl
deleted file mode 100644
index 2768cce..0000000
--- a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba8snorm, write>) -> vec3<i32>
-fn textureDimensions_cf7e43() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cf7e43();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_cf7e43();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cf7e43();
-}
diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl b/test/intrinsics/gen/textureDimensions/d125bc.wgsl
deleted file mode 100644
index e380cb2..0000000
--- a/test/intrinsics/gen/textureDimensions/d125bc.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<f32>;
-
-// fn textureDimensions(texture: texture_cube<f32>) -> vec2<i32>
-fn textureDimensions_d125bc() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_d125bc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_d125bc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_d125bc();
-}
diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl b/test/intrinsics/gen/textureDimensions/d83c45.wgsl
deleted file mode 100644
index feec4d5..0000000
--- a/test/intrinsics/gen/textureDimensions/d83c45.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec2<i32>
-fn textureDimensions_d83c45() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_d83c45();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_d83c45();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_d83c45();
-}
diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl
deleted file mode 100644
index 5fe4ee1..0000000
--- a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_multisampled_2d<i32>;
-
-// fn textureDimensions(texture: texture_multisampled_2d<i32>) -> vec2<i32>
-fn textureDimensions_daf7c0() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_daf7c0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_daf7c0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_daf7c0();
-}
diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl
deleted file mode 100644
index d9da1be..0000000
--- a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba8uint, write>) -> i32
-fn textureDimensions_dc2dd0() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_dc2dd0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_dc2dd0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_dc2dd0();
-}
diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl b/test/intrinsics/gen/textureDimensions/e927be.wgsl
deleted file mode 100644
index 38da82e..0000000
--- a/test/intrinsics/gen/textureDimensions/e927be.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
-
-// fn textureDimensions(texture: texture_cube_array<i32>) -> vec2<i32>
-fn textureDimensions_e927be() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_e927be();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_e927be();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_e927be();
-}
diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl
deleted file mode 100644
index e2ae8ec..0000000
--- a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<r32float, write>) -> vec2<i32>
-fn textureDimensions_e9e96c() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_e9e96c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_e9e96c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_e9e96c();
-}
diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl
deleted file mode 100644
index 80750e3..0000000
--- a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_multisampled_2d<f32>;
-
-// fn textureDimensions(texture: texture_multisampled_2d<f32>) -> vec2<i32>
-fn textureDimensions_ef5b89() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_ef5b89();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_ef5b89();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_ef5b89();
-}
diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl
deleted file mode 100644
index b7dc738..0000000
--- a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<i32>;
-
-// fn textureDimensions(texture: texture_3d<i32>, level: i32) -> vec3<i32>
-fn textureDimensions_efc8a4() {
-  var res: vec3<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_efc8a4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_efc8a4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_efc8a4();
-}
diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl
deleted file mode 100644
index 13edf77..0000000
--- a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d;
-
-// fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
-fn textureDimensions_f60bdb() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f60bdb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_f60bdb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f60bdb();
-}
diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl b/test/intrinsics/gen/textureDimensions/f7145b.wgsl
deleted file mode 100644
index f8da7e1..0000000
--- a/test/intrinsics/gen/textureDimensions/f7145b.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<u32>;
-
-// fn textureDimensions(texture: texture_2d<u32>, level: i32) -> vec2<i32>
-fn textureDimensions_f7145b() {
-  var res: vec2<i32> = textureDimensions(arg_0, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f7145b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_f7145b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f7145b();
-}
diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl b/test/intrinsics/gen/textureDimensions/f931c7.wgsl
deleted file mode 100644
index aa29d97..0000000
--- a/test/intrinsics/gen/textureDimensions/f931c7.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<r32float, write>) -> vec2<i32>
-fn textureDimensions_f931c7() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f931c7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_f931c7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f931c7();
-}
diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl b/test/intrinsics/gen/textureDimensions/fa9859.wgsl
deleted file mode 100644
index b6a1a04..0000000
--- a/test/intrinsics/gen/textureDimensions/fa9859.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<i32>;
-
-// fn textureDimensions(texture: texture_2d<i32>) -> vec2<i32>
-fn textureDimensions_fa9859() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fa9859();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_fa9859();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fa9859();
-}
diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl b/test/intrinsics/gen/textureDimensions/fb5670.wgsl
deleted file mode 100644
index 5151597..0000000
--- a/test/intrinsics/gen/textureDimensions/fb5670.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rg32float, write>) -> vec2<i32>
-fn textureDimensions_fb5670() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fb5670();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_fb5670();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fb5670();
-}
diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl b/test/intrinsics/gen/textureDimensions/fcac78.wgsl
deleted file mode 100644
index 6a3c215..0000000
--- a/test/intrinsics/gen/textureDimensions/fcac78.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba8uint, write>) -> vec3<i32>
-fn textureDimensions_fcac78() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fcac78();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureDimensions_fcac78();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fcac78();
-}
diff --git a/test/intrinsics/gen/textureGather/01305f.wgsl b/test/intrinsics/gen/textureGather/01305f.wgsl
deleted file mode 100644
index 55af300..0000000
--- a/test/intrinsics/gen/textureGather/01305f.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<u32>
-fn textureGather_01305f() {
-  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_01305f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_01305f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_01305f();
-}
diff --git a/test/intrinsics/gen/textureGather/06030a.wgsl b/test/intrinsics/gen/textureGather/06030a.wgsl
deleted file mode 100644
index 3ae4106..0000000
--- a/test/intrinsics/gen/textureGather/06030a.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32>
-fn textureGather_06030a() {
-  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_06030a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_06030a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_06030a();
-}
diff --git a/test/intrinsics/gen/textureGather/10c554.wgsl b/test/intrinsics/gen/textureGather/10c554.wgsl
deleted file mode 100644
index 7abaa7f..0000000
--- a/test/intrinsics/gen/textureGather/10c554.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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 textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
-fn textureGather_10c554() {
-  var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_10c554();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_10c554();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_10c554();
-}
diff --git a/test/intrinsics/gen/textureGather/15d79c.wgsl b/test/intrinsics/gen/textureGather/15d79c.wgsl
deleted file mode 100644
index 47bc2da..0000000
--- a/test/intrinsics/gen/textureGather/15d79c.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
-fn textureGather_15d79c() {
-  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_15d79c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_15d79c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_15d79c();
-}
diff --git a/test/intrinsics/gen/textureGather/2e0ed5.wgsl b/test/intrinsics/gen/textureGather/2e0ed5.wgsl
deleted file mode 100644
index ff561c9..0000000
--- a/test/intrinsics/gen/textureGather/2e0ed5.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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 textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
-fn textureGather_2e0ed5() {
-  var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_2e0ed5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_2e0ed5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_2e0ed5();
-}
diff --git a/test/intrinsics/gen/textureGather/3112e8.wgsl b/test/intrinsics/gen/textureGather/3112e8.wgsl
deleted file mode 100644
index a08ae70..0000000
--- a/test/intrinsics/gen/textureGather/3112e8.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
-fn textureGather_3112e8() {
-  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_3112e8();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_3112e8();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_3112e8();
-}
diff --git a/test/intrinsics/gen/textureGather/3c527e.wgsl b/test/intrinsics/gen/textureGather/3c527e.wgsl
deleted file mode 100644
index f6f8f67..0000000
--- a/test/intrinsics/gen/textureGather/3c527e.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<u32>
-fn textureGather_3c527e() {
-  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_3c527e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_3c527e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_3c527e();
-}
diff --git a/test/intrinsics/gen/textureGather/43025d.wgsl b/test/intrinsics/gen/textureGather/43025d.wgsl
deleted file mode 100644
index 2cf28ef..0000000
--- a/test/intrinsics/gen/textureGather/43025d.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec4<f32>
-fn textureGather_43025d() {
-  var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_43025d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_43025d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_43025d();
-}
diff --git a/test/intrinsics/gen/textureGather/4f2350.wgsl b/test/intrinsics/gen/textureGather/4f2350.wgsl
deleted file mode 100644
index 6945968..0000000
--- a/test/intrinsics/gen/textureGather/4f2350.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<i32>
-fn textureGather_4f2350() {
-  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_4f2350();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_4f2350();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_4f2350();
-}
diff --git a/test/intrinsics/gen/textureGather/51cf0b.wgsl b/test/intrinsics/gen/textureGather/51cf0b.wgsl
deleted file mode 100644
index 6e503ce..0000000
--- a/test/intrinsics/gen/textureGather/51cf0b.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<i32>
-fn textureGather_51cf0b() {
-  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_51cf0b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_51cf0b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_51cf0b();
-}
diff --git a/test/intrinsics/gen/textureGather/53ece6.wgsl b/test/intrinsics/gen/textureGather/53ece6.wgsl
deleted file mode 100644
index 045f2ba..0000000
--- a/test/intrinsics/gen/textureGather/53ece6.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, offset: vec2<i32>) -> vec4<f32>
-fn textureGather_53ece6() {
-  var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_53ece6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_53ece6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_53ece6();
-}
diff --git a/test/intrinsics/gen/textureGather/57bfc6.wgsl b/test/intrinsics/gen/textureGather/57bfc6.wgsl
deleted file mode 100644
index daf1cc0..0000000
--- a/test/intrinsics/gen/textureGather/57bfc6.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
-fn textureGather_57bfc6() {
-  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_57bfc6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_57bfc6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_57bfc6();
-}
diff --git a/test/intrinsics/gen/textureGather/587ba3.wgsl b/test/intrinsics/gen/textureGather/587ba3.wgsl
deleted file mode 100644
index 5bc617c..0000000
--- a/test/intrinsics/gen/textureGather/587ba3.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>) -> vec4<i32>
-fn textureGather_587ba3() {
-  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_587ba3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_587ba3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_587ba3();
-}
diff --git a/test/intrinsics/gen/textureGather/69e0fb.wgsl b/test/intrinsics/gen/textureGather/69e0fb.wgsl
deleted file mode 100644
index 3d4a9fa..0000000
--- a/test/intrinsics/gen/textureGather/69e0fb.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<i32>
-fn textureGather_69e0fb() {
-  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_69e0fb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_69e0fb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_69e0fb();
-}
diff --git a/test/intrinsics/gen/textureGather/93003d.wgsl b/test/intrinsics/gen/textureGather/93003d.wgsl
deleted file mode 100644
index c194b51..0000000
--- a/test/intrinsics/gen/textureGather/93003d.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<u32>
-fn textureGather_93003d() {
-  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_93003d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_93003d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_93003d();
-}
diff --git a/test/intrinsics/gen/textureGather/9a6358.wgsl b/test/intrinsics/gen/textureGather/9a6358.wgsl
deleted file mode 100644
index 0aff04c..0000000
--- a/test/intrinsics/gen/textureGather/9a6358.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec4<f32>
-fn textureGather_9a6358() {
-  var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_9a6358();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_9a6358();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_9a6358();
-}
diff --git a/test/intrinsics/gen/textureGather/9efca2.wgsl b/test/intrinsics/gen/textureGather/9efca2.wgsl
deleted file mode 100644
index d1fd63f..0000000
--- a/test/intrinsics/gen/textureGather/9efca2.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
-fn textureGather_9efca2() {
-  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_9efca2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_9efca2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_9efca2();
-}
diff --git a/test/intrinsics/gen/textureGather/bd0b1e.wgsl b/test/intrinsics/gen/textureGather/bd0b1e.wgsl
deleted file mode 100644
index e7bf959..0000000
--- a/test/intrinsics/gen/textureGather/bd0b1e.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
-fn textureGather_bd0b1e() {
-  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_bd0b1e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_bd0b1e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_bd0b1e();
-}
diff --git a/test/intrinsics/gen/textureGather/c409ae.wgsl b/test/intrinsics/gen/textureGather/c409ae.wgsl
deleted file mode 100644
index 8778bb7..0000000
--- a/test/intrinsics/gen/textureGather/c409ae.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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 textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
-fn textureGather_c409ae() {
-  var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_c409ae();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_c409ae();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_c409ae();
-}
diff --git a/test/intrinsics/gen/textureGather/c55822.wgsl b/test/intrinsics/gen/textureGather/c55822.wgsl
deleted file mode 100644
index 9cedd59..0000000
--- a/test/intrinsics/gen/textureGather/c55822.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<i32>
-fn textureGather_c55822() {
-  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_c55822();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_c55822();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_c55822();
-}
diff --git a/test/intrinsics/gen/textureGather/e1b67d.wgsl b/test/intrinsics/gen/textureGather/e1b67d.wgsl
deleted file mode 100644
index ac8f15a..0000000
--- a/test/intrinsics/gen/textureGather/e1b67d.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32>
-fn textureGather_e1b67d() {
-  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_e1b67d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_e1b67d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_e1b67d();
-}
diff --git a/test/intrinsics/gen/textureGather/e9eff6.wgsl b/test/intrinsics/gen/textureGather/e9eff6.wgsl
deleted file mode 100644
index b0477f9..0000000
--- a/test/intrinsics/gen/textureGather/e9eff6.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>) -> vec4<u32>
-fn textureGather_e9eff6() {
-  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_e9eff6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_e9eff6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_e9eff6();
-}
diff --git a/test/intrinsics/gen/textureGather/f5f3ba.wgsl b/test/intrinsics/gen/textureGather/f5f3ba.wgsl
deleted file mode 100644
index f263256..0000000
--- a/test/intrinsics/gen/textureGather/f5f3ba.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<u32>
-fn textureGather_f5f3ba() {
-  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_f5f3ba();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_f5f3ba();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_f5f3ba();
-}
diff --git a/test/intrinsics/gen/textureGather/f7995a.wgsl b/test/intrinsics/gen/textureGather/f7995a.wgsl
deleted file mode 100644
index 19c42fc..0000000
--- a/test/intrinsics/gen/textureGather/f7995a.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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(component: i32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32>
-fn textureGather_f7995a() {
-  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGather_f7995a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGather_f7995a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGather_f7995a();
-}
diff --git a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl b/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl
deleted file mode 100644
index afaaa84..0000000
--- a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube;
-@group(1) @binding(1) var arg_1: sampler_comparison;
-
-// fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32>
-fn textureGatherCompare_182fd4() {
-  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGatherCompare_182fd4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGatherCompare_182fd4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGatherCompare_182fd4();
-}
diff --git a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl b/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl
deleted file mode 100644
index 53ed423..0000000
--- a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, depth_ref: f32) -> vec4<f32>
-fn textureGatherCompare_60d2d1() {
-  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGatherCompare_60d2d1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGatherCompare_60d2d1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGatherCompare_60d2d1();
-}
diff --git a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl b/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl
deleted file mode 100644
index 5a577ba..0000000
--- a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-@group(1) @binding(1) var arg_1: sampler_comparison;
-
-// fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32>
-fn textureGatherCompare_6d9352() {
-  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGatherCompare_6d9352();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGatherCompare_6d9352();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGatherCompare_6d9352();
-}
diff --git a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl b/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl
deleted file mode 100644
index c71a699..0000000
--- a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, depth_ref: f32, offset: vec2<i32>) -> vec4<f32>
-fn textureGatherCompare_6f1267() {
-  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGatherCompare_6f1267();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGatherCompare_6f1267();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGatherCompare_6f1267();
-}
diff --git a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl b/test/intrinsics/gen/textureGatherCompare/783e65.wgsl
deleted file mode 100644
index 8bd4779..0000000
--- a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, depth_ref: f32) -> vec4<f32>
-fn textureGatherCompare_783e65() {
-  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGatherCompare_783e65();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGatherCompare_783e65();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGatherCompare_783e65();
-}
diff --git a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl b/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl
deleted file mode 100644
index b8a2718..0000000
--- a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-@group(1) @binding(1) var arg_1: sampler_comparison;
-
-// fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> vec4<f32>
-fn textureGatherCompare_a5f587() {
-  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureGatherCompare_a5f587();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureGatherCompare_a5f587();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureGatherCompare_a5f587();
-}
diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl b/test/intrinsics/gen/textureLoad/19cf87.wgsl
deleted file mode 100644
index 609ce46..0000000
--- a/test/intrinsics/gen/textureLoad/19cf87.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-
-// fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32
-fn textureLoad_19cf87() {
-  var res: f32 = textureLoad(arg_0, vec2<i32>(), 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_19cf87();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_19cf87();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_19cf87();
-}
diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl b/test/intrinsics/gen/textureLoad/1b8588.wgsl
deleted file mode 100644
index 80a4cae..0000000
--- a/test/intrinsics/gen/textureLoad/1b8588.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<u32>;
-
-// fn textureLoad(texture: texture_1d<u32>, coords: i32, level: i32) -> vec4<u32>
-fn textureLoad_1b8588() {
-  var res: vec4<u32> = textureLoad(arg_0, 1, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_1b8588();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_1b8588();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_1b8588();
-}
diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl b/test/intrinsics/gen/textureLoad/1f2016.wgsl
deleted file mode 100644
index 9e3a286..0000000
--- a/test/intrinsics/gen/textureLoad/1f2016.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-
-// fn textureLoad(texture: texture_3d<f32>, coords: vec3<i32>, level: i32) -> vec4<f32>
-fn textureLoad_1f2016() {
-  var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(), 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_1f2016();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_1f2016();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_1f2016();
-}
diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl b/test/intrinsics/gen/textureLoad/484344.wgsl
deleted file mode 100644
index 920d8e0..0000000
--- a/test/intrinsics/gen/textureLoad/484344.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-
-// fn textureLoad(texture: texture_2d<f32>, coords: vec2<i32>, level: i32) -> vec4<f32>
-fn textureLoad_484344() {
-  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_484344();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_484344();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_484344();
-}
diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl b/test/intrinsics/gen/textureLoad/4fd803.wgsl
deleted file mode 100644
index d309c2b..0000000
--- a/test/intrinsics/gen/textureLoad/4fd803.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<i32>;
-
-// fn textureLoad(texture: texture_3d<i32>, coords: vec3<i32>, level: i32) -> vec4<i32>
-fn textureLoad_4fd803() {
-  var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(), 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_4fd803();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_4fd803();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_4fd803();
-}
diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl
deleted file mode 100644
index 5f19cb5..0000000
--- a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<i32>;
-
-// fn textureLoad(texture: texture_1d<i32>, coords: i32, level: i32) -> vec4<i32>
-fn textureLoad_5a2f9d() {
-  var res: vec4<i32> = textureLoad(arg_0, 1, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_5a2f9d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_5a2f9d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_5a2f9d();
-}
diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl b/test/intrinsics/gen/textureLoad/6154d4.wgsl
deleted file mode 100644
index ba6d633..0000000
--- a/test/intrinsics/gen/textureLoad/6154d4.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<u32>;
-
-// fn textureLoad(texture: texture_2d<u32>, coords: vec2<i32>, level: i32) -> vec4<u32>
-fn textureLoad_6154d4() {
-  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_6154d4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_6154d4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_6154d4();
-}
diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl b/test/intrinsics/gen/textureLoad/6273b1.wgsl
deleted file mode 100644
index 944e5a3..0000000
--- a/test/intrinsics/gen/textureLoad/6273b1.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, sample_index: i32) -> f32
-fn textureLoad_6273b1() {
-  var res: f32 = textureLoad(arg_0, vec2<i32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_6273b1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_6273b1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_6273b1();
-}
diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl b/test/intrinsics/gen/textureLoad/79e697.wgsl
deleted file mode 100644
index 4ed308e..0000000
--- a/test/intrinsics/gen/textureLoad/79e697.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, array_index: i32, level: i32) -> vec4<i32>
-fn textureLoad_79e697() {
-  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_79e697();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_79e697();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_79e697();
-}
diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl b/test/intrinsics/gen/textureLoad/7c90e5.wgsl
deleted file mode 100644
index 29da0dc..0000000
--- a/test/intrinsics/gen/textureLoad/7c90e5.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, array_index: i32, level: i32) -> vec4<u32>
-fn textureLoad_7c90e5() {
-  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_7c90e5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_7c90e5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_7c90e5();
-}
diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl b/test/intrinsics/gen/textureLoad/81c381.wgsl
deleted file mode 100644
index dccf1b8..0000000
--- a/test/intrinsics/gen/textureLoad/81c381.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<f32>;
-
-// fn textureLoad(texture: texture_1d<f32>, coords: i32, level: i32) -> vec4<f32>
-fn textureLoad_81c381() {
-  var res: vec4<f32> = textureLoad(arg_0, 1, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_81c381();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_81c381();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_81c381();
-}
diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl b/test/intrinsics/gen/textureLoad/87be85.wgsl
deleted file mode 100644
index b1124d7..0000000
--- a/test/intrinsics/gen/textureLoad/87be85.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, array_index: i32, level: i32) -> vec4<f32>
-fn textureLoad_87be85() {
-  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_87be85();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_87be85();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_87be85();
-}
diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl b/test/intrinsics/gen/textureLoad/8acf41.wgsl
deleted file mode 100644
index effdecd..0000000
--- a/test/intrinsics/gen/textureLoad/8acf41.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_external;
-
-// fn textureLoad(texture: texture_external, coords: vec2<i32>) -> vec4<f32>
-fn textureLoad_8acf41() {
-  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_8acf41();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_8acf41();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_8acf41();
-}
diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl b/test/intrinsics/gen/textureLoad/9b2667.wgsl
deleted file mode 100644
index 4372cdb..0000000
--- a/test/intrinsics/gen/textureLoad/9b2667.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, array_index: i32, level: i32) -> f32
-fn textureLoad_9b2667() {
-  var res: f32 = textureLoad(arg_0, vec2<i32>(), 1, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_9b2667();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_9b2667();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_9b2667();
-}
diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl b/test/intrinsics/gen/textureLoad/a583c9.wgsl
deleted file mode 100644
index 5f67c51..0000000
--- a/test/intrinsics/gen/textureLoad/a583c9.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, sample_index: i32) -> vec4<f32>
-fn textureLoad_a583c9() {
-  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_a583c9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_a583c9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_a583c9();
-}
diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl
deleted file mode 100644
index 236927b..0000000
--- a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<u32>;
-
-// fn textureLoad(texture: texture_3d<u32>, coords: vec3<i32>, level: i32) -> vec4<u32>
-fn textureLoad_a9a9f5() {
-  var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(), 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_a9a9f5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_a9a9f5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_a9a9f5();
-}
diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl b/test/intrinsics/gen/textureLoad/c2a480.wgsl
deleted file mode 100644
index 6aa17f7..0000000
--- a/test/intrinsics/gen/textureLoad/c2a480.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<i32>;
-
-// fn textureLoad(texture: texture_2d<i32>, coords: vec2<i32>, level: i32) -> vec4<i32>
-fn textureLoad_c2a480() {
-  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_c2a480();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_c2a480();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_c2a480();
-}
diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl b/test/intrinsics/gen/textureLoad/c378ee.wgsl
deleted file mode 100644
index 2ddc52a..0000000
--- a/test/intrinsics/gen/textureLoad/c378ee.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, sample_index: i32) -> vec4<u32>
-fn textureLoad_c378ee() {
-  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_c378ee();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_c378ee();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_c378ee();
-}
diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl
deleted file mode 100644
index 65b9d17..0000000
--- a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, sample_index: i32) -> vec4<i32>
-fn textureLoad_e3d2cc() {
-  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureLoad_e3d2cc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureLoad_e3d2cc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureLoad_e3d2cc();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl b/test/intrinsics/gen/textureNumLayers/024820.wgsl
deleted file mode 100644
index e0ad9de..0000000
--- a/test/intrinsics/gen/textureNumLayers/024820.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
-
-// fn textureNumLayers(texture: texture_2d_array<f32>) -> i32
-fn textureNumLayers_024820() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_024820();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_024820();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_024820();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl b/test/intrinsics/gen/textureNumLayers/053df7.wgsl
deleted file mode 100644
index dcb5cf3..0000000
--- a/test/intrinsics/gen/textureNumLayers/053df7.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
-
-// fn textureNumLayers(texture: texture_cube_array<u32>) -> i32
-fn textureNumLayers_053df7() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_053df7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_053df7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_053df7();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl
deleted file mode 100644
index 1897559..0000000
--- a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rg32sint, write>) -> i32
-fn textureNumLayers_058cc3() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_058cc3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_058cc3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_058cc3();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl
deleted file mode 100644
index e39514f..0000000
--- a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rgba8unorm, write>) -> i32
-fn textureNumLayers_09d05d() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_09d05d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_09d05d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_09d05d();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl
deleted file mode 100644
index f6361f1..0000000
--- a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rgba32sint, write>) -> i32
-fn textureNumLayers_13b4ce() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_13b4ce();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_13b4ce();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_13b4ce();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl
deleted file mode 100644
index c9101c0..0000000
--- a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<r32sint, write>) -> i32
-fn textureNumLayers_22e53b() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_22e53b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_22e53b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_22e53b();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl b/test/intrinsics/gen/textureNumLayers/562013.wgsl
deleted file mode 100644
index 18c77ad..0000000
--- a/test/intrinsics/gen/textureNumLayers/562013.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rgba16float, write>) -> i32
-fn textureNumLayers_562013() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_562013();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_562013();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_562013();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl
deleted file mode 100644
index 2a0f4de..0000000
--- a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
-
-// fn textureNumLayers(texture: texture_cube_array<f32>) -> i32
-fn textureNumLayers_5d59cd() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_5d59cd();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_5d59cd();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_5d59cd();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl
deleted file mode 100644
index f551fc2..0000000
--- a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rgba32float, write>) -> i32
-fn textureNumLayers_68a65b() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_68a65b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_68a65b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_68a65b();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl
deleted file mode 100644
index ec88c84..0000000
--- a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube_array;
-
-// fn textureNumLayers(texture: texture_depth_cube_array) -> i32
-fn textureNumLayers_778bd1() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_778bd1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_778bd1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_778bd1();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl
deleted file mode 100644
index 7652201..0000000
--- a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rg32float, write>) -> i32
-fn textureNumLayers_7f1937() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_7f1937();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_7f1937();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_7f1937();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl b/test/intrinsics/gen/textureNumLayers/85f980.wgsl
deleted file mode 100644
index c91c09d..0000000
--- a/test/intrinsics/gen/textureNumLayers/85f980.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
-
-// fn textureNumLayers(texture: texture_cube_array<i32>) -> i32
-fn textureNumLayers_85f980() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_85f980();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_85f980();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_85f980();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl b/test/intrinsics/gen/textureNumLayers/87953e.wgsl
deleted file mode 100644
index d4b3e5a..0000000
--- a/test/intrinsics/gen/textureNumLayers/87953e.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
-
-// fn textureNumLayers(texture: texture_2d_array<u32>) -> i32
-fn textureNumLayers_87953e() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_87953e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_87953e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_87953e();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl
deleted file mode 100644
index b00bdbd..0000000
--- a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
-
-// fn textureNumLayers(texture: texture_2d_array<i32>) -> i32
-fn textureNumLayers_893e7c() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_893e7c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_893e7c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_893e7c();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl
deleted file mode 100644
index 474b691..0000000
--- a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rgba16uint, write>) -> i32
-fn textureNumLayers_9700fb() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_9700fb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_9700fb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_9700fb();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl
deleted file mode 100644
index f64da9e..0000000
--- a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rgba8sint, write>) -> i32
-fn textureNumLayers_a216d2() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_a216d2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_a216d2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_a216d2();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl
deleted file mode 100644
index 3756b00..0000000
--- a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rgba32uint, write>) -> i32
-fn textureNumLayers_cd5dc8() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_cd5dc8();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_cd5dc8();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_cd5dc8();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl
deleted file mode 100644
index ccc1d48..0000000
--- a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<r32float, write>) -> i32
-fn textureNumLayers_d5b228() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_d5b228();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_d5b228();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_d5b228();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl
deleted file mode 100644
index d80689a..0000000
--- a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rgba8snorm, write>) -> i32
-fn textureNumLayers_e31be1() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_e31be1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_e31be1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_e31be1();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl
deleted file mode 100644
index 44cb31c..0000000
--- a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d_array;
-
-// fn textureNumLayers(texture: texture_depth_2d_array) -> i32
-fn textureNumLayers_e653c0() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_e653c0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_e653c0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_e653c0();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl
deleted file mode 100644
index 7c4e1b4..0000000
--- a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<r32uint, write>) -> i32
-fn textureNumLayers_ee942f() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_ee942f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_ee942f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_ee942f();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl b/test/intrinsics/gen/textureNumLayers/f33005.wgsl
deleted file mode 100644
index 6d5b10c..0000000
--- a/test/intrinsics/gen/textureNumLayers/f33005.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rgba16sint, write>) -> i32
-fn textureNumLayers_f33005() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_f33005();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_f33005();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_f33005();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl
deleted file mode 100644
index aab70d9..0000000
--- a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rg32uint, write>) -> i32
-fn textureNumLayers_fcec98() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_fcec98();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_fcec98();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_fcec98();
-}
diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl
deleted file mode 100644
index e6fe277..0000000
--- a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
-
-// fn textureNumLayers(texture: texture_storage_2d_array<rgba8uint, write>) -> i32
-fn textureNumLayers_ff5e89() {
-  var res: i32 = textureNumLayers(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLayers_ff5e89();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLayers_ff5e89();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLayers_ff5e89();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl
deleted file mode 100644
index 367dac4..0000000
--- a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube;
-
-// fn textureNumLevels(texture: texture_depth_cube) -> i32
-fn textureNumLevels_076cb5() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_076cb5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_076cb5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_076cb5();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl b/test/intrinsics/gen/textureNumLevels/080d95.wgsl
deleted file mode 100644
index b3bbba3..0000000
--- a/test/intrinsics/gen/textureNumLevels/080d95.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<i32>;
-
-// fn textureNumLevels(texture: texture_cube<i32>) -> i32
-fn textureNumLevels_080d95() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_080d95();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_080d95();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_080d95();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl
deleted file mode 100644
index b68221c..0000000
--- a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<u32>;
-
-// fn textureNumLevels(texture: texture_2d<u32>) -> i32
-fn textureNumLevels_09ddd0() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_09ddd0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_09ddd0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_09ddd0();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl b/test/intrinsics/gen/textureNumLevels/105988.wgsl
deleted file mode 100644
index 9f03753..0000000
--- a/test/intrinsics/gen/textureNumLevels/105988.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
-
-// fn textureNumLevels(texture: texture_2d_array<f32>) -> i32
-fn textureNumLevels_105988() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_105988();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_105988();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_105988();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl
deleted file mode 100644
index fc14600..0000000
--- a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<u32>;
-
-// fn textureNumLevels(texture: texture_1d<u32>) -> i32
-fn textureNumLevels_1e6f3b() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_1e6f3b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_1e6f3b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_1e6f3b();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl b/test/intrinsics/gen/textureNumLevels/23f750.wgsl
deleted file mode 100644
index 4b914fc..0000000
--- a/test/intrinsics/gen/textureNumLevels/23f750.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<i32>;
-
-// fn textureNumLevels(texture: texture_2d<i32>) -> i32
-fn textureNumLevels_23f750() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_23f750();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_23f750();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_23f750();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl
deleted file mode 100644
index 556e103..0000000
--- a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube_array;
-
-// fn textureNumLevels(texture: texture_depth_cube_array) -> i32
-fn textureNumLevels_2c3575() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_2c3575();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_2c3575();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_2c3575();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl
deleted file mode 100644
index 04ae341..0000000
--- a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<i32>;
-
-// fn textureNumLevels(texture: texture_1d<i32>) -> i32
-fn textureNumLevels_32a0ae() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_32a0ae();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_32a0ae();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_32a0ae();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl
deleted file mode 100644
index cab7551..0000000
--- a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
-
-// fn textureNumLevels(texture: texture_2d_array<u32>) -> i32
-fn textureNumLevels_5101cf() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_5101cf();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_5101cf();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_5101cf();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl
deleted file mode 100644
index 04be5cb..0000000
--- a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<f32>;
-
-// fn textureNumLevels(texture: texture_1d<f32>) -> i32
-fn textureNumLevels_51b5bb() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_51b5bb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_51b5bb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_51b5bb();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl
deleted file mode 100644
index 6daf4db..0000000
--- a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<f32>;
-
-// fn textureNumLevels(texture: texture_cube<f32>) -> i32
-fn textureNumLevels_897aaf() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_897aaf();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_897aaf();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_897aaf();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl
deleted file mode 100644
index c471eba..0000000
--- a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<i32>;
-
-// fn textureNumLevels(texture: texture_3d<i32>) -> i32
-fn textureNumLevels_9da7a5() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_9da7a5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_9da7a5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_9da7a5();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl
deleted file mode 100644
index 0d9d201..0000000
--- a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
-
-// fn textureNumLevels(texture: texture_cube_array<i32>) -> i32
-fn textureNumLevels_a91c03() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_a91c03();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_a91c03();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_a91c03();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl
deleted file mode 100644
index 701dd1e..0000000
--- a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
-
-// fn textureNumLevels(texture: texture_cube_array<f32>) -> i32
-fn textureNumLevels_aee7c8() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_aee7c8();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_aee7c8();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_aee7c8();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl
deleted file mode 100644
index 9f8980a..0000000
--- a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-
-// fn textureNumLevels(texture: texture_depth_2d) -> i32
-fn textureNumLevels_b1b12b() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_b1b12b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_b1b12b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_b1b12b();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl
deleted file mode 100644
index 57d2353..0000000
--- a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<u32>;
-
-// fn textureNumLevels(texture: texture_3d<u32>) -> i32
-fn textureNumLevels_b4f5ea() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_b4f5ea();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_b4f5ea();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_b4f5ea();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl
deleted file mode 100644
index 862bc8d..0000000
--- a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
-
-// fn textureNumLevels(texture: texture_2d_array<i32>) -> i32
-fn textureNumLevels_d004a9() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_d004a9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_d004a9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_d004a9();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl
deleted file mode 100644
index 85fb619..0000000
--- a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-
-// fn textureNumLevels(texture: texture_3d<f32>) -> i32
-fn textureNumLevels_dca09e() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_dca09e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_dca09e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_dca09e();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl b/test/intrinsics/gen/textureNumLevels/e67231.wgsl
deleted file mode 100644
index 05f8db0..0000000
--- a/test/intrinsics/gen/textureNumLevels/e67231.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-
-// fn textureNumLevels(texture: texture_2d<f32>) -> i32
-fn textureNumLevels_e67231() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_e67231();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_e67231();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_e67231();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl
deleted file mode 100644
index 76ac64c..0000000
--- a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<u32>;
-
-// fn textureNumLevels(texture: texture_cube<u32>) -> i32
-fn textureNumLevels_ed078b() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_ed078b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_ed078b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_ed078b();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl
deleted file mode 100644
index 10ccf4e..0000000
--- a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
-
-// fn textureNumLevels(texture: texture_cube_array<u32>) -> i32
-fn textureNumLevels_f46ec6() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_f46ec6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_f46ec6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_f46ec6();
-}
diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl
deleted file mode 100644
index bdfcc52..0000000
--- a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d_array;
-
-// fn textureNumLevels(texture: texture_depth_2d_array) -> i32
-fn textureNumLevels_f5828d() {
-  var res: i32 = textureNumLevels(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumLevels_f5828d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumLevels_f5828d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumLevels_f5828d();
-}
diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl
deleted file mode 100644
index 8a28fd4..0000000
--- a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_multisampled_2d<f32>;
-
-// fn textureNumSamples(texture: texture_multisampled_2d<f32>) -> i32
-fn textureNumSamples_2c6f14() {
-  var res: i32 = textureNumSamples(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumSamples_2c6f14();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumSamples_2c6f14();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumSamples_2c6f14();
-}
diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl
deleted file mode 100644
index 143f3a8..0000000
--- a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_multisampled_2d<u32>;
-
-// fn textureNumSamples(texture: texture_multisampled_2d<u32>) -> i32
-fn textureNumSamples_42f8bb() {
-  var res: i32 = textureNumSamples(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumSamples_42f8bb();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumSamples_42f8bb();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumSamples_42f8bb();
-}
diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl b/test/intrinsics/gen/textureNumSamples/449d23.wgsl
deleted file mode 100644
index c34a440..0000000
--- a/test/intrinsics/gen/textureNumSamples/449d23.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_multisampled_2d<i32>;
-
-// fn textureNumSamples(texture: texture_multisampled_2d<i32>) -> i32
-fn textureNumSamples_449d23() {
-  var res: i32 = textureNumSamples(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumSamples_449d23();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumSamples_449d23();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumSamples_449d23();
-}
diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl
deleted file mode 100644
index bafea1a..0000000
--- a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d;
-
-// fn textureNumSamples(texture: texture_depth_multisampled_2d) -> i32
-fn textureNumSamples_a3c8a0() {
-  var res: i32 = textureNumSamples(arg_0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureNumSamples_a3c8a0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureNumSamples_a3c8a0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureNumSamples_a3c8a0();
-}
diff --git a/test/intrinsics/gen/textureSample/02aa9b.wgsl b/test/intrinsics/gen/textureSample/02aa9b.wgsl
deleted file mode 100644
index 006a838..0000000
--- a/test/intrinsics/gen/textureSample/02aa9b.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, offset: vec2<i32>) -> vec4<f32>
-fn textureSample_02aa9b() {
-  var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1, vec2<i32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_02aa9b();
-}
diff --git a/test/intrinsics/gen/textureSample/100dc0.wgsl b/test/intrinsics/gen/textureSample/100dc0.wgsl
deleted file mode 100644
index a5f95e7..0000000
--- a/test/intrinsics/gen/textureSample/100dc0.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, offset: vec3<i32>) -> vec4<f32>
-fn textureSample_100dc0() {
-  var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), vec3<i32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_100dc0();
-}
diff --git a/test/intrinsics/gen/textureSample/38bbb9.wgsl b/test/intrinsics/gen/textureSample/38bbb9.wgsl
deleted file mode 100644
index ee2abbd..0000000
--- a/test/intrinsics/gen/textureSample/38bbb9.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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 textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32
-fn textureSample_38bbb9() {
-  var res: f32 = textureSample(arg_0, arg_1, vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_38bbb9();
-}
diff --git a/test/intrinsics/gen/textureSample/3b50bd.wgsl b/test/intrinsics/gen/textureSample/3b50bd.wgsl
deleted file mode 100644
index 0c0b55f..0000000
--- a/test/intrinsics/gen/textureSample/3b50bd.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
-fn textureSample_3b50bd() {
-  var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_3b50bd();
-}
diff --git a/test/intrinsics/gen/textureSample/4dd1bf.wgsl b/test/intrinsics/gen/textureSample/4dd1bf.wgsl
deleted file mode 100644
index f722cd1..0000000
--- a/test/intrinsics/gen/textureSample/4dd1bf.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec4<f32>
-fn textureSample_4dd1bf() {
-  var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_4dd1bf();
-}
diff --git a/test/intrinsics/gen/textureSample/51b514.wgsl b/test/intrinsics/gen/textureSample/51b514.wgsl
deleted file mode 100644
index 5433460..0000000
--- a/test/intrinsics/gen/textureSample/51b514.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
-fn textureSample_51b514() {
-  var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_51b514();
-}
diff --git a/test/intrinsics/gen/textureSample/667d76.wgsl b/test/intrinsics/gen/textureSample/667d76.wgsl
deleted file mode 100644
index 23d98a9..0000000
--- a/test/intrinsics/gen/textureSample/667d76.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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 textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> f32
-fn textureSample_667d76() {
-  var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), vec2<i32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_667d76();
-}
diff --git a/test/intrinsics/gen/textureSample/6717ca.wgsl b/test/intrinsics/gen/textureSample/6717ca.wgsl
deleted file mode 100644
index fc09cca..0000000
--- a/test/intrinsics/gen/textureSample/6717ca.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> vec4<f32>
-fn textureSample_6717ca() {
-  var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_6717ca();
-}
diff --git a/test/intrinsics/gen/textureSample/6e64fb.wgsl b/test/intrinsics/gen/textureSample/6e64fb.wgsl
deleted file mode 100644
index d49bb9c..0000000
--- a/test/intrinsics/gen/textureSample/6e64fb.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32>
-fn textureSample_6e64fb() {
-  var res: vec4<f32> = textureSample(arg_0, arg_1, 1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_6e64fb();
-}
diff --git a/test/intrinsics/gen/textureSample/7c3baa.wgsl b/test/intrinsics/gen/textureSample/7c3baa.wgsl
deleted file mode 100644
index 9f32596..0000000
--- a/test/intrinsics/gen/textureSample/7c3baa.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
-fn textureSample_7c3baa() {
-  var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), vec2<i32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_7c3baa();
-}
diff --git a/test/intrinsics/gen/textureSample/7e9ffd.wgsl b/test/intrinsics/gen/textureSample/7e9ffd.wgsl
deleted file mode 100644
index d5242f6..0000000
--- a/test/intrinsics/gen/textureSample/7e9ffd.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> f32
-fn textureSample_7e9ffd() {
-  var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_7e9ffd();
-}
diff --git a/test/intrinsics/gen/textureSample/8522e7.wgsl b/test/intrinsics/gen/textureSample/8522e7.wgsl
deleted file mode 100644
index 2ac3071..0000000
--- a/test/intrinsics/gen/textureSample/8522e7.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, offset: vec2<i32>) -> f32
-fn textureSample_8522e7() {
-  var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1, vec2<i32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_8522e7();
-}
diff --git a/test/intrinsics/gen/textureSample/c2f4e8.wgsl b/test/intrinsics/gen/textureSample/c2f4e8.wgsl
deleted file mode 100644
index e6c03a1..0000000
--- a/test/intrinsics/gen/textureSample/c2f4e8.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> f32
-fn textureSample_c2f4e8() {
-  var res: f32 = textureSample(arg_0, arg_1, vec3<f32>(), 1);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_c2f4e8();
-}
diff --git a/test/intrinsics/gen/textureSample/e53267.wgsl b/test/intrinsics/gen/textureSample/e53267.wgsl
deleted file mode 100644
index 6ac4cd6..0000000
--- a/test/intrinsics/gen/textureSample/e53267.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
-fn textureSample_e53267() {
-  var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_e53267();
-}
diff --git a/test/intrinsics/gen/textureSample/ea7030.wgsl b/test/intrinsics/gen/textureSample/ea7030.wgsl
deleted file mode 100644
index 482686a..0000000
--- a/test/intrinsics/gen/textureSample/ea7030.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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 textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32
-fn textureSample_ea7030() {
-  var res: f32 = textureSample(arg_0, arg_1, vec3<f32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSample_ea7030();
-}
diff --git a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl b/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl
deleted file mode 100644
index 17b3557..0000000
--- a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
-fn textureSampleBias_53b9f7() {
-  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleBias_53b9f7();
-}
diff --git a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl b/test/intrinsics/gen/textureSampleBias/65ac50.wgsl
deleted file mode 100644
index 5a95380..0000000
--- a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, bias: f32, offset: vec2<i32>) -> vec4<f32>
-fn textureSampleBias_65ac50() {
-  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleBias_65ac50();
-}
diff --git a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl b/test/intrinsics/gen/textureSampleBias/6a9113.wgsl
deleted file mode 100644
index 8c17b47..0000000
--- a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32>
-fn textureSampleBias_6a9113() {
-  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleBias_6a9113();
-}
diff --git a/test/intrinsics/gen/textureSampleBias/80e579.wgsl b/test/intrinsics/gen/textureSampleBias/80e579.wgsl
deleted file mode 100644
index 0ae5cc8..0000000
--- a/test/intrinsics/gen/textureSampleBias/80e579.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, bias: f32) -> vec4<f32>
-fn textureSampleBias_80e579() {
-  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1, 1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleBias_80e579();
-}
diff --git a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl b/test/intrinsics/gen/textureSampleBias/81c19a.wgsl
deleted file mode 100644
index f6f996f..0000000
--- a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, offset: vec2<i32>) -> vec4<f32>
-fn textureSampleBias_81c19a() {
-  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleBias_81c19a();
-}
diff --git a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl b/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl
deleted file mode 100644
index d70657e..0000000
--- a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
-fn textureSampleBias_d3fa1b() {
-  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleBias_d3fa1b();
-}
diff --git a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl b/test/intrinsics/gen/textureSampleBias/df91bb.wgsl
deleted file mode 100644
index b35e5a4..0000000
--- a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, offset: vec3<i32>) -> vec4<f32>
-fn textureSampleBias_df91bb() {
-  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.0, vec3<i32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleBias_df91bb();
-}
diff --git a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl b/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl
deleted file mode 100644
index 408326a..0000000
--- a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, bias: f32) -> vec4<f32>
-fn textureSampleBias_eed7c4() {
-  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1, 1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleBias_eed7c4();
-}
diff --git a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl b/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl
deleted file mode 100644
index 3f6096a..0000000
--- a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-@group(1) @binding(1) var arg_1: sampler_comparison;
-
-// fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32
-fn textureSampleCompare_25fcd1() {
-  var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompare_25fcd1();
-}
diff --git a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl b/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl
deleted file mode 100644
index 1c2c30c..0000000
--- a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-@group(1) @binding(1) var arg_1: sampler_comparison;
-
-// fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
-fn textureSampleCompare_3a5923() {
-  var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompare_3a5923();
-}
diff --git a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl b/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl
deleted file mode 100644
index 1accd53..0000000
--- a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube;
-@group(1) @binding(1) var arg_1: sampler_comparison;
-
-// fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
-fn textureSampleCompare_63fb83() {
-  var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompare_63fb83();
-}
diff --git a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl b/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl
deleted file mode 100644
index 43552d7..0000000
--- a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, depth_ref: f32, offset: vec2<i32>) -> f32
-fn textureSampleCompare_98b85c() {
-  var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompare_98b85c();
-}
diff --git a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl b/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl
deleted file mode 100644
index 073e25a..0000000
--- a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, depth_ref: f32) -> f32
-fn textureSampleCompare_a3ca7e() {
-  var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1, 1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompare_a3ca7e();
-}
diff --git a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl b/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl
deleted file mode 100644
index 4291866..0000000
--- a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, depth_ref: f32) -> f32
-fn textureSampleCompare_dd431d() {
-  var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1, 1.0);
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompare_dd431d();
-}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl
deleted file mode 100644
index 7cc7525..0000000
--- a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, depth_ref: f32, offset: vec2<i32>) -> f32
-fn textureSampleCompareLevel_011a8f() {
-  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleCompareLevel_011a8f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompareLevel_011a8f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleCompareLevel_011a8f();
-}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl
deleted file mode 100644
index 21a27d8..0000000
--- a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, depth_ref: f32) -> f32
-fn textureSampleCompareLevel_1116ed() {
-  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleCompareLevel_1116ed();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompareLevel_1116ed();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleCompareLevel_1116ed();
-}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl
deleted file mode 100644
index 30c2867..0000000
--- a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube;
-@group(1) @binding(1) var arg_1: sampler_comparison;
-
-// fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
-fn textureSampleCompareLevel_1568e3() {
-  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleCompareLevel_1568e3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompareLevel_1568e3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleCompareLevel_1568e3();
-}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl
deleted file mode 100644
index 6a6fcee..0000000
--- a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-@group(1) @binding(1) var arg_1: sampler_comparison;
-
-// fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
-fn textureSampleCompareLevel_2ad2b1() {
-  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleCompareLevel_2ad2b1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompareLevel_2ad2b1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleCompareLevel_2ad2b1();
-}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl
deleted file mode 100644
index 02d5f74..0000000
--- a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, depth_ref: f32) -> f32
-fn textureSampleCompareLevel_4cf3a2() {
-  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleCompareLevel_4cf3a2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompareLevel_4cf3a2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleCompareLevel_4cf3a2();
-}
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl
deleted file mode 100644
index 97401ce..0000000
--- a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-@group(1) @binding(1) var arg_1: sampler_comparison;
-
-// fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32
-fn textureSampleCompareLevel_f8121c() {
-  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleCompareLevel_f8121c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleCompareLevel_f8121c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleCompareLevel_f8121c();
-}
diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl
deleted file mode 100644
index 8d8aa0f..0000000
--- a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
-fn textureSampleGrad_21402b() {
-  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleGrad_21402b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleGrad_21402b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleGrad_21402b();
-}
diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl
deleted file mode 100644
index 5c242be..0000000
--- a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
-fn textureSampleGrad_2ecd8f() {
-  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1, vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleGrad_2ecd8f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleGrad_2ecd8f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleGrad_2ecd8f();
-}
diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl
deleted file mode 100644
index 7749ccd..0000000
--- a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
-fn textureSampleGrad_468f88() {
-  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), vec2<f32>(), vec2<f32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleGrad_468f88();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleGrad_468f88();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleGrad_468f88();
-}
diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl b/test/intrinsics/gen/textureSampleGrad/521263.wgsl
deleted file mode 100644
index 7f832e9..0000000
--- a/test/intrinsics/gen/textureSampleGrad/521263.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
-fn textureSampleGrad_521263() {
-  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), vec2<f32>(), vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleGrad_521263();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleGrad_521263();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleGrad_521263();
-}
diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl
deleted file mode 100644
index 47a84a9..0000000
--- a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
-fn textureSampleGrad_5312f4() {
-  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleGrad_5312f4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleGrad_5312f4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleGrad_5312f4();
-}
diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl
deleted file mode 100644
index cfb073f..0000000
--- a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
-fn textureSampleGrad_872f00() {
-  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1, vec2<f32>(), vec2<f32>(), vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleGrad_872f00();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleGrad_872f00();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleGrad_872f00();
-}
diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl
deleted file mode 100644
index e2f4c94..0000000
--- a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
-fn textureSampleGrad_e383db() {
-  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), 1, vec3<f32>(), vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleGrad_e383db();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleGrad_e383db();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleGrad_e383db();
-}
diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl
deleted file mode 100644
index aa909fa..0000000
--- a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, offset: vec3<i32>) -> vec4<f32>
-fn textureSampleGrad_e9a2f7() {
-  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>(), vec3<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleGrad_e9a2f7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleGrad_e9a2f7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleGrad_e9a2f7();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl
deleted file mode 100644
index 421b596..0000000
--- a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> f32
-fn textureSampleLevel_02be59() {
-  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_02be59();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_02be59();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_02be59();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl
deleted file mode 100644
index c8a3064..0000000
--- a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, level: f32) -> vec4<f32>
-fn textureSampleLevel_0bdd9a() {
-  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_0bdd9a();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_0bdd9a();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_0bdd9a();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl
deleted file mode 100644
index c7a2186..0000000
--- a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32) -> f32
-fn textureSampleLevel_1b0291() {
-  var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_1b0291();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_1b0291();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_1b0291();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl
deleted file mode 100644
index c7a13c2..0000000
--- a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, level: i32) -> f32
-fn textureSampleLevel_1bf73e() {
-  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_1bf73e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_1bf73e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_1bf73e();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl
deleted file mode 100644
index a1c1612..0000000
--- a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, level: f32) -> vec4<f32>
-fn textureSampleLevel_302be4() {
-  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_302be4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_302be4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_302be4();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl
deleted file mode 100644
index bda5904..0000000
--- a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, offset: vec2<i32>) -> f32
-fn textureSampleLevel_47daa4() {
-  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 0, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_47daa4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_47daa4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_47daa4();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl
deleted file mode 100644
index d748cdc..0000000
--- a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, offset: vec2<i32>) -> vec4<f32>
-fn textureSampleLevel_690d95() {
-  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_690d95();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_690d95();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_690d95();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl b/test/intrinsics/gen/textureSampleLevel/979816.wgsl
deleted file mode 100644
index 4636091..0000000
--- a/test/intrinsics/gen/textureSampleLevel/979816.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_external;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
-fn textureSampleLevel_979816() {
-  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_979816();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_979816();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_979816();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl
deleted file mode 100644
index 18304c8..0000000
--- a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, offset: vec3<i32>) -> vec4<f32>
-fn textureSampleLevel_9bd37b() {
-  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.0, vec3<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_9bd37b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_9bd37b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_9bd37b();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl
deleted file mode 100644
index ffb83eb..0000000
--- a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, level: f32, offset: vec2<i32>) -> vec4<f32>
-fn textureSampleLevel_a4af26() {
-  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_a4af26();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_a4af26();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_a4af26();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl
deleted file mode 100644
index 3cf621a..0000000
--- a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
-fn textureSampleLevel_abfcc0() {
-  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_abfcc0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_abfcc0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_abfcc0();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl
deleted file mode 100644
index bca3189..0000000
--- a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, level: i32) -> f32
-fn textureSampleLevel_ae5e39() {
-  var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1, 0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_ae5e39();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_ae5e39();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_ae5e39();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl
deleted file mode 100644
index 07958ef..0000000
--- a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, level: i32, offset: vec2<i32>) -> f32
-fn textureSampleLevel_ba93b3() {
-  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1, 0, vec2<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_ba93b3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_ba93b3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_ba93b3();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl
deleted file mode 100644
index 9dc6e15..0000000
--- a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
-fn textureSampleLevel_c32df7() {
-  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_c32df7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_c32df7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_c32df7();
-}
diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl
deleted file mode 100644
index f58dfd1..0000000
--- a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-@group(1) @binding(1) var arg_1: sampler;
-
-// fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32>
-fn textureSampleLevel_c6aca6() {
-  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureSampleLevel_c6aca6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureSampleLevel_c6aca6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureSampleLevel_c6aca6();
-}
diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl b/test/intrinsics/gen/textureStore/05ce15.wgsl
deleted file mode 100644
index 8bccc96..0000000
--- a/test/intrinsics/gen/textureStore/05ce15.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_05ce15() {
-  textureStore(arg_0, vec2<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_05ce15();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_05ce15();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_05ce15();
-}
diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl b/test/intrinsics/gen/textureStore/064c7f.wgsl
deleted file mode 100644
index 71130e4..0000000
--- a/test/intrinsics/gen/textureStore/064c7f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_064c7f() {
-  textureStore(arg_0, vec2<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_064c7f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_064c7f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_064c7f();
-}
diff --git a/test/intrinsics/gen/textureStore/068641.wgsl b/test/intrinsics/gen/textureStore/068641.wgsl
deleted file mode 100644
index 7b10529..0000000
--- a/test/intrinsics/gen/textureStore/068641.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, write>;
-
-// fn textureStore(texture: texture_storage_3d<rgba16uint, write>, coords: vec3<i32>, value: vec4<u32>)
-fn textureStore_068641() {
-  textureStore(arg_0, vec3<i32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_068641();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_068641();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_068641();
-}
diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl b/test/intrinsics/gen/textureStore/0af6b5.wgsl
deleted file mode 100644
index d66614e..0000000
--- a/test/intrinsics/gen/textureStore/0af6b5.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_0af6b5() {
-  textureStore(arg_0, vec2<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_0af6b5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_0af6b5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_0af6b5();
-}
diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl b/test/intrinsics/gen/textureStore/0c3dff.wgsl
deleted file mode 100644
index 4ace9a9..0000000
--- a/test/intrinsics/gen/textureStore/0c3dff.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<u32>)
-fn textureStore_0c3dff() {
-  textureStore(arg_0, vec2<i32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_0c3dff();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_0c3dff();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_0c3dff();
-}
diff --git a/test/intrinsics/gen/textureStore/102722.wgsl b/test/intrinsics/gen/textureStore/102722.wgsl
deleted file mode 100644
index a096321..0000000
--- a/test/intrinsics/gen/textureStore/102722.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<u32>)
-fn textureStore_102722() {
-  textureStore(arg_0, 1, vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_102722();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_102722();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_102722();
-}
diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl b/test/intrinsics/gen/textureStore/1bbd08.wgsl
deleted file mode 100644
index 922921b..0000000
--- a/test/intrinsics/gen/textureStore/1bbd08.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_1bbd08() {
-  textureStore(arg_0, vec3<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_1bbd08();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_1bbd08();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_1bbd08();
-}
diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl b/test/intrinsics/gen/textureStore/1c02e7.wgsl
deleted file mode 100644
index df6bca8..0000000
--- a/test/intrinsics/gen/textureStore/1c02e7.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
-fn textureStore_1c02e7() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_1c02e7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_1c02e7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_1c02e7();
-}
diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl b/test/intrinsics/gen/textureStore/22d955.wgsl
deleted file mode 100644
index 716aa42..0000000
--- a/test/intrinsics/gen/textureStore/22d955.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
-fn textureStore_22d955() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_22d955();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_22d955();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_22d955();
-}
diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl b/test/intrinsics/gen/textureStore/26bf70.wgsl
deleted file mode 100644
index 083e62a..0000000
--- a/test/intrinsics/gen/textureStore/26bf70.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<u32>)
-fn textureStore_26bf70() {
-  textureStore(arg_0, vec2<i32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_26bf70();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_26bf70();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_26bf70();
-}
diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl b/test/intrinsics/gen/textureStore/2796b4.wgsl
deleted file mode 100644
index dce9df6..0000000
--- a/test/intrinsics/gen/textureStore/2796b4.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<i32>)
-fn textureStore_2796b4() {
-  textureStore(arg_0, vec3<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_2796b4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_2796b4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_2796b4();
-}
diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl b/test/intrinsics/gen/textureStore/2ac6c7.wgsl
deleted file mode 100644
index 35cec99..0000000
--- a/test/intrinsics/gen/textureStore/2ac6c7.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<f32>)
-fn textureStore_2ac6c7() {
-  textureStore(arg_0, 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_2ac6c7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_2ac6c7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_2ac6c7();
-}
diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl b/test/intrinsics/gen/textureStore/2eb2a4.wgsl
deleted file mode 100644
index ad1ccd5..0000000
--- a/test/intrinsics/gen/textureStore/2eb2a4.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<u32>)
-fn textureStore_2eb2a4() {
-  textureStore(arg_0, 1, vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_2eb2a4();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_2eb2a4();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_2eb2a4();
-}
diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl b/test/intrinsics/gen/textureStore/2ed2a3.wgsl
deleted file mode 100644
index bcf4113..0000000
--- a/test/intrinsics/gen/textureStore/2ed2a3.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<f32>)
-fn textureStore_2ed2a3() {
-  textureStore(arg_0, 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_2ed2a3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_2ed2a3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_2ed2a3();
-}
diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl b/test/intrinsics/gen/textureStore/31745b.wgsl
deleted file mode 100644
index 5dea4e1..0000000
--- a/test/intrinsics/gen/textureStore/31745b.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<i32>)
-fn textureStore_31745b() {
-  textureStore(arg_0, vec2<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_31745b();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_31745b();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_31745b();
-}
diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl b/test/intrinsics/gen/textureStore/32f368.wgsl
deleted file mode 100644
index 50f4e66..0000000
--- a/test/intrinsics/gen/textureStore/32f368.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
-fn textureStore_32f368() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_32f368();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_32f368();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_32f368();
-}
diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl b/test/intrinsics/gen/textureStore/331aee.wgsl
deleted file mode 100644
index 4bc9a4d..0000000
--- a/test/intrinsics/gen/textureStore/331aee.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_331aee() {
-  textureStore(arg_0, vec3<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_331aee();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_331aee();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_331aee();
-}
diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl b/test/intrinsics/gen/textureStore/38e8d7.wgsl
deleted file mode 100644
index 6cfe7a0..0000000
--- a/test/intrinsics/gen/textureStore/38e8d7.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
-fn textureStore_38e8d7() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_38e8d7();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_38e8d7();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_38e8d7();
-}
diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl b/test/intrinsics/gen/textureStore/3a52ac.wgsl
deleted file mode 100644
index 92cb0bb..0000000
--- a/test/intrinsics/gen/textureStore/3a52ac.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
-fn textureStore_3a52ac() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_3a52ac();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_3a52ac();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_3a52ac();
-}
diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl b/test/intrinsics/gen/textureStore/3bb7a1.wgsl
deleted file mode 100644
index c665a5b..0000000
--- a/test/intrinsics/gen/textureStore/3bb7a1.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
-fn textureStore_3bb7a1() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_3bb7a1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_3bb7a1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_3bb7a1();
-}
diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl b/test/intrinsics/gen/textureStore/3bec15.wgsl
deleted file mode 100644
index b56de8d..0000000
--- a/test/intrinsics/gen/textureStore/3bec15.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<u32>)
-fn textureStore_3bec15() {
-  textureStore(arg_0, 1, vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_3bec15();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_3bec15();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_3bec15();
-}
diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl b/test/intrinsics/gen/textureStore/441ba8.wgsl
deleted file mode 100644
index a110f0c..0000000
--- a/test/intrinsics/gen/textureStore/441ba8.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, write>;
-
-// fn textureStore(texture: texture_storage_3d<rgba32uint, write>, coords: vec3<i32>, value: vec4<u32>)
-fn textureStore_441ba8() {
-  textureStore(arg_0, vec3<i32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_441ba8();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_441ba8();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_441ba8();
-}
diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl b/test/intrinsics/gen/textureStore/4fc057.wgsl
deleted file mode 100644
index b746370..0000000
--- a/test/intrinsics/gen/textureStore/4fc057.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
-fn textureStore_4fc057() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_4fc057();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_4fc057();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_4fc057();
-}
diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl b/test/intrinsics/gen/textureStore/5a2f8f.wgsl
deleted file mode 100644
index b9fc23d..0000000
--- a/test/intrinsics/gen/textureStore/5a2f8f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<i32>)
-fn textureStore_5a2f8f() {
-  textureStore(arg_0, 1, vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_5a2f8f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_5a2f8f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_5a2f8f();
-}
diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl b/test/intrinsics/gen/textureStore/60975f.wgsl
deleted file mode 100644
index 3408855..0000000
--- a/test/intrinsics/gen/textureStore/60975f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
-fn textureStore_60975f() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_60975f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_60975f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_60975f();
-}
diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl b/test/intrinsics/gen/textureStore/682fd6.wgsl
deleted file mode 100644
index 7d74607..0000000
--- a/test/intrinsics/gen/textureStore/682fd6.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<u32>)
-fn textureStore_682fd6() {
-  textureStore(arg_0, vec2<i32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_682fd6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_682fd6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_682fd6();
-}
diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl b/test/intrinsics/gen/textureStore/6b75c3.wgsl
deleted file mode 100644
index 16dc47d..0000000
--- a/test/intrinsics/gen/textureStore/6b75c3.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<f32>)
-fn textureStore_6b75c3() {
-  textureStore(arg_0, 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_6b75c3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_6b75c3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_6b75c3();
-}
diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl b/test/intrinsics/gen/textureStore/6b80d2.wgsl
deleted file mode 100644
index 95535c4..0000000
--- a/test/intrinsics/gen/textureStore/6b80d2.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<i32>)
-fn textureStore_6b80d2() {
-  textureStore(arg_0, 1, vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_6b80d2();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_6b80d2();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_6b80d2();
-}
diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl b/test/intrinsics/gen/textureStore/6cff2e.wgsl
deleted file mode 100644
index 26320a2..0000000
--- a/test/intrinsics/gen/textureStore/6cff2e.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<u32>)
-fn textureStore_6cff2e() {
-  textureStore(arg_0, vec2<i32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_6cff2e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_6cff2e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_6cff2e();
-}
diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl b/test/intrinsics/gen/textureStore/6da692.wgsl
deleted file mode 100644
index dd40882..0000000
--- a/test/intrinsics/gen/textureStore/6da692.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
-fn textureStore_6da692() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_6da692();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_6da692();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_6da692();
-}
diff --git a/test/intrinsics/gen/textureStore/731349.wgsl b/test/intrinsics/gen/textureStore/731349.wgsl
deleted file mode 100644
index ca0d0ef..0000000
--- a/test/intrinsics/gen/textureStore/731349.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_731349() {
-  textureStore(arg_0, vec2<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_731349();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_731349();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_731349();
-}
diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl b/test/intrinsics/gen/textureStore/752da6.wgsl
deleted file mode 100644
index 6310341..0000000
--- a/test/intrinsics/gen/textureStore/752da6.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<i32>)
-fn textureStore_752da6() {
-  textureStore(arg_0, vec2<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_752da6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_752da6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_752da6();
-}
diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl b/test/intrinsics/gen/textureStore/77c0ae.wgsl
deleted file mode 100644
index f122e9f..0000000
--- a/test/intrinsics/gen/textureStore/77c0ae.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<u32>)
-fn textureStore_77c0ae() {
-  textureStore(arg_0, vec2<i32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_77c0ae();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_77c0ae();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_77c0ae();
-}
diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl b/test/intrinsics/gen/textureStore/7cec8d.wgsl
deleted file mode 100644
index 5b0f47b..0000000
--- a/test/intrinsics/gen/textureStore/7cec8d.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
-fn textureStore_7cec8d() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_7cec8d();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_7cec8d();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_7cec8d();
-}
diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl b/test/intrinsics/gen/textureStore/7f7fae.wgsl
deleted file mode 100644
index d1d8004..0000000
--- a/test/intrinsics/gen/textureStore/7f7fae.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<f32>)
-fn textureStore_7f7fae() {
-  textureStore(arg_0, 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_7f7fae();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_7f7fae();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_7f7fae();
-}
diff --git a/test/intrinsics/gen/textureStore/804942.wgsl b/test/intrinsics/gen/textureStore/804942.wgsl
deleted file mode 100644
index 6c76b00..0000000
--- a/test/intrinsics/gen/textureStore/804942.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<i32>)
-fn textureStore_804942() {
-  textureStore(arg_0, vec2<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_804942();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_804942();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_804942();
-}
diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl b/test/intrinsics/gen/textureStore/805dae.wgsl
deleted file mode 100644
index 962a3ff..0000000
--- a/test/intrinsics/gen/textureStore/805dae.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_805dae() {
-  textureStore(arg_0, vec2<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_805dae();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_805dae();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_805dae();
-}
diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl b/test/intrinsics/gen/textureStore/83bcc1.wgsl
deleted file mode 100644
index 657a679..0000000
--- a/test/intrinsics/gen/textureStore/83bcc1.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<u32>)
-fn textureStore_83bcc1() {
-  textureStore(arg_0, 1, vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_83bcc1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_83bcc1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_83bcc1();
-}
diff --git a/test/intrinsics/gen/textureStore/872747.wgsl b/test/intrinsics/gen/textureStore/872747.wgsl
deleted file mode 100644
index cbb964b..0000000
--- a/test/intrinsics/gen/textureStore/872747.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<f32>)
-fn textureStore_872747() {
-  textureStore(arg_0, 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_872747();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_872747();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_872747();
-}
diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl b/test/intrinsics/gen/textureStore/8e0479.wgsl
deleted file mode 100644
index 98b7f8c..0000000
--- a/test/intrinsics/gen/textureStore/8e0479.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
-fn textureStore_8e0479() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_8e0479();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_8e0479();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_8e0479();
-}
diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl b/test/intrinsics/gen/textureStore/8f71a1.wgsl
deleted file mode 100644
index a1298a4..0000000
--- a/test/intrinsics/gen/textureStore/8f71a1.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<i32>)
-fn textureStore_8f71a1() {
-  textureStore(arg_0, vec3<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_8f71a1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_8f71a1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_8f71a1();
-}
diff --git a/test/intrinsics/gen/textureStore/969534.wgsl b/test/intrinsics/gen/textureStore/969534.wgsl
deleted file mode 100644
index d87249f..0000000
--- a/test/intrinsics/gen/textureStore/969534.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<i32>)
-fn textureStore_969534() {
-  textureStore(arg_0, 1, vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_969534();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_969534();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_969534();
-}
diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl b/test/intrinsics/gen/textureStore/9a3ecc.wgsl
deleted file mode 100644
index 0bfd6b0..0000000
--- a/test/intrinsics/gen/textureStore/9a3ecc.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<i32>)
-fn textureStore_9a3ecc() {
-  textureStore(arg_0, vec3<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_9a3ecc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_9a3ecc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_9a3ecc();
-}
diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl b/test/intrinsics/gen/textureStore/9d9cd5.wgsl
deleted file mode 100644
index 776ac7c..0000000
--- a/test/intrinsics/gen/textureStore/9d9cd5.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
-fn textureStore_9d9cd5() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_9d9cd5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_9d9cd5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_9d9cd5();
-}
diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl b/test/intrinsics/gen/textureStore/9e3ec5.wgsl
deleted file mode 100644
index 7b643ca..0000000
--- a/test/intrinsics/gen/textureStore/9e3ec5.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<i32>)
-fn textureStore_9e3ec5() {
-  textureStore(arg_0, vec2<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_9e3ec5();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_9e3ec5();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_9e3ec5();
-}
diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl b/test/intrinsics/gen/textureStore/ac67aa.wgsl
deleted file mode 100644
index 19bbe72..0000000
--- a/test/intrinsics/gen/textureStore/ac67aa.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, write>;
-
-// fn textureStore(texture: texture_storage_3d<rg32uint, write>, coords: vec3<i32>, value: vec4<u32>)
-fn textureStore_ac67aa() {
-  textureStore(arg_0, vec3<i32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_ac67aa();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_ac67aa();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_ac67aa();
-}
diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl b/test/intrinsics/gen/textureStore/b706b1.wgsl
deleted file mode 100644
index 6eb9f07..0000000
--- a/test/intrinsics/gen/textureStore/b706b1.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<i32>)
-fn textureStore_b706b1() {
-  textureStore(arg_0, vec3<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_b706b1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_b706b1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_b706b1();
-}
diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl b/test/intrinsics/gen/textureStore/bbcb7f.wgsl
deleted file mode 100644
index fc16ac9..0000000
--- a/test/intrinsics/gen/textureStore/bbcb7f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<i32>)
-fn textureStore_bbcb7f() {
-  textureStore(arg_0, vec2<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_bbcb7f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_bbcb7f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_bbcb7f();
-}
diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl b/test/intrinsics/gen/textureStore/be6e30.wgsl
deleted file mode 100644
index 4cd6834..0000000
--- a/test/intrinsics/gen/textureStore/be6e30.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_be6e30() {
-  textureStore(arg_0, vec2<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_be6e30();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_be6e30();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_be6e30();
-}
diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl b/test/intrinsics/gen/textureStore/bf775c.wgsl
deleted file mode 100644
index b367132..0000000
--- a/test/intrinsics/gen/textureStore/bf775c.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<i32>)
-fn textureStore_bf775c() {
-  textureStore(arg_0, 1, vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_bf775c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_bf775c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_bf775c();
-}
diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl b/test/intrinsics/gen/textureStore/c5af1e.wgsl
deleted file mode 100644
index e4cbfa9..0000000
--- a/test/intrinsics/gen/textureStore/c5af1e.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_c5af1e() {
-  textureStore(arg_0, vec3<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_c5af1e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_c5af1e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_c5af1e();
-}
diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl b/test/intrinsics/gen/textureStore/c863be.wgsl
deleted file mode 100644
index b3d05f8..0000000
--- a/test/intrinsics/gen/textureStore/c863be.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
-fn textureStore_c863be() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_c863be();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_c863be();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_c863be();
-}
diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl b/test/intrinsics/gen/textureStore/d73b5c.wgsl
deleted file mode 100644
index 29a764d..0000000
--- a/test/intrinsics/gen/textureStore/d73b5c.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<i32>)
-fn textureStore_d73b5c() {
-  textureStore(arg_0, 1, vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_d73b5c();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_d73b5c();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_d73b5c();
-}
diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl b/test/intrinsics/gen/textureStore/dd7d81.wgsl
deleted file mode 100644
index 4730c2e..0000000
--- a/test/intrinsics/gen/textureStore/dd7d81.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_dd7d81() {
-  textureStore(arg_0, vec3<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_dd7d81();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_dd7d81();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_dd7d81();
-}
diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl b/test/intrinsics/gen/textureStore/dde364.wgsl
deleted file mode 100644
index 7050247..0000000
--- a/test/intrinsics/gen/textureStore/dde364.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
-fn textureStore_dde364() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_dde364();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_dde364();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_dde364();
-}
diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl b/test/intrinsics/gen/textureStore/e885e8.wgsl
deleted file mode 100644
index fd0c31c..0000000
--- a/test/intrinsics/gen/textureStore/e885e8.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<f32>)
-fn textureStore_e885e8() {
-  textureStore(arg_0, 1, vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_e885e8();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_e885e8();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_e885e8();
-}
diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl b/test/intrinsics/gen/textureStore/eb702f.wgsl
deleted file mode 100644
index 283888d..0000000
--- a/test/intrinsics/gen/textureStore/eb702f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_eb702f() {
-  textureStore(arg_0, vec3<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_eb702f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_eb702f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_eb702f();
-}
diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl b/test/intrinsics/gen/textureStore/eb78b9.wgsl
deleted file mode 100644
index db051b1..0000000
--- a/test/intrinsics/gen/textureStore/eb78b9.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<i32>)
-fn textureStore_eb78b9() {
-  textureStore(arg_0, vec3<i32>(), vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_eb78b9();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_eb78b9();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_eb78b9();
-}
diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl b/test/intrinsics/gen/textureStore/ee6acc.wgsl
deleted file mode 100644
index b6db2d0..0000000
--- a/test/intrinsics/gen/textureStore/ee6acc.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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<i32>, value: vec4<f32>)
-fn textureStore_ee6acc() {
-  textureStore(arg_0, vec3<i32>(), vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_ee6acc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_ee6acc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_ee6acc();
-}
diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl b/test/intrinsics/gen/textureStore/ef9f2f.wgsl
deleted file mode 100644
index 51c8545..0000000
--- a/test/intrinsics/gen/textureStore/ef9f2f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, write>;
-
-// fn textureStore(texture: texture_storage_3d<r32uint, write>, coords: vec3<i32>, value: vec4<u32>)
-fn textureStore_ef9f2f() {
-  textureStore(arg_0, vec3<i32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_ef9f2f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_ef9f2f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_ef9f2f();
-}
diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl b/test/intrinsics/gen/textureStore/f8dead.wgsl
deleted file mode 100644
index 8cd8a24..0000000
--- a/test/intrinsics/gen/textureStore/f8dead.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, write>;
-
-// fn textureStore(texture: texture_storage_3d<rgba8uint, write>, coords: vec3<i32>, value: vec4<u32>)
-fn textureStore_f8dead() {
-  textureStore(arg_0, vec3<i32>(), vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_f8dead();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_f8dead();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_f8dead();
-}
diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl b/test/intrinsics/gen/textureStore/f9be83.wgsl
deleted file mode 100644
index a5f5b60..0000000
--- a/test/intrinsics/gen/textureStore/f9be83.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
-fn textureStore_f9be83() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_f9be83();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_f9be83();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_f9be83();
-}
diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl b/test/intrinsics/gen/textureStore/fb9a8f.wgsl
deleted file mode 100644
index e8002d0..0000000
--- a/test/intrinsics/gen/textureStore/fb9a8f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// 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: i32, value: vec4<u32>)
-fn textureStore_fb9a8f() {
-  textureStore(arg_0, 1, vec4<u32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_fb9a8f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_fb9a8f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_fb9a8f();
-}
diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl b/test/intrinsics/gen/textureStore/fbf53f.wgsl
deleted file mode 100644
index eefd540..0000000
--- a/test/intrinsics/gen/textureStore/fbf53f.wgsl
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
-
-// fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
-fn textureStore_fbf53f() {
-  textureStore(arg_0, vec2<i32>(), 1, vec4<i32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureStore_fbf53f();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  textureStore_fbf53f();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  textureStore_fbf53f();
-}
diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl b/test/intrinsics/gen/transpose/2585cd.wgsl
deleted file mode 100644
index d693d25..0000000
--- a/test/intrinsics/gen/transpose/2585cd.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn transpose(mat<4, 3, f32>) -> mat<3, 4, f32>
-fn transpose_2585cd() {
-  var res: mat3x4<f32> = transpose(mat4x3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  transpose_2585cd();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  transpose_2585cd();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  transpose_2585cd();
-}
diff --git a/test/intrinsics/gen/transpose/31d679.wgsl b/test/intrinsics/gen/transpose/31d679.wgsl
deleted file mode 100644
index 2f5b72a..0000000
--- a/test/intrinsics/gen/transpose/31d679.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn transpose(mat<2, 2, f32>) -> mat<2, 2, f32>
-fn transpose_31d679() {
-  var res: mat2x2<f32> = transpose(mat2x2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  transpose_31d679();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  transpose_31d679();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  transpose_31d679();
-}
diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl b/test/intrinsics/gen/transpose/31e37e.wgsl
deleted file mode 100644
index 0246329..0000000
--- a/test/intrinsics/gen/transpose/31e37e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn transpose(mat<4, 2, f32>) -> mat<2, 4, f32>
-fn transpose_31e37e() {
-  var res: mat2x4<f32> = transpose(mat4x2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  transpose_31e37e();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  transpose_31e37e();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  transpose_31e37e();
-}
diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl b/test/intrinsics/gen/transpose/4ce359.wgsl
deleted file mode 100644
index 5f8c9cc..0000000
--- a/test/intrinsics/gen/transpose/4ce359.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn transpose(mat<2, 4, f32>) -> mat<4, 2, f32>
-fn transpose_4ce359() {
-  var res: mat4x2<f32> = transpose(mat2x4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  transpose_4ce359();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  transpose_4ce359();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  transpose_4ce359();
-}
diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl b/test/intrinsics/gen/transpose/4dc9a1.wgsl
deleted file mode 100644
index f98f9e2..0000000
--- a/test/intrinsics/gen/transpose/4dc9a1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn transpose(mat<2, 3, f32>) -> mat<3, 2, f32>
-fn transpose_4dc9a1() {
-  var res: mat3x2<f32> = transpose(mat2x3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  transpose_4dc9a1();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  transpose_4dc9a1();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  transpose_4dc9a1();
-}
diff --git a/test/intrinsics/gen/transpose/854336.wgsl b/test/intrinsics/gen/transpose/854336.wgsl
deleted file mode 100644
index 9dccf31..0000000
--- a/test/intrinsics/gen/transpose/854336.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn transpose(mat<3, 3, f32>) -> mat<3, 3, f32>
-fn transpose_854336() {
-  var res: mat3x3<f32> = transpose(mat3x3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  transpose_854336();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  transpose_854336();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  transpose_854336();
-}
diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl b/test/intrinsics/gen/transpose/c1b600.wgsl
deleted file mode 100644
index e0fc4fc..0000000
--- a/test/intrinsics/gen/transpose/c1b600.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn transpose(mat<4, 4, f32>) -> mat<4, 4, f32>
-fn transpose_c1b600() {
-  var res: mat4x4<f32> = transpose(mat4x4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  transpose_c1b600();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  transpose_c1b600();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  transpose_c1b600();
-}
diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl b/test/intrinsics/gen/transpose/d8f8ba.wgsl
deleted file mode 100644
index a09be46..0000000
--- a/test/intrinsics/gen/transpose/d8f8ba.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn transpose(mat<3, 4, f32>) -> mat<4, 3, f32>
-fn transpose_d8f8ba() {
-  var res: mat4x3<f32> = transpose(mat3x4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  transpose_d8f8ba();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  transpose_d8f8ba();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  transpose_d8f8ba();
-}
diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl b/test/intrinsics/gen/transpose/ed4bdc.wgsl
deleted file mode 100644
index 0ed170e..0000000
--- a/test/intrinsics/gen/transpose/ed4bdc.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn transpose(mat<3, 2, f32>) -> mat<2, 3, f32>
-fn transpose_ed4bdc() {
-  var res: mat2x3<f32> = transpose(mat3x2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  transpose_ed4bdc();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  transpose_ed4bdc();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  transpose_ed4bdc();
-}
diff --git a/test/intrinsics/gen/trunc/562d05.wgsl b/test/intrinsics/gen/trunc/562d05.wgsl
deleted file mode 100644
index 65a0b42..0000000
--- a/test/intrinsics/gen/trunc/562d05.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn trunc(vec<3, f32>) -> vec<3, f32>
-fn trunc_562d05() {
-  var res: vec3<f32> = trunc(vec3<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  trunc_562d05();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  trunc_562d05();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  trunc_562d05();
-}
diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl b/test/intrinsics/gen/trunc/e183aa.wgsl
deleted file mode 100644
index 186a1e9..0000000
--- a/test/intrinsics/gen/trunc/e183aa.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn trunc(vec<4, f32>) -> vec<4, f32>
-fn trunc_e183aa() {
-  var res: vec4<f32> = trunc(vec4<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  trunc_e183aa();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  trunc_e183aa();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  trunc_e183aa();
-}
diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl b/test/intrinsics/gen/trunc/eb83df.wgsl
deleted file mode 100644
index 4da7b28..0000000
--- a/test/intrinsics/gen/trunc/eb83df.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn trunc(f32) -> f32
-fn trunc_eb83df() {
-  var res: f32 = trunc(1.0);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  trunc_eb83df();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  trunc_eb83df();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  trunc_eb83df();
-}
diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl b/test/intrinsics/gen/trunc/f370d3.wgsl
deleted file mode 100644
index 0587914..0000000
--- a/test/intrinsics/gen/trunc/f370d3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn trunc(vec<2, f32>) -> vec<2, f32>
-fn trunc_f370d3() {
-  var res: vec2<f32> = trunc(vec2<f32>());
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  trunc_f370d3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  trunc_f370d3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  trunc_f370d3();
-}
diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl
deleted file mode 100644
index db4b36b..0000000
--- a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn unpack2x16float(u32) -> vec2<f32>
-fn unpack2x16float_32a5cf() {
-  var res: vec2<f32> = unpack2x16float(1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  unpack2x16float_32a5cf();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  unpack2x16float_32a5cf();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  unpack2x16float_32a5cf();
-}
diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl
deleted file mode 100644
index 0ff4ddd..0000000
--- a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn unpack2x16snorm(u32) -> vec2<f32>
-fn unpack2x16snorm_b4aea6() {
-  var res: vec2<f32> = unpack2x16snorm(1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  unpack2x16snorm_b4aea6();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  unpack2x16snorm_b4aea6();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  unpack2x16snorm_b4aea6();
-}
diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl
deleted file mode 100644
index 7a5e3ad..0000000
--- a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn unpack2x16unorm(u32) -> vec2<f32>
-fn unpack2x16unorm_7699c0() {
-  var res: vec2<f32> = unpack2x16unorm(1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  unpack2x16unorm_7699c0();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  unpack2x16unorm_7699c0();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  unpack2x16unorm_7699c0();
-}
diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl
deleted file mode 100644
index 0692bf2..0000000
--- a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn unpack4x8snorm(u32) -> vec4<f32>
-fn unpack4x8snorm_523fb3() {
-  var res: vec4<f32> = unpack4x8snorm(1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  unpack4x8snorm_523fb3();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  unpack4x8snorm_523fb3();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  unpack4x8snorm_523fb3();
-}
diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl
deleted file mode 100644
index f0fcae3..0000000
--- a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn unpack4x8unorm(u32) -> vec4<f32>
-fn unpack4x8unorm_750c74() {
-  var res: vec4<f32> = unpack4x8unorm(1u);
-}
-
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  unpack4x8unorm_750c74();
-  return vec4<f32>();
-}
-
-@stage(fragment)
-fn fragment_main() {
-  unpack4x8unorm_750c74();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  unpack4x8unorm_750c74();
-}
diff --git a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl b/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl
deleted file mode 100644
index a006547..0000000
--- a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   test/intrinsics/intrinsics.wgsl.tmpl
-// and the intrinsic defintion file:
-//   src/intrinsics.def
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-
-// fn workgroupBarrier()
-fn workgroupBarrier_a17f7f() {
-  workgroupBarrier();
-}
-
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  workgroupBarrier_a17f7f();
-}
diff --git a/test/intrinsics/intrinsics.wgsl.tmpl b/test/intrinsics/intrinsics.wgsl.tmpl
deleted file mode 100644
index 254fb16..0000000
--- a/test/intrinsics/intrinsics.wgsl.tmpl
+++ /dev/null
@@ -1,273 +0,0 @@
-{{- /*
---------------------------------------------------------------------------------
-Template file for use with tools/intrinsic-gen to generate the wgsl files in the
-./gen/... subdirectories
-
-See:
-* tools/cmd/intrinsic-gen/gen for structures used by this template
-* https://golang.org/pkg/text/template/ for documentation on the template syntax
---------------------------------------------------------------------------------
-*/ -}}
-
-{{- /* For each permutation of each overload of each function... */ -}}
-{{- range .Sem.Functions -}}
-{{-   range .Overloads  -}}
-{{-     range Permute . -}}
-{{- /*    Generate a ./gen/<function>/<permuataion-hash>.wgsl file using
-          the Permutation macro defined below                             */ -}}
-{{-       $file := printf "./gen/%v/%v.wgsl" .Function.Name .Hash -}}
-{{-       $content := Eval "Permutation" . -}}
-{{-       WriteFile $file $content -}}
-{{-     end  }}
-{{-   end  }}
-{{- end  }}
-
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                          define "Permutation"                            -}}
-{{- /* Emits the body of the intrinsic permuation .wgsl file              */ -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   $function    := .Function.Name -}}
-{{-   $permutation := printf "%v_%v" $function .Hash -}}
-{{-   $args        := Map -}}
-
-{{- /* Generate RW storage buffer parameters */ -}}
-{{-   $sb_rw_fields := Eval "EmitBufferFields" "overload"    .
-                                               "var_name"    "sb_rw"
-                                               "storage"     "storage"
-                                               "access"      "read_write"
-                                               "args"        $args -}}
-{{-   if $sb_rw_fields -}}
-struct SB_RW {
-{{- $sb_rw_fields -}}
-};
-@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
-{{    end -}}
-
-{{- /* Generate RO storage buffer parameters */ -}}
-{{-   $sb_ro_fields := Eval "EmitBufferFields" "overload"    .
-                                               "var_name"    "sb_ro"
-                                               "storage"     "storage"
-                                               "access"      "read"
-                                               "args"        $args -}}
-{{-   if $sb_ro_fields -}}
-struct SB_RO {
-{{- $sb_ro_fields -}}
-};
-@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
-{{    end -}}
-
-{{- /* Generate uniform buffer parameters */ -}}
-{{-   $ub_fields := Eval "EmitBufferFields" "overload"    .
-                                            "var_name"    "ub"
-                                            "storage"     "uniform"
-                                            "access"      "read"
-                                            "args"        $args -}}
-{{-   if $ub_fields -}}
-struct UB {
-{{- $ub_fields -}}
-};
-@group(0) @binding(1) var<uniform> ub : UB;
-{{    end -}}
-
-{{- /* Generate module-scoped handle variables */ -}}
-{{-   range $i, $p := .Parameters  }}
-{{-     $class := Eval "StorageClass" $p.Type -}}
-{{-     if eq "ptr" $p.Type.Target.Name -}}
-{{-       $el_type := Eval "Type" (index $p.Type.TemplateArguments 1)}}
-{{-       if eq "handle" $class -}}
-            @group(1) @binding({{$i}}) var arg_{{$i}}: {{$el_type}};
-{{          $args.Put $i (printf "&arg_%v" $i) -}}
-{{-       else if eq "workgroup" $class -}}
-            var<workgroup> arg_{{$i}}: {{$el_type}};
-{{          $args.Put $i (printf "&arg_%v" $i) -}}
-{{-       else if eq "private" $class -}}
-            var<private> arg_{{$i}}: {{$el_type}};
-{{          $args.Put $i (printf "&arg_%v" $i) -}}
-{{-       end -}}
-{{-     else -}}
-{{-       $type := Eval "Type" $p.Type}}
-{{-       if eq "handle" $class -}}
-            @group(1) @binding({{$i}}) var arg_{{$i}}: {{$type}};
-{{          $args.Put $i (printf "arg_%v" $i) -}}
-{{-       else if eq "workgroup" $class -}}
-            var<workgroup> arg_{{$i}}: {{$type}};
-{{          $args.Put $i (printf "arg_%v" $i) -}}
-{{-       else if eq "private" $class -}}
-            var<private> arg_{{$i}}: {{$type}};
-{{          $args.Put $i (printf "arg_%v" $i) -}}
-{{-       end -}}
-{{-     end -}}
-{{-   end -}}
-
-{{- /* Generate the function that calls the intrinsic */ -}}
-{{- /*newline*/}}
-// {{$.Overload}}
-fn {{$permutation}}() {
-{{/* Build the parameters either as 'var' or inline values */ -}}
-{{-   range $i, $p := .Parameters -}}
-{{-     $class := Eval "StorageClass" $p.Type -}}
-{{-     if eq "function" $class -}}
-{{-       if eq "ptr" $p.Type.Target.Name -}}
-{{- /*indent*/}}  var arg_{{$i}}: {{template "Type" index $p.Type.TemplateArguments 1}};
-{{          $args.Put $i (printf "&arg_%v" $i) -}}
-{{-       else -}}
-{{-         $args.Put $i (Eval "ArgumentValue" $p) -}}
-{{-       end -}}
-{{-     end -}}
-{{-   end -}}
-
-{{- /* Make the call to the intrinsic */ -}}
-{{- /*indent*/}}  {{/*indent*/ -}}
-{{-   if .ReturnType -}}
-  var res{{if IsDeclarable .ReturnType}}: {{template "Type" .ReturnType}}{{end}} = {{/* preserve space after = */ -}}
-{{-   end -}}
-  {{$function}}(
-{{-   range $i, $p := .Parameters -}}
-{{-     if $i -}}, {{end}}{{$args.Get $i -}}
-{{-   end -}}
-  );
-}
-{{/*new line*/ -}}
-
-{{- if .CanBeUsedInStage.Vertex }}
-@stage(vertex)
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  {{$permutation}}();
-  return vec4<f32>();
-}
-{{ end -}}
-
-{{- if .CanBeUsedInStage.Fragment }}
-@stage(fragment)
-fn fragment_main() {
-  {{$permutation}}();
-}
-{{ end -}}
-
-{{- if .CanBeUsedInStage.Compute }}
-@stage(compute) @workgroup_size(1)
-fn compute_main() {
-  {{$permutation}}();
-}
-{{ end -}}
-
-{{- end -}}
-
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                       define "EmitBufferFields"                          -}}
-{{- /* Emits a struct with the fields that match the given storage class  */ -}}
-{{- /* and access.                                                        */ -}}
-{{- /* Argument is a map with the following expected keys:                */ -}}
-{{- /*  'overload' - the current overload                                 */ -}}
-{{- /*  'var_name' - name of the variable of the structure type           */ -}}
-{{- /*  'storage'  - filtered storage class                               */ -}}
-{{- /*  'access'   - filtered access                                      */ -}}
-{{- /*  'args'     - argument map that's populated with the fields        */ -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{- $overload       := .Get "overload" -}}
-{{- $var_name       := .Get "var_name" -}}
-{{- $filter_storage := .Get "storage"  -}}
-{{- $filter_access  := .Get "access"   -}}
-{{- $args           := .Get "args"     -}}
-{{-   range $i, $p := $overload.Parameters  }}
-{{-     $storage := Eval "StorageClass" $p.Type -}}
-{{-     $access  := Eval "Access"       $p.Type -}}
-{{-     if and (eq $filter_storage $storage) (eq $filter_access $access) }}
-{{-       if eq "ptr" $p.Type.Target.Name  }}
-  arg_{{$i}}: {{template "Type" (index $p.Type.TemplateArguments 1)}};
-{{          $args.Put $i (printf "&%v.arg_%v" $var_name $i) -}}
-{{-       else  }}
-  arg_{{$i}}: {{template "Type" $p.Type}};
-{{          $args.Put $i (printf "%v.arg_%v" $var_name $i) -}}
-{{-       end -}}
-{{-     end -}}
-{{-   end -}}
-{{ end -}}
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                           define "StorageClass"                          -}}
-{{- /* Returns the storage class for the given Fully Qualified Name       */ -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   $name := .Target.Name -}}
-{{-   if             eq $name "array"   -}}storage
-{{-   else if HasPrefix $name "texture" -}}handle
-{{-   else if HasPrefix $name "sampler" -}}handle
-{{-   else if        eq $name "ptr"     -}}{{(index .TemplateArguments 0).Target.Name}}
-{{-   else                              -}}function
-{{-   end -}}
-{{- end -}}
-
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                           define "Access"                                -}}
-{{- /* Returns the access for the given Fully Qualified Name              */ -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   $name := .Target.Name -}}
-{{-   if eq $name "ptr"     -}}{{(index .TemplateArguments 2).Target.Name}}
-{{-   else -}}
-{{- /*  Emit the default for the storage class */ -}}
-{{- /*  https://gpuweb.github.io/gpuweb/wgsl/#storage-class */ -}}
-{{-     $storage := Eval "StorageClass" . -}}
-{{-          if eq $storage "function" -}}read_write
-{{-     else if eq $storage "private" -}}read_write
-{{-     else if eq $storage "workgroup" -}}read_write
-{{-     else if eq $storage "uniform" -}}read
-{{-     else if eq $storage "storage" -}}read
-{{-     else if eq $storage "handle" -}}read
-{{-     end -}}
-{{-   end -}}
-{{- end -}}
-
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                          define "ArgumentValue"                          -}}
-{{- /* Returns a value that can be used for the parameter argument        */ -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   $ty := .Type -}}
-{{-   if      eq $ty.Target.Name "i32" -}}
-{{- /* If the parameter has the name 'level', then use '0' as the value.  */ -}}
-{{- /* Some texture arguments require the level parameter to be 0, and    */ -}}
-{{- /* constraint is not described in the definition file.                */ -}}
-{{-     if   eq .Name "level"            -}}0
-{{-     else                             -}}1
-{{-     end                              -}}
-{{-   else if eq $ty.Target.Name "u32" -}}1u
-{{-   else if eq $ty.Target.Name "f32" -}}1.0
-{{-   else                             -}}{{template "Type" $ty}}()
-{{-   end                              -}}
-{{- end -}}
-
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                                define "Type"                             -}}
-{{- /* Emits the WGSL for the Fully Qualified Name argument               */ -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   if IsType .Target -}}
-{{-     if      eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}}<{{template "Type" index .TemplateArguments 1}}>
-{{-     else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}}<{{template "Type" index .TemplateArguments 2}}>
-{{-     else                          -}}{{.Target.Name}}{{template "TemplateArguments" .TemplateArguments}}
-{{-     end                           -}}
-{{-   else if IsEnumEntry   .Target   -}}{{.Target.Name}}
-{{-   else if IsEnumMatcher .Target   -}}{{(index .Target.Options 0).Name}}
-{{-   else                            -}}<unhandled-fully-qualified-name-target={{- printf "%T" .Target -}}>
-{{-   end                             -}}
-{{- end -}}
-
-
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-                          define "TemplateArguments"                      -}}
-{{- /* Emits the WGSL for the template argument list                      */ -}}
-{{- /* ------------------------------------------------------------------ */ -}}
-{{-   if . -}}
-<
-{{-    range $i, $a := . -}}
-{{-      if $i -}}, {{  end -}}
-{{-      if IsInt $a -}}{{- . -}}
-{{-      else        -}}{{- template "Type" $a -}}
-{{-      end -}}
-{{-    end -}}
->
-{{-   end -}}
-{{- end -}}
diff --git a/test/intrinsics/repeated_use.wgsl.expected.glsl b/test/intrinsics/repeated_use.wgsl.expected.glsl
deleted file mode 100644
index f759523..0000000
--- a/test/intrinsics/repeated_use.wgsl.expected.glsl
+++ /dev/null
@@ -1,105 +0,0 @@
-SKIP: FAILED
-
-intrinsics/repeated_use.wgsl:5:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:6:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:7:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>(1., 2., 3., 4.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:9:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:10:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:11:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>(1., 2., 3.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:13:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:14:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:15:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>(1., 2.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:17:9 warning: use of deprecated intrinsic
-    _ = isNormal(1.);
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:18:9 warning: use of deprecated intrinsic
-    _ = isNormal(2.);
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:19:9 warning: use of deprecated intrinsic
-    _ = isNormal(3.);
-        ^^^^^^^^
-
-#version 310 es
-precision mediump float;
-
-bvec4 tint_isNormal(vec4 param_0) {
-  uint4 exponent = asuint(param_0) & 0x7f80000;
-  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-bvec3 tint_isNormal_1(vec3 param_0) {
-  uint3 exponent = asuint(param_0) & 0x7f80000;
-  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-bvec2 tint_isNormal_2(vec2 param_0) {
-  uint2 exponent = asuint(param_0) & 0x7f80000;
-  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-bool tint_isNormal_3(float param_0) {
-  uint exponent = asuint(param_0) & 0x7f80000;
-  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-
-void tint_symbol() {
-  tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
-  tint_isNormal(vec4(1.0f));
-  tint_isNormal(vec4(1.0f, 2.0f, 3.0f, 4.0f));
-  tint_isNormal_1(vec3(0.0f, 0.0f, 0.0f));
-  tint_isNormal_1(vec3(1.0f));
-  tint_isNormal_1(vec3(1.0f, 2.0f, 3.0f));
-  tint_isNormal_2(vec2(0.0f, 0.0f));
-  tint_isNormal_2(vec2(1.0f));
-  tint_isNormal_2(vec2(1.0f, 2.0f));
-  tint_isNormal_3(1.0f);
-  tint_isNormal_3(2.0f);
-  tint_isNormal_3(3.0f);
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  tint_symbol();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:5: 'uint4' : undeclared identifier 
-ERROR: 0:5: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/intrinsics/repeated_use.wgsl.expected.hlsl b/test/intrinsics/repeated_use.wgsl.expected.hlsl
deleted file mode 100644
index 5886624..0000000
--- a/test/intrinsics/repeated_use.wgsl.expected.hlsl
+++ /dev/null
@@ -1,88 +0,0 @@
-intrinsics/repeated_use.wgsl:5:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:6:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:7:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>(1., 2., 3., 4.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:9:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:10:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:11:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>(1., 2., 3.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:13:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:14:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:15:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>(1., 2.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:17:9 warning: use of deprecated intrinsic
-    _ = isNormal(1.);
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:18:9 warning: use of deprecated intrinsic
-    _ = isNormal(2.);
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:19:9 warning: use of deprecated intrinsic
-    _ = isNormal(3.);
-        ^^^^^^^^
-
-bool4 tint_isNormal(float4 param_0) {
-  uint4 exponent = asuint(param_0) & 0x7f80000;
-  uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-bool3 tint_isNormal_1(float3 param_0) {
-  uint3 exponent = asuint(param_0) & 0x7f80000;
-  uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-bool2 tint_isNormal_2(float2 param_0) {
-  uint2 exponent = asuint(param_0) & 0x7f80000;
-  uint2 clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-bool tint_isNormal_3(float param_0) {
-  uint exponent = asuint(param_0) & 0x7f80000;
-  uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
-  return clamped == exponent;
-}
-
-[numthreads(1, 1, 1)]
-void main() {
-  tint_isNormal(float4(0.0f, 0.0f, 0.0f, 0.0f));
-  tint_isNormal(float4((1.0f).xxxx));
-  tint_isNormal(float4(1.0f, 2.0f, 3.0f, 4.0f));
-  tint_isNormal_1(float3(0.0f, 0.0f, 0.0f));
-  tint_isNormal_1(float3((1.0f).xxx));
-  tint_isNormal_1(float3(1.0f, 2.0f, 3.0f));
-  tint_isNormal_2(float2(0.0f, 0.0f));
-  tint_isNormal_2(float2((1.0f).xx));
-  tint_isNormal_2(float2(1.0f, 2.0f));
-  tint_isNormal_3(1.0f);
-  tint_isNormal_3(2.0f);
-  tint_isNormal_3(3.0f);
-  return;
-}
diff --git a/test/intrinsics/repeated_use.wgsl.expected.msl b/test/intrinsics/repeated_use.wgsl.expected.msl
deleted file mode 100644
index 848c224..0000000
--- a/test/intrinsics/repeated_use.wgsl.expected.msl
+++ /dev/null
@@ -1,67 +0,0 @@
-intrinsics/repeated_use.wgsl:5:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:6:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:7:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>(1., 2., 3., 4.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:9:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:10:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:11:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>(1., 2., 3.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:13:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:14:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:15:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>(1., 2.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:17:9 warning: use of deprecated intrinsic
-    _ = isNormal(1.);
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:18:9 warning: use of deprecated intrinsic
-    _ = isNormal(2.);
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:19:9 warning: use of deprecated intrinsic
-    _ = isNormal(3.);
-        ^^^^^^^^
-
-#include <metal_stdlib>
-
-using namespace metal;
-kernel void tint_symbol() {
-  isnormal(float4());
-  isnormal(float4(1.0f));
-  isnormal(float4(1.0f, 2.0f, 3.0f, 4.0f));
-  isnormal(float3());
-  isnormal(float3(1.0f));
-  isnormal(float3(1.0f, 2.0f, 3.0f));
-  isnormal(float2());
-  isnormal(float2(1.0f));
-  isnormal(float2(1.0f, 2.0f));
-  isnormal(1.0f);
-  isnormal(2.0f);
-  isnormal(3.0f);
-  return;
-}
-
diff --git a/test/intrinsics/repeated_use.wgsl.expected.spvasm b/test/intrinsics/repeated_use.wgsl.expected.spvasm
deleted file mode 100644
index 3e3beb0..0000000
--- a/test/intrinsics/repeated_use.wgsl.expected.spvasm
+++ /dev/null
@@ -1,168 +0,0 @@
-intrinsics/repeated_use.wgsl:5:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:6:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:7:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>(1., 2., 3., 4.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:9:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:10:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:11:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>(1., 2., 3.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:13:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:14:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:15:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>(1., 2.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:17:9 warning: use of deprecated intrinsic
-    _ = isNormal(1.);
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:18:9 warning: use of deprecated intrinsic
-    _ = isNormal(2.);
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:19:9 warning: use of deprecated intrinsic
-    _ = isNormal(3.);
-        ^^^^^^^^
-
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 109
-; Schema: 0
-               OpCapability Shader
-         %11 = OpExtInstImport "GLSL.std.450"
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint GLCompute %main "main"
-               OpExecutionMode %main LocalSize 1 1 1
-               OpName %main "main"
-       %void = OpTypeVoid
-          %1 = OpTypeFunction %void
-       %bool = OpTypeBool
-     %v4bool = OpTypeVector %bool 4
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-         %10 = OpConstantNull %v4float
-       %uint = OpTypeInt 32 0
-%uint_133693440 = OpConstant %uint 133693440
-%uint_524288 = OpConstant %uint 524288
-%uint_133169152 = OpConstant %uint 133169152
-     %v4uint = OpTypeVector %uint 4
-    %float_1 = OpConstant %float 1
-         %25 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
-    %float_2 = OpConstant %float 2
-    %float_3 = OpConstant %float 3
-    %float_4 = OpConstant %float 4
-         %36 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
-     %v3bool = OpTypeVector %bool 3
-    %v3float = OpTypeVector %float 3
-         %46 = OpConstantNull %v3float
-     %v3uint = OpTypeVector %uint 3
-         %55 = OpConstantComposite %v3float %float_1 %float_1 %float_1
-         %63 = OpConstantComposite %v3float %float_1 %float_2 %float_3
-     %v2bool = OpTypeVector %bool 2
-    %v2float = OpTypeVector %float 2
-         %73 = OpConstantNull %v2float
-     %v2uint = OpTypeVector %uint 2
-         %82 = OpConstantComposite %v2float %float_1 %float_1
-         %90 = OpConstantComposite %v2float %float_1 %float_2
-       %main = OpFunction %void None %1
-          %4 = OpLabel
-         %17 = OpCompositeConstruct %v4uint %uint_133693440 %uint_133693440 %uint_133693440 %uint_133693440
-         %18 = OpCompositeConstruct %v4uint %uint_524288 %uint_524288 %uint_524288 %uint_524288
-         %19 = OpCompositeConstruct %v4uint %uint_133169152 %uint_133169152 %uint_133169152 %uint_133169152
-         %20 = OpBitcast %v4uint %10
-         %21 = OpBitwiseAnd %v4uint %20 %17
-         %22 = OpExtInst %v4uint %11 UClamp %21 %18 %19
-          %5 = OpIEqual %v4bool %21 %22
-         %26 = OpCompositeConstruct %v4uint %uint_133693440 %uint_133693440 %uint_133693440 %uint_133693440
-         %27 = OpCompositeConstruct %v4uint %uint_524288 %uint_524288 %uint_524288 %uint_524288
-         %28 = OpCompositeConstruct %v4uint %uint_133169152 %uint_133169152 %uint_133169152 %uint_133169152
-         %29 = OpBitcast %v4uint %25
-         %30 = OpBitwiseAnd %v4uint %29 %26
-         %31 = OpExtInst %v4uint %11 UClamp %30 %27 %28
-         %23 = OpIEqual %v4bool %30 %31
-         %37 = OpCompositeConstruct %v4uint %uint_133693440 %uint_133693440 %uint_133693440 %uint_133693440
-         %38 = OpCompositeConstruct %v4uint %uint_524288 %uint_524288 %uint_524288 %uint_524288
-         %39 = OpCompositeConstruct %v4uint %uint_133169152 %uint_133169152 %uint_133169152 %uint_133169152
-         %40 = OpBitcast %v4uint %36
-         %41 = OpBitwiseAnd %v4uint %40 %37
-         %42 = OpExtInst %v4uint %11 UClamp %41 %38 %39
-         %32 = OpIEqual %v4bool %41 %42
-         %48 = OpCompositeConstruct %v3uint %uint_133693440 %uint_133693440 %uint_133693440
-         %49 = OpCompositeConstruct %v3uint %uint_524288 %uint_524288 %uint_524288
-         %50 = OpCompositeConstruct %v3uint %uint_133169152 %uint_133169152 %uint_133169152
-         %51 = OpBitcast %v3uint %46
-         %52 = OpBitwiseAnd %v3uint %51 %48
-         %53 = OpExtInst %v3uint %11 UClamp %52 %49 %50
-         %43 = OpIEqual %v3bool %52 %53
-         %56 = OpCompositeConstruct %v3uint %uint_133693440 %uint_133693440 %uint_133693440
-         %57 = OpCompositeConstruct %v3uint %uint_524288 %uint_524288 %uint_524288
-         %58 = OpCompositeConstruct %v3uint %uint_133169152 %uint_133169152 %uint_133169152
-         %59 = OpBitcast %v3uint %55
-         %60 = OpBitwiseAnd %v3uint %59 %56
-         %61 = OpExtInst %v3uint %11 UClamp %60 %57 %58
-         %54 = OpIEqual %v3bool %60 %61
-         %64 = OpCompositeConstruct %v3uint %uint_133693440 %uint_133693440 %uint_133693440
-         %65 = OpCompositeConstruct %v3uint %uint_524288 %uint_524288 %uint_524288
-         %66 = OpCompositeConstruct %v3uint %uint_133169152 %uint_133169152 %uint_133169152
-         %67 = OpBitcast %v3uint %63
-         %68 = OpBitwiseAnd %v3uint %67 %64
-         %69 = OpExtInst %v3uint %11 UClamp %68 %65 %66
-         %62 = OpIEqual %v3bool %68 %69
-         %75 = OpCompositeConstruct %v2uint %uint_133693440 %uint_133693440
-         %76 = OpCompositeConstruct %v2uint %uint_524288 %uint_524288
-         %77 = OpCompositeConstruct %v2uint %uint_133169152 %uint_133169152
-         %78 = OpBitcast %v2uint %73
-         %79 = OpBitwiseAnd %v2uint %78 %75
-         %80 = OpExtInst %v2uint %11 UClamp %79 %76 %77
-         %70 = OpIEqual %v2bool %79 %80
-         %83 = OpCompositeConstruct %v2uint %uint_133693440 %uint_133693440
-         %84 = OpCompositeConstruct %v2uint %uint_524288 %uint_524288
-         %85 = OpCompositeConstruct %v2uint %uint_133169152 %uint_133169152
-         %86 = OpBitcast %v2uint %82
-         %87 = OpBitwiseAnd %v2uint %86 %83
-         %88 = OpExtInst %v2uint %11 UClamp %87 %84 %85
-         %81 = OpIEqual %v2bool %87 %88
-         %91 = OpCompositeConstruct %v2uint %uint_133693440 %uint_133693440
-         %92 = OpCompositeConstruct %v2uint %uint_524288 %uint_524288
-         %93 = OpCompositeConstruct %v2uint %uint_133169152 %uint_133169152
-         %94 = OpBitcast %v2uint %90
-         %95 = OpBitwiseAnd %v2uint %94 %91
-         %96 = OpExtInst %v2uint %11 UClamp %95 %92 %93
-         %89 = OpIEqual %v2bool %95 %96
-         %98 = OpBitcast %uint %float_1
-         %99 = OpBitwiseAnd %uint %98 %uint_133693440
-        %100 = OpExtInst %uint %11 UClamp %99 %uint_524288 %uint_133169152
-         %97 = OpIEqual %bool %99 %100
-        %102 = OpBitcast %uint %float_2
-        %103 = OpBitwiseAnd %uint %102 %uint_133693440
-        %104 = OpExtInst %uint %11 UClamp %103 %uint_524288 %uint_133169152
-        %101 = OpIEqual %bool %103 %104
-        %106 = OpBitcast %uint %float_3
-        %107 = OpBitwiseAnd %uint %106 %uint_133693440
-        %108 = OpExtInst %uint %11 UClamp %107 %uint_524288 %uint_133169152
-        %105 = OpIEqual %bool %107 %108
-               OpReturn
-               OpFunctionEnd
diff --git a/test/intrinsics/repeated_use.wgsl.expected.wgsl b/test/intrinsics/repeated_use.wgsl.expected.wgsl
deleted file mode 100644
index 3f21e25..0000000
--- a/test/intrinsics/repeated_use.wgsl.expected.wgsl
+++ /dev/null
@@ -1,63 +0,0 @@
-intrinsics/repeated_use.wgsl:5:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:6:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:7:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec4<f32>(1., 2., 3., 4.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:9:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:10:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:11:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec3<f32>(1., 2., 3.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:13:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>());
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:14:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>(1.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:15:9 warning: use of deprecated intrinsic
-    _ = isNormal(vec2<f32>(1., 2.));
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:17:9 warning: use of deprecated intrinsic
-    _ = isNormal(1.);
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:18:9 warning: use of deprecated intrinsic
-    _ = isNormal(2.);
-        ^^^^^^^^
-
-intrinsics/repeated_use.wgsl:19:9 warning: use of deprecated intrinsic
-    _ = isNormal(3.);
-        ^^^^^^^^
-
-@stage(compute) @workgroup_size(1)
-fn main() {
-  _ = isNormal(vec4<f32>());
-  _ = isNormal(vec4<f32>(1.0));
-  _ = isNormal(vec4<f32>(1.0, 2.0, 3.0, 4.0));
-  _ = isNormal(vec3<f32>());
-  _ = isNormal(vec3<f32>(1.0));
-  _ = isNormal(vec3<f32>(1.0, 2.0, 3.0));
-  _ = isNormal(vec2<f32>());
-  _ = isNormal(vec2<f32>(1.0));
-  _ = isNormal(vec2<f32>(1.0, 2.0));
-  _ = isNormal(1.0);
-  _ = isNormal(2.0);
-  _ = isNormal(3.0);
-}
diff --git a/test/unittest/reader/spirv/SpvLogicalTest_IsNan_Vector.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvLogicalTest_IsNan_Vector.spvasm.expected.hlsl
index 1c4f659..415f631 100644
--- a/test/unittest/reader/spirv/SpvLogicalTest_IsNan_Vector.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvLogicalTest_IsNan_Vector.spvasm.expected.hlsl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-warning: use of deprecated intrinsic
+warning: use of deprecated builtin
 void main_1() {
   const bool2 x_1 = isnan(float2(50.0f, 60.0f));
   return;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.glsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.glsl
index 6c40eda..7d514df 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.glsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.glsl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-warning: use of deprecated intrinsic
+warning: use of deprecated builtin
 #version 310 es
 precision mediump float;
 
@@ -92,7 +92,7 @@
 }
 Error parsing GLSL shader:
 ERROR: 0:43: '|' :  wrong operand types: no operation '|' exists that takes a left-hand operand of type ' global bool' and a right operand of type ' temp bool' (or there is no acceptable conversion)
-ERROR: 0:43: '' : compilation terminated 
+ERROR: 0:43: '' : compilation terminated
 ERROR: 2 compilation errors.  No code generated.
 
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.glsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.glsl
index 4782e04..604dfed 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.glsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.glsl
@@ -8,7 +8,7 @@
 type Arr_1 = @stride(16) array<f32, 1>;
               ^^^^^^
 
-vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl:39:22 warning: use of deprecated intrinsic
+vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl:39:22 warning: use of deprecated builtin
   let x_48 : bool = (isInf(x_44) || (x_46 == 1.0));
                      ^^^^^
 
@@ -118,7 +118,7 @@
 }
 Error parsing GLSL shader:
 ERROR: 0:32: '%' :  wrong operand types: no operation '%' exists that takes a left-hand operand of type ' const float' and a right operand of type ' const float' (or there is no acceptable conversion)
-ERROR: 0:32: '' : compilation terminated 
+ERROR: 0:32: '' : compilation terminated
 ERROR: 2 compilation errors.  No code generated.
 
 
diff --git a/tools/builtin-gen b/tools/builtin-gen
new file mode 100755
index 0000000..58dc565
--- /dev/null
+++ b/tools/builtin-gen
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+# Copyright 2021 The Tint Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e # Fail on any error.
+
+if [ ! -x "$(which go)" ] ; then
+    echo "error: go needs to be on \$PATH to use $0"
+    exit 1
+fi
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
+ROOT_DIR="$( cd "${SCRIPT_DIR}/.." >/dev/null 2>&1 && pwd )"
+BINARY="${SCRIPT_DIR}/bin/builtin-gen"
+
+# Rebuild the binary.
+# Note, go caches build artifacts, so this is quick for repeat calls
+pushd "${SCRIPT_DIR}/src/cmd/builtin-gen" > /dev/null
+    go build -o "${BINARY}" main.go
+popd > /dev/null
+
+"${BINARY}" "$@"
diff --git a/tools/intrinsic-gen b/tools/intrinsic-gen
deleted file mode 100755
index cfbbd4e..0000000
--- a/tools/intrinsic-gen
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2021 The Tint Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -e # Fail on any error.
-
-if [ ! -x "$(which go)" ] ; then
-    echo "error: go needs to be on \$PATH to use $0"
-    exit 1
-fi
-
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
-ROOT_DIR="$( cd "${SCRIPT_DIR}/.." >/dev/null 2>&1 && pwd )"
-BINARY="${SCRIPT_DIR}/bin/intrinsic-gen"
-
-# Rebuild the binary.
-# Note, go caches build artifacts, so this is quick for repeat calls
-pushd "${SCRIPT_DIR}/src/cmd/intrinsic-gen" > /dev/null
-    go build -o "${BINARY}" main.go
-popd > /dev/null
-
-"${BINARY}" "$@"
diff --git a/tools/src/cmd/builtin-gen/ast/ast.go b/tools/src/cmd/builtin-gen/ast/ast.go
new file mode 100644
index 0000000..e67530b
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/ast/ast.go
@@ -0,0 +1,307 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package ast defines AST nodes that are produced by the Tint intrinsic
+// definition parser
+package ast
+
+import (
+	"fmt"
+	"strings"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/tok"
+)
+
+// AST is the parsed syntax tree of the intrinsic definition file
+type AST struct {
+	Enums     []EnumDecl
+	Types     []TypeDecl
+	Matchers  []MatcherDecl
+	Functions []FunctionDecl
+}
+
+func (a AST) String() string {
+	sb := strings.Builder{}
+	for _, e := range a.Enums {
+		fmt.Fprintf(&sb, "%v", e)
+		fmt.Fprintln(&sb)
+	}
+	for _, p := range a.Types {
+		fmt.Fprintf(&sb, "%v", p)
+		fmt.Fprintln(&sb)
+	}
+	for _, m := range a.Matchers {
+		fmt.Fprintf(&sb, "%v", m)
+		fmt.Fprintln(&sb)
+	}
+	for _, f := range a.Functions {
+		fmt.Fprintf(&sb, "%v", f)
+		fmt.Fprintln(&sb)
+	}
+	return sb.String()
+}
+
+// EnumDecl describes an enumerator
+type EnumDecl struct {
+	Source  tok.Source
+	Name    string
+	Entries []EnumEntry
+}
+
+// Format implements the fmt.Formatter interface
+func (e EnumDecl) Format(w fmt.State, verb rune) {
+	fmt.Fprintf(w, "enum %v {\n", e.Name)
+	for _, e := range e.Entries {
+		fmt.Fprintf(w, "  %v\n", e)
+	}
+	fmt.Fprintf(w, "}\n")
+}
+
+// EnumEntry describes an entry in a enumerator
+type EnumEntry struct {
+	Source      tok.Source
+	Name        string
+	Decorations Decorations
+}
+
+// Format implements the fmt.Formatter interface
+func (e EnumEntry) Format(w fmt.State, verb rune) {
+	if len(e.Decorations) > 0 {
+		fmt.Fprintf(w, "%v %v", e.Decorations, e.Name)
+	} else {
+		fmt.Fprint(w, e.Name)
+	}
+}
+
+// MatcherDecl describes a matcher declaration
+type MatcherDecl struct {
+	Source  tok.Source
+	Name    string
+	Options MatcherOptions
+}
+
+// Format implements the fmt.Formatter interface
+func (m MatcherDecl) Format(w fmt.State, verb rune) {
+	fmt.Fprintf(w, "match %v", m.Name)
+	fmt.Fprintf(w, ": ")
+	m.Options.Format(w, verb)
+}
+
+// FunctionDecl describes a function declaration
+type FunctionDecl struct {
+	Source         tok.Source
+	Name           string
+	Decorations    Decorations
+	TemplateParams TemplateParams
+	Parameters     Parameters
+	ReturnType     *TemplatedName
+}
+
+// Format implements the fmt.Formatter interface
+func (f FunctionDecl) Format(w fmt.State, verb rune) {
+	fmt.Fprintf(w, "fn %v", f.Name)
+	f.TemplateParams.Format(w, verb)
+	f.Parameters.Format(w, verb)
+	if f.ReturnType != nil {
+		fmt.Fprintf(w, " -> ")
+		f.ReturnType.Format(w, verb)
+	}
+}
+
+// Parameters is a list of parameter
+type Parameters []Parameter
+
+// Format implements the fmt.Formatter interface
+func (l Parameters) Format(w fmt.State, verb rune) {
+	fmt.Fprintf(w, "(")
+	for i, p := range l {
+		if i > 0 {
+			fmt.Fprintf(w, ", ")
+		}
+		p.Format(w, verb)
+	}
+	fmt.Fprintf(w, ")")
+}
+
+// Parameter describes a single parameter of a function
+type Parameter struct {
+	Source tok.Source
+	Name   string // Optional
+	Type   TemplatedName
+}
+
+// Format implements the fmt.Formatter interface
+func (p Parameter) Format(w fmt.State, verb rune) {
+	if p.Name != "" {
+		fmt.Fprintf(w, "%v: ", p.Name)
+	}
+	p.Type.Format(w, verb)
+}
+
+// MatcherOptions is a list of TemplatedName
+type MatcherOptions TemplatedNames
+
+// Format implements the fmt.Formatter interface
+func (o MatcherOptions) Format(w fmt.State, verb rune) {
+	for i, mo := range o {
+		if i > 0 {
+			fmt.Fprintf(w, " | ")
+		}
+		mo.Format(w, verb)
+	}
+}
+
+// TemplatedNames is a list of TemplatedName
+// Example:
+//   a<b>, c<d, e>
+type TemplatedNames []TemplatedName
+
+// Format implements the fmt.Formatter interface
+func (l TemplatedNames) Format(w fmt.State, verb rune) {
+	for i, n := range l {
+		if i > 0 {
+			fmt.Fprintf(w, ", ")
+		}
+		n.Format(w, verb)
+	}
+}
+
+// TemplatedName is an identifier with optional templated arguments
+// Example:
+//  vec<N, T>
+type TemplatedName struct {
+	Source       tok.Source
+	Name         string
+	TemplateArgs TemplatedNames
+}
+
+// Format implements the fmt.Formatter interface
+func (t TemplatedName) Format(w fmt.State, verb rune) {
+	fmt.Fprintf(w, "%v", t.Name)
+	if len(t.TemplateArgs) > 0 {
+		fmt.Fprintf(w, "<")
+		t.TemplateArgs.Format(w, verb)
+		fmt.Fprintf(w, ">")
+	}
+}
+
+// TypeDecl describes a type declaration
+type TypeDecl struct {
+	Source         tok.Source
+	Decorations    Decorations
+	Name           string
+	TemplateParams TemplateParams
+}
+
+// Format implements the fmt.Formatter interface
+func (p TypeDecl) Format(w fmt.State, verb rune) {
+	if len(p.Decorations) > 0 {
+		p.Decorations.Format(w, verb)
+		fmt.Fprintf(w, " type %v", p.Name)
+	}
+	fmt.Fprintf(w, "type %v", p.Name)
+	p.TemplateParams.Format(w, verb)
+}
+
+// TemplateParams is a list of TemplateParam
+// Example:
+//   <A, B : TyB>
+type TemplateParams []TemplateParam
+
+// Format implements the fmt.Formatter interface
+func (p TemplateParams) Format(w fmt.State, verb rune) {
+	if len(p) > 0 {
+		fmt.Fprintf(w, "<")
+		for i, tp := range p {
+			if i > 0 {
+				fmt.Fprintf(w, ", ")
+			}
+			tp.Format(w, verb)
+		}
+		fmt.Fprintf(w, ">")
+	}
+}
+
+// TemplateParam describes a template parameter with optional type
+// Example:
+//   <Name>
+//   <Name: Type>
+type TemplateParam struct {
+	Source tok.Source
+	Name   string
+	Type   TemplatedName // Optional
+}
+
+// Format implements the fmt.Formatter interface
+func (t TemplateParam) Format(w fmt.State, verb rune) {
+	fmt.Fprintf(w, "%v", t.Name)
+	if t.Type.Name != "" {
+		fmt.Fprintf(w, " : ")
+		t.Type.Format(w, verb)
+	}
+}
+
+// Decorations is a list of Decoration
+// Example:
+//   [[a(x), b(y)]]
+type Decorations []Decoration
+
+// Format implements the fmt.Formatter interface
+func (l Decorations) Format(w fmt.State, verb rune) {
+	fmt.Fprint(w, "[[")
+	for i, d := range l {
+		if i > 0 {
+			fmt.Fprintf(w, ", ")
+		}
+		d.Format(w, verb)
+	}
+	fmt.Fprint(w, "]]")
+}
+
+// Take looks up the decoration with the given name. If the decoration is found
+// it is removed from the Decorations list and returned, otherwise nil is
+// returned and the Decorations are not altered.
+func (l *Decorations) Take(name string) *Decoration {
+	for i, d := range *l {
+		if d.Name == name {
+			*l = append((*l)[:i], (*l)[i+1:]...)
+			return &d
+		}
+	}
+	return nil
+}
+
+// Decoration describes a single decoration
+// Example:
+//   a(x)
+type Decoration struct {
+	Source tok.Source
+	Name   string
+	Values []string
+}
+
+// Format implements the fmt.Formatter interface
+func (d Decoration) Format(w fmt.State, verb rune) {
+	fmt.Fprintf(w, "%v", d.Name)
+	if len(d.Values) > 0 {
+		fmt.Fprintf(w, "(")
+		for i, v := range d.Values {
+			if i > 0 {
+				fmt.Fprint(w, ", ")
+			}
+			fmt.Fprintf(w, "%v", v)
+		}
+		fmt.Fprintf(w, ")")
+	}
+}
diff --git a/tools/src/cmd/builtin-gen/gen/builtin_table.go b/tools/src/cmd/builtin-gen/gen/builtin_table.go
new file mode 100644
index 0000000..dcd7a5f
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/gen/builtin_table.go
@@ -0,0 +1,387 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package gen
+
+import (
+	"fmt"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/sem"
+	"dawn.googlesource.com/tint/tools/src/list"
+	"dawn.googlesource.com/tint/tools/src/lut"
+)
+
+// BuiltinTable holds data specific to the intrinsic_table.inl.tmpl template
+type BuiltinTable struct {
+	// The semantic info
+	Sem *sem.Sem
+
+	// TMatchers are all the sem.OpenType, sem.Type and sem.TypeMatchers.
+	// These are all implemented by classes deriving from tint::TypeMatcher
+	TMatchers     []sem.Named
+	TMatcherIndex map[sem.Named]int // [object -> index] in TMatcher
+
+	// NMatchers are all the sem.OpenNumber and sem.EnumMatchers.
+	// These are all implemented by classes deriving from tint::NumberMatcher
+	NMatchers     []sem.Named
+	NMatcherIndex map[sem.Named]int // [object -> index] in NMatchers
+
+	MatcherIndices []int        // kMatcherIndices table content
+	OpenTypes      []OpenType   // kOpenTypes table content
+	OpenNumbers    []OpenNumber // kOpenNumbers table content
+	Parameters     []Parameter  // kParameters table content
+	Overloads      []Overload   // kOverloads table content
+	Functions      []Function   // kBuiltins table content
+}
+
+// OpenType is used to create the C++ OpenTypeInfo structure
+type OpenType struct {
+	// Name of the open type (e.g. 'T')
+	Name string
+	// Optional type matcher constraint.
+	// Either an index in Matchers::type, or -1
+	MatcherIndex int
+}
+
+// OpenNumber is used to create the C++ OpenNumberInfo structure
+type OpenNumber struct {
+	// Name of the open number (e.g. 'N')
+	Name string
+	// Optional type matcher constraint.
+	// Either an index in Matchers::type, or -1
+	MatcherIndex int
+}
+
+// Parameter is used to create the C++ ParameterInfo structure
+type Parameter struct {
+	// The parameter usage (parameter name)
+	Usage string
+
+	// Index into BuiltinTable.MatcherIndices, beginning the list of matchers
+	// required to match the parameter type. The matcher indices index
+	// into BuiltinTable::TMatchers and / or BuiltinTable::NMatchers.
+	// These indices are consumed by the matchers themselves.
+	// The first index is always a TypeMatcher.
+	MatcherIndicesOffset *int
+}
+
+// Overload is used to create the C++ OverloadInfo structure
+type Overload struct {
+	// Total number of parameters for the overload
+	NumParameters int
+	// Total number of open types for the overload
+	NumOpenTypes int
+	// Total number of open numbers for the overload
+	NumOpenNumbers int
+	// Index to the first open type in BuiltinTable.OpenTypes
+	OpenTypesOffset *int
+	// Index to the first open number in BuiltinTable.OpenNumbers
+	OpenNumbersOffset *int
+	// Index to the first parameter in BuiltinTable.Parameters
+	ParametersOffset *int
+	// Index into BuiltinTable.MatcherIndices, beginning the list of matchers
+	// required to match the return type. The matcher indices index
+	// into BuiltinTable::TMatchers and / or BuiltinTable::NMatchers.
+	// These indices are consumed by the matchers themselves.
+	// The first index is always a TypeMatcher.
+	ReturnMatcherIndicesOffset *int
+	// StageUses describes the stages an overload can be used in
+	CanBeUsedInStage sem.StageUses
+	// True if the overload is marked as deprecated
+	IsDeprecated bool
+}
+
+// Function is used to create the C++ IntrinsicInfo structure
+type Function struct {
+	OverloadDescriptions []string
+	NumOverloads         int
+	OverloadsOffset      *int
+}
+
+// Helper for building the BuiltinTable
+type BuiltinTableBuilder struct {
+	// The output of the builder
+	BuiltinTable
+
+	// Lookup tables.
+	// These are packed (compressed) once all the entries have been added.
+	lut struct {
+		matcherIndices lut.LUT
+		openTypes      lut.LUT
+		openNumbers    lut.LUT
+		parameters     lut.LUT
+		overloads      lut.LUT
+	}
+}
+
+// Helper for building a single overload
+type overloadBuilder struct {
+	*BuiltinTableBuilder
+	// Maps TemplateParam to index in openTypes
+	openTypeIndex map[sem.TemplateParam]int
+	// Maps TemplateParam to index in openNumbers
+	openNumberIndex map[sem.TemplateParam]int
+	// Open types used by the overload
+	openTypes []OpenType
+	// Open numbers used by the overload
+	openNumbers []OpenNumber
+	// All parameters declared by the overload
+	parameters []Parameter
+	// Index into BuiltinTable.MatcherIndices, beginning the list of matchers
+	// required to match the return type. The matcher indices index
+	// into BuiltinTable::TMatchers and / or BuiltinTable::NMatchers.
+	// These indices are consumed by the matchers themselves.
+	// The first index is always a TypeMatcher.
+	returnTypeMatcherIndicesOffset *int
+}
+
+// layoutMatchers assigns each of the TMatchers and NMatchers a unique index
+// in the C++ Matchers::type and Matchers::number arrays, respectively.
+func (b *BuiltinTableBuilder) layoutMatchers(s *sem.Sem) {
+	// First MaxOpenTypes of TMatchers are open types
+	b.TMatchers = make([]sem.Named, s.MaxOpenTypes)
+	for _, m := range s.Types {
+		b.TMatcherIndex[m] = len(b.TMatchers)
+		b.TMatchers = append(b.TMatchers, m)
+	}
+	for _, m := range s.TypeMatchers {
+		b.TMatcherIndex[m] = len(b.TMatchers)
+		b.TMatchers = append(b.TMatchers, m)
+	}
+
+	// First MaxOpenNumbers of NMatchers are open numbers
+	b.NMatchers = make([]sem.Named, s.MaxOpenNumbers)
+	for _, m := range s.EnumMatchers {
+		b.NMatcherIndex[m] = len(b.NMatchers)
+		b.NMatchers = append(b.NMatchers, m)
+	}
+}
+
+// buildOverload constructs an Overload for a sem.Overload
+func (b *BuiltinTableBuilder) buildOverload(o *sem.Overload) (Overload, error) {
+	ob := overloadBuilder{
+		BuiltinTableBuilder: b,
+		openTypeIndex:       map[sem.TemplateParam]int{},
+		openNumberIndex:     map[sem.TemplateParam]int{},
+	}
+
+	if err := ob.buildOpenTypes(o); err != nil {
+		return Overload{}, err
+	}
+	if err := ob.buildOpenNumbers(o); err != nil {
+		return Overload{}, err
+	}
+	if err := ob.buildParameters(o); err != nil {
+		return Overload{}, err
+	}
+	if err := ob.buildReturnType(o); err != nil {
+		return Overload{}, err
+	}
+
+	return Overload{
+		NumParameters:              len(ob.parameters),
+		NumOpenTypes:               len(ob.openTypes),
+		NumOpenNumbers:             len(ob.openNumbers),
+		OpenTypesOffset:            b.lut.openTypes.Add(ob.openTypes),
+		OpenNumbersOffset:          b.lut.openNumbers.Add(ob.openNumbers),
+		ParametersOffset:           b.lut.parameters.Add(ob.parameters),
+		ReturnMatcherIndicesOffset: ob.returnTypeMatcherIndicesOffset,
+		CanBeUsedInStage:           o.CanBeUsedInStage,
+		IsDeprecated:               o.IsDeprecated,
+	}, nil
+}
+
+// buildOpenTypes constructs the OpenTypes used by the overload, populating
+// b.openTypes
+func (b *overloadBuilder) buildOpenTypes(o *sem.Overload) error {
+	b.openTypes = make([]OpenType, len(o.OpenTypes))
+	for i, t := range o.OpenTypes {
+		b.openTypeIndex[t] = i
+		matcherIndex := -1
+		if t.Type != nil {
+			var err error
+			matcherIndex, err = b.matcherIndex(t.Type)
+			if err != nil {
+				return err
+			}
+		}
+		b.openTypes[i] = OpenType{
+			Name:         t.Name,
+			MatcherIndex: matcherIndex,
+		}
+	}
+	return nil
+}
+
+// buildOpenNumbers constructs the OpenNumbers used by the overload, populating
+// b.openNumbers
+func (b *overloadBuilder) buildOpenNumbers(o *sem.Overload) error {
+	b.openNumbers = make([]OpenNumber, len(o.OpenNumbers))
+	for i, t := range o.OpenNumbers {
+		b.openNumberIndex[t] = i
+		matcherIndex := -1
+		if e, ok := t.(*sem.TemplateEnumParam); ok && e.Matcher != nil {
+			var err error
+			matcherIndex, err = b.matcherIndex(e.Matcher)
+			if err != nil {
+				return err
+			}
+		}
+		b.openNumbers[i] = OpenNumber{
+			Name:         t.GetName(),
+			MatcherIndex: matcherIndex,
+		}
+	}
+	return nil
+}
+
+// buildParameters constructs the Parameters used by the overload, populating
+// b.parameters
+func (b *overloadBuilder) buildParameters(o *sem.Overload) error {
+	b.parameters = make([]Parameter, len(o.Parameters))
+	for i, p := range o.Parameters {
+		indices, err := b.collectMatcherIndices(p.Type)
+		if err != nil {
+			return err
+		}
+
+		b.parameters[i] = Parameter{
+			Usage:                p.Name,
+			MatcherIndicesOffset: b.lut.matcherIndices.Add(indices),
+		}
+	}
+	return nil
+}
+
+// buildParameters calculates the matcher indices required to match the
+// overload's return type (if the overload has a return value), possibly
+// populating b.returnTypeMatcherIndicesOffset
+func (b *overloadBuilder) buildReturnType(o *sem.Overload) error {
+	if o.ReturnType != nil {
+		indices, err := b.collectMatcherIndices(*o.ReturnType)
+		if err != nil {
+			return err
+		}
+		b.returnTypeMatcherIndicesOffset = b.lut.matcherIndices.Add(indices)
+	}
+	return nil
+}
+
+// matcherIndex returns the index of TMatcher or NMatcher in
+// BuiltinTable.TMatcher or BuiltinTable.NMatcher, respectively.
+func (b *overloadBuilder) matcherIndex(n sem.Named) (int, error) {
+	switch n := n.(type) {
+	case *sem.Type, *sem.TypeMatcher:
+		if i, ok := b.TMatcherIndex[n]; ok {
+			return i, nil
+		}
+		return 0, fmt.Errorf("matcherIndex missing entry for %v %T", n.GetName(), n)
+	case *sem.TemplateTypeParam:
+		if i, ok := b.openTypeIndex[n]; ok {
+			return i, nil
+		}
+		return 0, fmt.Errorf("openTypeIndex missing entry for %v %T", n.Name, n)
+	case *sem.EnumMatcher:
+		if i, ok := b.NMatcherIndex[n]; ok {
+			return i, nil
+		}
+		return 0, fmt.Errorf("matcherIndex missing entry for %v %T", n.GetName(), n)
+	case *sem.TemplateEnumParam:
+		if i, ok := b.openNumberIndex[n]; ok {
+			return i, nil
+		}
+		return 0, fmt.Errorf("openNumberIndex missing entry for %v %T", n, n)
+	case *sem.TemplateNumberParam:
+		if i, ok := b.openNumberIndex[n]; ok {
+			return i, nil
+		}
+		return 0, fmt.Errorf("openNumberIndex missing entry for %v %T", n, n)
+	default:
+		return 0, fmt.Errorf("overload.matcherIndex() does not handle %v %T", n, n)
+	}
+}
+
+// collectMatcherIndices returns the full list of matcher indices required to
+// match the fully-qualified-name. For names that have do not have templated
+// arguments, collectMatcherIndices() will return a single TMatcher index.
+// For names that do have templated arguments, collectMatcherIndices() returns
+// a list of type matcher indices, starting with the target of the fully
+// qualified name, then followed by each of the template arguments from left to
+// right. Note that template arguments may themselves have template arguments,
+// and so collectMatcherIndices() may call itself.
+// The order of returned matcher indices is always the order of the fully
+// qualified name as read from left to right.
+// For example, calling collectMatcherIndices() for the fully qualified name:
+//    A<B<C, D>, E<F, G<H>, I>
+// Would return the matcher indices:
+//    A, B, C, D, E, F, G, H, I
+func (b *overloadBuilder) collectMatcherIndices(fqn sem.FullyQualifiedName) ([]int, error) {
+	idx, err := b.matcherIndex(fqn.Target)
+	if err != nil {
+		return nil, err
+	}
+	out := []int{idx}
+	for _, arg := range fqn.TemplateArguments {
+		indices, err := b.collectMatcherIndices(arg.(sem.FullyQualifiedName))
+		if err != nil {
+			return nil, err
+		}
+		out = append(out, indices...)
+	}
+	return out, nil
+}
+
+// buildBuiltinTable builds the BuiltinTable from the semantic info
+func buildBuiltinTable(s *sem.Sem) (*BuiltinTable, error) {
+	b := BuiltinTableBuilder{
+		BuiltinTable: BuiltinTable{
+			Sem:           s,
+			TMatcherIndex: map[sem.Named]int{},
+			NMatcherIndex: map[sem.Named]int{},
+		},
+	}
+	b.lut.matcherIndices = lut.New(list.Wrap(&b.MatcherIndices))
+	b.lut.openTypes = lut.New(list.Wrap(&b.OpenTypes))
+	b.lut.openNumbers = lut.New(list.Wrap(&b.OpenNumbers))
+	b.lut.parameters = lut.New(list.Wrap(&b.Parameters))
+	b.lut.overloads = lut.New(list.Wrap(&b.Overloads))
+
+	b.layoutMatchers(s)
+
+	for _, f := range s.Functions {
+		overloads := make([]Overload, len(f.Overloads))
+		overloadDescriptions := make([]string, len(f.Overloads))
+		for i, o := range f.Overloads {
+			overloadDescriptions[i] = fmt.Sprint(o.Decl)
+			var err error
+			if overloads[i], err = b.buildOverload(o); err != nil {
+				return nil, err
+			}
+		}
+
+		b.Functions = append(b.Functions, Function{
+			OverloadDescriptions: overloadDescriptions,
+			NumOverloads:         len(overloads),
+			OverloadsOffset:      b.lut.overloads.Add(overloads),
+		})
+	}
+
+	b.lut.matcherIndices.Compact()
+	b.lut.openTypes.Compact()
+	b.lut.openNumbers.Compact()
+	b.lut.parameters.Compact()
+	b.lut.overloads.Compact()
+
+	return &b.BuiltinTable, nil
+}
diff --git a/tools/src/cmd/builtin-gen/gen/generate.go b/tools/src/cmd/builtin-gen/gen/generate.go
new file mode 100644
index 0000000..ad9fd7e
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/gen/generate.go
@@ -0,0 +1,271 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package gen
+
+import (
+	"fmt"
+	"io"
+	"reflect"
+	"strings"
+	"text/template"
+	"unicode"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/sem"
+)
+
+type generator struct {
+	s      *sem.Sem
+	t      *template.Template
+	cached struct {
+		builtinTable *BuiltinTable // lazily built by builtinTable()
+		permuter     *Permuter     // lazily built by permute()
+	}
+}
+
+// WriteFile is a function that Generate() may call to emit a new file from a
+// template.
+// relpath is the relative path from the currently executing template.
+// content is the file content to write.
+type WriteFile func(relpath, content string) error
+
+// Generate executes the template tmpl using the provided semantic
+// information, writing the output to w.
+// See https://golang.org/pkg/text/template/ for documentation on the template
+// syntax.
+func Generate(s *sem.Sem, tmpl string, w io.Writer, writeFile WriteFile) error {
+	g := generator{s: s}
+	return g.generate(tmpl, w, writeFile)
+}
+
+func (g *generator) generate(tmpl string, w io.Writer, writeFile WriteFile) error {
+	t, err := template.New("<template>").Funcs(map[string]interface{}{
+		"Map":                   newMap,
+		"Iterate":               iterate,
+		"Title":                 strings.Title,
+		"PascalCase":            pascalCase,
+		"SplitDisplayName":      splitDisplayName,
+		"HasPrefix":             strings.HasPrefix,
+		"HasSuffix":             strings.HasSuffix,
+		"TrimPrefix":            strings.TrimPrefix,
+		"TrimSuffix":            strings.TrimSuffix,
+		"TrimLeft":              strings.TrimLeft,
+		"TrimRight":             strings.TrimRight,
+		"IsEnumEntry":           is(sem.EnumEntry{}),
+		"IsEnumMatcher":         is(sem.EnumMatcher{}),
+		"IsFQN":                 is(sem.FullyQualifiedName{}),
+		"IsInt":                 is(1),
+		"IsTemplateEnumParam":   is(sem.TemplateEnumParam{}),
+		"IsTemplateNumberParam": is(sem.TemplateNumberParam{}),
+		"IsTemplateTypeParam":   is(sem.TemplateTypeParam{}),
+		"IsType":                is(sem.Type{}),
+		"IsDeclarable":          isDeclarable,
+		"IsFirstIn":             isFirstIn,
+		"IsLastIn":              isLastIn,
+		"BuiltinTable":          g.builtinTable,
+		"Permute":               g.permute,
+		"Eval":                  g.eval,
+		"WriteFile":             func(relpath, content string) (string, error) { return "", writeFile(relpath, content) },
+	}).Option("missingkey=error").
+		Parse(tmpl)
+	if err != nil {
+		return err
+	}
+	g.t = t
+	return t.Execute(w, map[string]interface{}{
+		"Sem": g.s,
+	})
+}
+
+// eval executes the sub-template with the given name and argument, returning
+// the generated output
+func (g *generator) eval(template string, args ...interface{}) (string, error) {
+	target := g.t.Lookup(template)
+	if target == nil {
+		return "", fmt.Errorf("template '%v' not found", template)
+	}
+	sb := strings.Builder{}
+
+	var err error
+	if len(args) == 1 {
+		err = target.Execute(&sb, args[0])
+	} else {
+		m := newMap()
+		if len(args)%2 != 0 {
+			return "", fmt.Errorf("Eval expects a single argument or list name-value pairs")
+		}
+		for i := 0; i < len(args); i += 2 {
+			name, ok := args[i].(string)
+			if !ok {
+				return "", fmt.Errorf("Eval argument %v is not a string", i)
+			}
+			m.Put(name, args[i+1])
+		}
+		err = target.Execute(&sb, m)
+	}
+
+	if err != nil {
+		return "", fmt.Errorf("while evaluating '%v': %v", template, err)
+	}
+	return sb.String(), nil
+}
+
+// builtinTable lazily calls and returns the result of buildBuiltinTable(),
+// caching the result for repeated calls.
+func (g *generator) builtinTable() (*BuiltinTable, error) {
+	if g.cached.builtinTable == nil {
+		var err error
+		g.cached.builtinTable, err = buildBuiltinTable(g.s)
+		if err != nil {
+			return nil, err
+		}
+	}
+	return g.cached.builtinTable, nil
+}
+
+// permute lazily calls buildPermuter(), caching the result for repeated
+// calls, then passes the argument to Permutator.Permute()
+func (g *generator) permute(overload *sem.Overload) ([]Permutation, error) {
+	if g.cached.permuter == nil {
+		var err error
+		g.cached.permuter, err = buildPermuter(g.s)
+		if err != nil {
+			return nil, err
+		}
+	}
+	return g.cached.permuter.Permute(overload)
+}
+
+// Map is a simple generic key-value map, which can be used in the template
+type Map map[interface{}]interface{}
+
+func newMap() Map { return Map{} }
+
+// Put adds the key-value pair into the map.
+// Put always returns an empty string so nothing is printed in the template.
+func (m Map) Put(key, value interface{}) string {
+	m[key] = value
+	return ""
+}
+
+// Get looks up and returns the value with the given key. If the map does not
+// contain the given key, then nil is returned.
+func (m Map) Get(key interface{}) interface{} {
+	return m[key]
+}
+
+// is returns a function that returns true if the value passed to the function
+// matches the type of 'ty'.
+func is(ty interface{}) func(interface{}) bool {
+	rty := reflect.TypeOf(ty)
+	return func(v interface{}) bool {
+		ty := reflect.TypeOf(v)
+		return ty == rty || ty == reflect.PtrTo(rty)
+	}
+}
+
+// isFirstIn returns true if v is the first element of the given slice.
+func isFirstIn(v, slice interface{}) bool {
+	s := reflect.ValueOf(slice)
+	count := s.Len()
+	if count == 0 {
+		return false
+	}
+	return s.Index(0).Interface() == v
+}
+
+// isFirstIn returns true if v is the last element of the given slice.
+func isLastIn(v, slice interface{}) bool {
+	s := reflect.ValueOf(slice)
+	count := s.Len()
+	if count == 0 {
+		return false
+	}
+	return s.Index(count-1).Interface() == v
+}
+
+// iterate returns a slice of length 'n', with each element equal to its index.
+// Useful for: {{- range Iterate $n -}}<this will be looped $n times>{{end}}
+func iterate(n int) []int {
+	out := make([]int, n)
+	for i := range out {
+		out[i] = i
+	}
+	return out
+}
+
+// isDeclarable returns false if the FullyQualifiedName starts with a
+// leading underscore. These are undeclarable as WGSL does not allow identifers
+// to have a leading underscore.
+func isDeclarable(fqn sem.FullyQualifiedName) bool {
+	return !strings.HasPrefix(fqn.Target.GetName(), "_")
+}
+
+// pascalCase returns the snake-case string s transformed into 'PascalCase',
+// Rules:
+// * The first letter of the string is capitalized
+// * Characters following an underscore or number are capitalized
+// * Underscores are removed from the returned string
+// See: https://en.wikipedia.org/wiki/Camel_case
+func pascalCase(s string) string {
+	b := strings.Builder{}
+	upper := true
+	for _, r := range s {
+		if r == '_' {
+			upper = true
+			continue
+		}
+		if upper {
+			b.WriteRune(unicode.ToUpper(r))
+			upper = false
+		} else {
+			b.WriteRune(r)
+		}
+		if unicode.IsNumber(r) {
+			upper = true
+		}
+	}
+	return b.String()
+}
+
+// splitDisplayName splits displayName into parts, where text wrapped in {}
+// braces are not quoted and the rest is quoted. This is used to help process
+// the string value of the [[display()]] decoration. For example:
+//   splitDisplayName("vec{N}<{T}>")
+// would return the strings:
+//   [`"vec"`, `N`, `"<"`, `T`, `">"`]
+func splitDisplayName(displayName string) []string {
+	parts := []string{}
+	pending := strings.Builder{}
+	for _, r := range displayName {
+		switch r {
+		case '{':
+			if pending.Len() > 0 {
+				parts = append(parts, fmt.Sprintf(`"%v"`, pending.String()))
+				pending.Reset()
+			}
+		case '}':
+			if pending.Len() > 0 {
+				parts = append(parts, pending.String())
+				pending.Reset()
+			}
+		default:
+			pending.WriteRune(r)
+		}
+	}
+	if pending.Len() > 0 {
+		parts = append(parts, fmt.Sprintf(`"%v"`, pending.String()))
+	}
+	return parts
+}
diff --git a/tools/src/cmd/builtin-gen/gen/permutate.go b/tools/src/cmd/builtin-gen/gen/permutate.go
new file mode 100644
index 0000000..814fcbc
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/gen/permutate.go
@@ -0,0 +1,380 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package gen
+
+import (
+	"crypto/sha256"
+	"encoding/hex"
+	"fmt"
+	"strings"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/sem"
+	"dawn.googlesource.com/tint/tools/src/fileutils"
+)
+
+// Permuter generates permutations of intrinsic overloads
+type Permuter struct {
+	sem      *sem.Sem
+	allTypes []sem.FullyQualifiedName
+}
+
+// buildPermuter returns a new initialized Permuter
+func buildPermuter(s *sem.Sem) (*Permuter, error) {
+	// allTypes are the list of FQNs that are used for open, unconstrained types
+	allTypes := []sem.FullyQualifiedName{}
+	for _, ty := range s.Types {
+		if len(ty.TemplateParams) > 0 {
+			// Ignore aggregate types for now.
+			// TODO(bclayton): Support a limited set of aggregate types
+			continue
+		}
+		allTypes = append(allTypes, sem.FullyQualifiedName{Target: ty})
+	}
+	return &Permuter{
+		sem:      s,
+		allTypes: allTypes,
+	}, nil
+}
+
+// Permutation describes a single permutation of an overload
+type Permutation struct {
+	sem.Overload        // The permutated overload signature
+	Desc         string // Description of the overload
+	Hash         string // Hash of the overload
+}
+
+// Permute generates a set of permutations for the given intrinsic overload
+func (p *Permuter) Permute(overload *sem.Overload) ([]Permutation, error) {
+	state := permutationState{
+		Permuter:      p,
+		closedTypes:   map[sem.TemplateParam]sem.FullyQualifiedName{},
+		closedNumbers: map[sem.TemplateParam]interface{}{},
+		parameters:    map[int]sem.FullyQualifiedName{},
+	}
+
+	out := []Permutation{}
+
+	// Map of hash to permutation description. Used to detect collisions.
+	hashes := map[string]string{}
+
+	// permutate appends a permutation to out.
+	// permutate may be chained to generate N-dimensional permutations.
+	permutate := func() error {
+		o := sem.Overload{
+			Decl:             overload.Decl,
+			Function:         overload.Function,
+			CanBeUsedInStage: overload.CanBeUsedInStage,
+		}
+		for i, p := range overload.Parameters {
+			ty := state.parameters[i]
+			if !validate(ty, &o.CanBeUsedInStage) {
+				return nil
+			}
+			o.Parameters = append(o.Parameters, sem.Parameter{
+				Name: p.Name,
+				Type: ty,
+			})
+		}
+		if overload.ReturnType != nil {
+			retTys, err := state.permutateFQN(*overload.ReturnType)
+			if err != nil {
+				return fmt.Errorf("while permutating return type: %w", err)
+			}
+			if len(retTys) != 1 {
+				return fmt.Errorf("result type not pinned")
+			}
+			o.ReturnType = &retTys[0]
+		}
+		desc := fmt.Sprint(o)
+		hash := sha256.Sum256([]byte(desc))
+		const hashLength = 6
+		shortHash := hex.EncodeToString(hash[:])[:hashLength]
+		out = append(out, Permutation{
+			Overload: o,
+			Desc:     desc,
+			Hash:     shortHash,
+		})
+
+		// Check for hash collisions
+		if existing, collision := hashes[shortHash]; collision {
+			return fmt.Errorf("hash '%v' collision between %v and %v\nIncrease hashLength in %v",
+				shortHash, existing, desc, fileutils.GoSourcePath())
+		}
+		hashes[shortHash] = desc
+		return nil
+	}
+	for i, param := range overload.Parameters {
+		i, param := i, param // Capture iterator values for anonymous function
+		next := permutate    // Permutation chaining
+		permutate = func() error {
+			permutations, err := state.permutateFQN(param.Type)
+			if err != nil {
+				return fmt.Errorf("while processing parameter %v: %w", i, err)
+			}
+			if len(permutations) == 0 {
+				return fmt.Errorf("parameter %v has no permutations", i)
+			}
+			for _, fqn := range permutations {
+				state.parameters[i] = fqn
+				if err := next(); err != nil {
+					return err
+				}
+			}
+			return nil
+		}
+	}
+	for _, t := range overload.TemplateParams {
+		next := permutate // Permutation chaining
+		switch t := t.(type) {
+		case *sem.TemplateTypeParam:
+			types := p.allTypes
+			if t.Type != nil {
+				var err error
+				types, err = state.permutateFQN(sem.FullyQualifiedName{Target: t.Type})
+				if err != nil {
+					return nil, fmt.Errorf("while permutating open types: %w", err)
+				}
+			}
+			if len(types) == 0 {
+				return nil, fmt.Errorf("open type %v has no permutations", t.Name)
+			}
+			permutate = func() error {
+				for _, ty := range types {
+					state.closedTypes[t] = ty
+					if err := next(); err != nil {
+						return err
+					}
+				}
+				return nil
+			}
+		case *sem.TemplateEnumParam:
+			var permutations []sem.FullyQualifiedName
+			var err error
+			if t.Matcher != nil {
+				permutations, err = state.permutateFQN(sem.FullyQualifiedName{Target: t.Matcher})
+			} else {
+				permutations, err = state.permutateFQN(sem.FullyQualifiedName{Target: t.Enum})
+			}
+			if err != nil {
+				return nil, fmt.Errorf("while permutating open numbers: %w", err)
+			}
+			if len(permutations) == 0 {
+				return nil, fmt.Errorf("open type %v has no permutations", t.Name)
+			}
+			permutate = func() error {
+				for _, n := range permutations {
+					state.closedNumbers[t] = n
+					if err := next(); err != nil {
+						return err
+					}
+				}
+				return nil
+			}
+		case *sem.TemplateNumberParam:
+			// Currently all open numbers are used for vector / matrices
+			permutations := []int{2, 3, 4}
+			permutate = func() error {
+				for _, n := range permutations {
+					state.closedNumbers[t] = n
+					if err := next(); err != nil {
+						return err
+					}
+				}
+				return nil
+			}
+		}
+	}
+
+	if err := permutate(); err != nil {
+		return nil, fmt.Errorf("%v %v %w\nState: %v", overload.Decl.Source, overload.Decl, err, state)
+	}
+
+	return out, nil
+}
+
+type permutationState struct {
+	*Permuter
+	closedTypes   map[sem.TemplateParam]sem.FullyQualifiedName
+	closedNumbers map[sem.TemplateParam]interface{}
+	parameters    map[int]sem.FullyQualifiedName
+}
+
+func (s permutationState) String() string {
+	sb := &strings.Builder{}
+	sb.WriteString("Closed types:\n")
+	for ct, ty := range s.closedTypes {
+		fmt.Fprintf(sb, "  %v: %v\n", ct.GetName(), ty)
+	}
+	sb.WriteString("Closed numbers:\n")
+	for cn, v := range s.closedNumbers {
+		fmt.Fprintf(sb, "  %v: %v\n", cn.GetName(), v)
+	}
+	return sb.String()
+}
+
+func (s *permutationState) permutateFQN(in sem.FullyQualifiedName) ([]sem.FullyQualifiedName, error) {
+	args := append([]interface{}{}, in.TemplateArguments...)
+	out := []sem.FullyQualifiedName{}
+
+	// permutate appends a permutation to out.
+	// permutate may be chained to generate N-dimensional permutations.
+	var permutate func() error
+
+	switch target := in.Target.(type) {
+	case *sem.Type:
+		permutate = func() error {
+			out = append(out, sem.FullyQualifiedName{Target: in.Target, TemplateArguments: args})
+			args = append([]interface{}{}, in.TemplateArguments...)
+			return nil
+		}
+	case sem.TemplateParam:
+		if ty, ok := s.closedTypes[target]; ok {
+			permutate = func() error {
+				out = append(out, ty)
+				return nil
+			}
+		} else {
+			return nil, fmt.Errorf("'%v' was not found in closedTypes", target.GetName())
+		}
+	case *sem.TypeMatcher:
+		permutate = func() error {
+			for _, ty := range target.Types {
+				out = append(out, sem.FullyQualifiedName{Target: ty})
+			}
+			return nil
+		}
+	case *sem.EnumMatcher:
+		permutate = func() error {
+			for _, o := range target.Options {
+				if !o.IsInternal {
+					out = append(out, sem.FullyQualifiedName{Target: o})
+				}
+			}
+			return nil
+		}
+	case *sem.Enum:
+		permutate = func() error {
+			for _, e := range target.Entries {
+				if !e.IsInternal {
+					out = append(out, sem.FullyQualifiedName{Target: e})
+				}
+			}
+			return nil
+		}
+	default:
+		return nil, fmt.Errorf("unhandled target type: %T", in.Target)
+	}
+
+	for i, arg := range in.TemplateArguments {
+		i := i            // Capture iterator value for anonymous functions
+		next := permutate // Permutation chaining
+		switch arg := arg.(type) {
+		case sem.FullyQualifiedName:
+			switch target := arg.Target.(type) {
+			case sem.TemplateParam:
+				if ty, ok := s.closedTypes[target]; ok {
+					args[i] = ty
+				} else if num, ok := s.closedNumbers[target]; ok {
+					args[i] = num
+				} else {
+					return nil, fmt.Errorf("'%v' was not found in closedTypes or closedNumbers", target.GetName())
+				}
+			default:
+				perms, err := s.permutateFQN(arg)
+				if err != nil {
+					return nil, fmt.Errorf("while processing template argument %v: %v", i, err)
+				}
+				if len(perms) == 0 {
+					return nil, fmt.Errorf("template argument %v has no permutations", i)
+				}
+				permutate = func() error {
+					for _, f := range perms {
+						args[i] = f
+						if err := next(); err != nil {
+							return err
+						}
+					}
+					return nil
+				}
+			}
+		default:
+			return nil, fmt.Errorf("permutateFQN() unhandled template argument type: %T", arg)
+		}
+	}
+
+	if err := permutate(); err != nil {
+		return nil, fmt.Errorf("while processing fully qualified name '%v': %w", in.Target.GetName(), err)
+	}
+
+	return out, nil
+}
+
+func validate(fqn sem.FullyQualifiedName, uses *sem.StageUses) bool {
+	switch fqn.Target.GetName() {
+	case "array":
+		elTy := fqn.TemplateArguments[0].(sem.FullyQualifiedName)
+		elTyName := elTy.Target.GetName()
+		switch {
+		case elTyName == "bool" ||
+			strings.Contains(elTyName, "sampler"),
+			strings.Contains(elTyName, "texture"):
+			return false // Not storable
+		}
+	case "ptr":
+		// https://gpuweb.github.io/gpuweb/wgsl/#storage-class
+		access := fqn.TemplateArguments[2].(sem.FullyQualifiedName).Target.(*sem.EnumEntry).Name
+		storageClass := fqn.TemplateArguments[0].(sem.FullyQualifiedName).Target.(*sem.EnumEntry).Name
+		switch storageClass {
+		case "function", "private":
+			if access != "read_write" {
+				return false
+			}
+		case "workgroup":
+			uses.Vertex = false
+			uses.Fragment = false
+			if access != "read_write" {
+				return false
+			}
+		case "uniform":
+			if access != "read" {
+				return false
+			}
+		case "storage":
+			if access != "read_write" && access != "read" {
+				return false
+			}
+		case "handle":
+			if access != "read" {
+				return false
+			}
+		default:
+			return false
+		}
+	}
+
+	if !isDeclarable(fqn) {
+		return false
+	}
+
+	for _, arg := range fqn.TemplateArguments {
+		if argFQN, ok := arg.(sem.FullyQualifiedName); ok {
+			if !validate(argFQN, uses) {
+				return false
+			}
+		}
+	}
+
+	return true
+}
diff --git a/tools/src/cmd/builtin-gen/lexer/lexer.go b/tools/src/cmd/builtin-gen/lexer/lexer.go
new file mode 100644
index 0000000..fa50b22
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/lexer/lexer.go
@@ -0,0 +1,200 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package lexer provides a basic lexer for the Tint intrinsic definition
+// language
+package lexer
+
+import (
+	"fmt"
+	"unicode"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/tok"
+)
+
+// Lex produces a list of tokens for the given source code
+func Lex(src []rune, filepath string) ([]tok.Token, error) {
+	l := lexer{
+		tok.Location{Line: 1, Column: 1, Rune: 0, Filepath: filepath},
+		src,
+		[]tok.Token{},
+	}
+	if err := l.lex(); err != nil {
+		return nil, err
+	}
+	return l.tokens, nil
+}
+
+type lexer struct {
+	loc    tok.Location
+	runes  []rune
+	tokens []tok.Token
+}
+
+// lex() lexes the source, populating l.tokens
+func (l *lexer) lex() error {
+	for {
+		switch l.peek(0) {
+		case 0:
+			return nil
+		case ' ', '\t':
+			l.next()
+		case '\n':
+			l.next()
+		case '<':
+			l.tok(1, tok.Lt)
+		case '>':
+			l.tok(1, tok.Gt)
+		case '(':
+			l.tok(1, tok.Lparen)
+		case ')':
+			l.tok(1, tok.Rparen)
+		case '{':
+			l.tok(1, tok.Lbrace)
+		case '}':
+			l.tok(1, tok.Rbrace)
+		case ':':
+			l.tok(1, tok.Colon)
+		case ',':
+			l.tok(1, tok.Comma)
+		case '|':
+			l.tok(1, tok.Or)
+		case '"':
+			start := l.loc
+			l.next() // Skip opening quote
+			n := l.count(toFirst('\n', '"'))
+			if l.peek(n) != '"' {
+				return fmt.Errorf("%v unterminated string", start)
+			}
+			l.tok(n, tok.String)
+			l.next() // Skip closing quote
+		default:
+			switch {
+			case l.peek(1) == '/':
+				l.skip(l.count(toFirst('\n')))
+				l.next() // Consume newline
+			case l.match("[[", tok.Ldeco):
+			case l.match("]]", tok.Rdeco):
+			case l.match("->", tok.Arrow):
+			case l.match("fn", tok.Function):
+			case l.match("enum", tok.Enum):
+			case l.match("type", tok.Type):
+			case l.match("match", tok.Match):
+			case unicode.IsLetter(l.peek(0)) || l.peek(0) == '_':
+				l.tok(l.count(alphaNumericOrUnderscore), tok.Identifier)
+			case unicode.IsNumber(l.peek(0)):
+				l.tok(l.count(unicode.IsNumber), tok.Integer)
+			default:
+				return fmt.Errorf("%v: unexpected '%v'", l.loc, string(l.runes[0]))
+			}
+		}
+	}
+}
+
+// next() consumes and returns the next rune in the source, or 0 if reached EOF
+func (l *lexer) next() rune {
+	if len(l.runes) > 0 {
+		r := l.runes[0]
+		l.runes = l.runes[1:]
+		l.loc.Rune++
+		if r == '\n' {
+			l.loc.Line++
+			l.loc.Column = 1
+		} else {
+			l.loc.Column++
+		}
+		return r
+	}
+	return 0
+}
+
+// skip() consumes the next `n` runes in the source
+func (l *lexer) skip(n int) {
+	for i := 0; i < n; i++ {
+		l.next()
+	}
+}
+
+// peek() returns the rune `i` runes ahead of the current position
+func (l *lexer) peek(i int) rune {
+	if i >= len(l.runes) {
+		return 0
+	}
+	return l.runes[i]
+}
+
+// predicate is a function that can be passed to count()
+type predicate func(r rune) bool
+
+// count() returns the number of sequential runes from the current position that
+// match the predicate `p`
+func (l *lexer) count(p predicate) int {
+	for i := 0; i < len(l.runes); i++ {
+		if !p(l.peek(i)) {
+			return i
+		}
+	}
+	return len(l.runes)
+}
+
+// tok() appends a new token of kind `k` using the next `n` runes.
+// The next `n` runes are consumed by tok().
+func (l *lexer) tok(n int, k tok.Kind) {
+	start := l.loc
+	runes := l.runes[:n]
+	l.skip(n)
+	end := l.loc
+
+	src := tok.Source{S: start, E: end}
+	l.tokens = append(l.tokens, tok.Token{Kind: k, Source: src, Runes: runes})
+}
+
+// match() checks whether the next runes are equal to `s`. If they are, then
+// these runes are used to append a new token of kind `k`, and match() returns
+// true. If the next runes are not equal to `s` then false is returned, and no
+// runes are consumed.
+func (l *lexer) match(s string, kind tok.Kind) bool {
+	runes := []rune(s)
+	if len(l.runes) < len(runes) {
+		return false
+	}
+	for i, r := range runes {
+		if l.runes[i] != r {
+			return false
+		}
+	}
+	l.tok(len(runes), kind)
+	return true
+}
+
+// toFirst() returns a predicate that returns true if the rune is not in `runes`
+// toFirst() is intended to be used with count(), so `count(toFirst('x'))` will
+// count up to, but not including the number of consecutive runes that are not
+// 'x'.
+func toFirst(runes ...rune) predicate {
+	return func(r rune) bool {
+		for _, t := range runes {
+			if t == r {
+				return false
+			}
+		}
+		return true
+	}
+}
+
+// alphaNumericOrUnderscore() returns true if the rune `r` is a number, letter
+// or underscore.
+func alphaNumericOrUnderscore(r rune) bool {
+	return r == '_' || unicode.IsLetter(r) || unicode.IsNumber(r)
+}
diff --git a/tools/src/cmd/builtin-gen/lexer/lexer_test.go b/tools/src/cmd/builtin-gen/lexer/lexer_test.go
new file mode 100644
index 0000000..940163d
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/lexer/lexer_test.go
@@ -0,0 +1,147 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package lexer_test
+
+import (
+	"fmt"
+	"testing"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/lexer"
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/tok"
+)
+
+func TestLexTokens(t *testing.T) {
+	type test struct {
+		src    string
+		expect tok.Token
+	}
+
+	filepath := "test.txt"
+	loc := func(l, c, r int) tok.Location {
+		return tok.Location{Line: l, Column: c, Rune: r, Filepath: filepath}
+	}
+
+	for _, test := range []test{
+		{"ident", tok.Token{Kind: tok.Identifier, Runes: []rune("ident"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 6, 5),
+		}}},
+		{"ident_123", tok.Token{Kind: tok.Identifier, Runes: []rune("ident_123"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 10, 9),
+		}}},
+		{"_ident_", tok.Token{Kind: tok.Identifier, Runes: []rune("_ident_"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 8, 7),
+		}}},
+		{"123456789", tok.Token{Kind: tok.Integer, Runes: []rune("123456789"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 10, 9),
+		}}},
+		{"match", tok.Token{Kind: tok.Match, Runes: []rune("match"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 6, 5),
+		}}},
+		{"fn", tok.Token{Kind: tok.Function, Runes: []rune("fn"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 3, 2),
+		}}},
+		{"type", tok.Token{Kind: tok.Type, Runes: []rune("type"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 5, 4),
+		}}},
+		{"enum", tok.Token{Kind: tok.Enum, Runes: []rune("enum"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 5, 4),
+		}}},
+		{":", tok.Token{Kind: tok.Colon, Runes: []rune(":"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 2, 1),
+		}}},
+		{",", tok.Token{Kind: tok.Comma, Runes: []rune(","), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 2, 1),
+		}}},
+		{"<", tok.Token{Kind: tok.Lt, Runes: []rune("<"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 2, 1),
+		}}},
+		{">", tok.Token{Kind: tok.Gt, Runes: []rune(">"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 2, 1),
+		}}},
+		{"{", tok.Token{Kind: tok.Lbrace, Runes: []rune("{"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 2, 1),
+		}}},
+		{"}", tok.Token{Kind: tok.Rbrace, Runes: []rune("}"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 2, 1),
+		}}},
+		{"[[", tok.Token{Kind: tok.Ldeco, Runes: []rune("[["), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 3, 2),
+		}}},
+		{"]]", tok.Token{Kind: tok.Rdeco, Runes: []rune("]]"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 3, 2),
+		}}},
+		{"(", tok.Token{Kind: tok.Lparen, Runes: []rune("("), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 2, 1),
+		}}},
+		{")", tok.Token{Kind: tok.Rparen, Runes: []rune(")"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 2, 1),
+		}}},
+		{"|", tok.Token{Kind: tok.Or, Runes: []rune("|"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 2, 1),
+		}}},
+		{"->", tok.Token{Kind: tok.Arrow, Runes: []rune("->"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 3, 2),
+		}}},
+		{"x // y ", tok.Token{Kind: tok.Identifier, Runes: []rune("x"), Source: tok.Source{
+			S: loc(1, 1, 0), E: loc(1, 2, 1),
+		}}},
+		{`"abc"`, tok.Token{Kind: tok.String, Runes: []rune("abc"), Source: tok.Source{
+			S: loc(1, 2, 1), E: loc(1, 5, 4),
+		}}},
+		{`
+   //
+   ident
+
+   `, tok.Token{Kind: tok.Identifier, Runes: []rune("ident"), Source: tok.Source{
+			S: loc(3, 4, 10), E: loc(3, 9, 15),
+		}}},
+	} {
+		got, err := lexer.Lex([]rune(test.src), filepath)
+		name := fmt.Sprintf(`Lex("%v")`, test.src)
+		switch {
+		case err != nil:
+			t.Errorf("%v returned error: %v", name, err)
+		case len(got) != 1:
+			t.Errorf("%v returned %d tokens: %v", name, len(got), got)
+		case got[0].Kind != test.expect.Kind:
+			t.Errorf(`%v returned unexpected token kind: got "%+v", expected "%+v"`, name, got[0], test.expect)
+		case string(got[0].Runes) != string(test.expect.Runes):
+			t.Errorf(`%v returned unexpected token runes: got "%+v", expected "%+v"`, name, string(got[0].Runes), string(test.expect.Runes))
+		case got[0].Source != test.expect.Source:
+			t.Errorf(`%v returned unexpected token source: got %+v, expected %+v`, name, got[0].Source, test.expect.Source)
+		}
+	}
+}
+
+func TestErrors(t *testing.T) {
+	type test struct {
+		src    string
+		expect string
+	}
+
+	for _, test := range []test{
+		{" \"abc", "test.txt:1:2 unterminated string"},
+		{" \"abc\n", "test.txt:1:2 unterminated string"},
+		{"*", "test.txt:1:1: unexpected '*'"},
+	} {
+		got, err := lexer.Lex([]rune(test.src), "test.txt")
+		if gotErr := err.Error(); test.expect != gotErr {
+			t.Errorf(`Lex() returned error "%+v", expected error "%+v"`, gotErr, test.expect)
+		}
+		if got != nil {
+			t.Errorf("Lex() returned non-nil for error")
+		}
+	}
+}
diff --git a/tools/src/cmd/builtin-gen/main.go b/tools/src/cmd/builtin-gen/main.go
new file mode 100644
index 0000000..d126cf9
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/main.go
@@ -0,0 +1,173 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// builtin-gen parses the <tint>/src/builtins.def file, then scans the
+// project directory for '<file>.tmpl' files, to produce '<file>' source code
+// files.
+package main
+
+import (
+	"flag"
+	"fmt"
+	"io/ioutil"
+	"os"
+	"path/filepath"
+	"strings"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/gen"
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/parser"
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/resolver"
+	"dawn.googlesource.com/tint/tools/src/fileutils"
+	"dawn.googlesource.com/tint/tools/src/glob"
+)
+
+const defProjectRelPath = "src/builtins.def"
+
+func main() {
+	if err := run(); err != nil {
+		fmt.Println(err)
+		os.Exit(1)
+	}
+}
+
+func showUsage() {
+	fmt.Println(`
+builtin-gen generates the builtin table for the Tint compiler
+
+builtin-gen parses the <tint>/src/builtins.def file, then scans the project
+directory for '<file>.tmpl' files, to produce '<file>' source code files.
+
+usage:
+  builtin-gen
+
+optional flags:`)
+	flag.PrintDefaults()
+	fmt.Println(``)
+	os.Exit(1)
+}
+
+func run() error {
+	// Load the builtins definition file
+	projectRoot := fileutils.ProjectRoot()
+	defPath := filepath.Join(projectRoot, defProjectRelPath)
+
+	defSource, err := ioutil.ReadFile(defPath)
+	if err != nil {
+		return err
+	}
+
+	// Parse the definition file to produce an AST
+	ast, err := parser.Parse(string(defSource), defProjectRelPath)
+	if err != nil {
+		return err
+	}
+
+	// Resolve the AST to produce the semantic info
+	sem, err := resolver.Resolve(ast)
+	if err != nil {
+		return err
+	}
+
+	// Recursively find all the template files in the <tint>/src directory
+	files, err := glob.Scan(projectRoot, glob.MustParseConfig(`{
+		"paths": [{"include": [
+			"src/**.tmpl",
+			"test/**.tmpl"
+		]}]
+	}`))
+	if err != nil {
+		return err
+	}
+
+	// For each template file...
+	for _, relTmplPath := range files {
+		// Make tmplPath absolute
+		tmplPath := filepath.Join(projectRoot, relTmplPath)
+
+		// Read the template file
+		tmpl, err := ioutil.ReadFile(tmplPath)
+		if err != nil {
+			return fmt.Errorf("failed to open '%v': %w", tmplPath, err)
+		}
+
+		// Create or update the file at relpath if the file content has changed
+		// relpath is a path relative to the template
+		writeFile := func(relpath, body string) error {
+			// Write the common file header
+			sb := strings.Builder{}
+			sb.WriteString(fmt.Sprintf(header, filepath.ToSlash(relTmplPath), filepath.ToSlash(defProjectRelPath)))
+			sb.WriteString(body)
+			content := sb.String()
+			abspath := filepath.Join(filepath.Dir(tmplPath), relpath)
+			return writeFileIfChanged(abspath, content)
+		}
+
+		// Write the content generated using the template and semantic info
+		sb := strings.Builder{}
+		if err := gen.Generate(sem, string(tmpl), &sb, writeFile); err != nil {
+			return fmt.Errorf("while processing '%v': %w", tmplPath, err)
+		}
+
+		if body := sb.String(); body != "" {
+			_, tmplFileName := filepath.Split(tmplPath)
+			outFileName := strings.TrimSuffix(tmplFileName, ".tmpl")
+			if err := writeFile(outFileName, body); err != nil {
+				return err
+			}
+		}
+	}
+
+	return nil
+}
+
+// writes content to path if the file has changed
+func writeFileIfChanged(path, content string) error {
+	existing, err := ioutil.ReadFile(path)
+	if err == nil && string(existing) == content {
+		return nil // Not changed
+	}
+	if err := os.MkdirAll(filepath.Dir(path), 0777); err != nil {
+		return fmt.Errorf("failed to create directory for '%v': %w", path, err)
+	}
+	if err := ioutil.WriteFile(path, []byte(content), 0666); err != nil {
+		return fmt.Errorf("failed to write file '%v': %w", path, err)
+	}
+	return nil
+}
+
+const header = `// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/builtin-gen
+// using the template:
+//   %v
+// and the builtin defintion file:
+//   %v
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+`
diff --git a/tools/src/cmd/builtin-gen/parser/parser.go b/tools/src/cmd/builtin-gen/parser/parser.go
new file mode 100644
index 0000000..4709bca
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/parser/parser.go
@@ -0,0 +1,312 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package parser provides a basic parser for the Tint builtin definition
+// language
+package parser
+
+import (
+	"fmt"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/ast"
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/lexer"
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/tok"
+)
+
+// Parse produces a list of tokens for the given source code
+func Parse(source, filepath string) (*ast.AST, error) {
+	runes := []rune(source)
+	tokens, err := lexer.Lex(runes, filepath)
+	if err != nil {
+		return nil, err
+	}
+
+	p := parser{tokens: tokens}
+	return p.parse()
+}
+
+type parser struct {
+	tokens []tok.Token
+	err    error
+}
+
+func (p *parser) parse() (*ast.AST, error) {
+	out := ast.AST{}
+	var decorations ast.Decorations
+	for p.err == nil {
+		t := p.peek(0)
+		if t == nil {
+			break
+		}
+		switch t.Kind {
+		case tok.Ldeco:
+			decorations = append(decorations, p.decorations()...)
+		case tok.Enum:
+			if len(decorations) > 0 {
+				p.err = fmt.Errorf("%v unexpected decoration", decorations[0].Source)
+			}
+			out.Enums = append(out.Enums, p.enumDecl())
+		case tok.Match:
+			if len(decorations) > 0 {
+				p.err = fmt.Errorf("%v unexpected decoration", decorations[0].Source)
+			}
+			out.Matchers = append(out.Matchers, p.matcherDecl())
+		case tok.Type:
+			out.Types = append(out.Types, p.typeDecl(decorations))
+			decorations = nil
+		case tok.Function:
+			out.Functions = append(out.Functions, p.functionDecl(decorations))
+			decorations = nil
+		default:
+			p.err = fmt.Errorf("%v unexpected token '%v'", t.Source, t.Kind)
+		}
+		if p.err != nil {
+			return nil, p.err
+		}
+	}
+	return &out, nil
+}
+
+func (p *parser) enumDecl() ast.EnumDecl {
+	p.expect(tok.Enum, "enum declaration")
+	name := p.expect(tok.Identifier, "enum name")
+	e := ast.EnumDecl{Source: name.Source, Name: string(name.Runes)}
+	p.expect(tok.Lbrace, "enum declaration")
+	for p.err == nil && p.match(tok.Rbrace) == nil {
+		e.Entries = append(e.Entries, p.enumEntry())
+	}
+	return e
+}
+
+func (p *parser) enumEntry() ast.EnumEntry {
+	decos := p.decorations()
+	name := p.expect(tok.Identifier, "enum entry")
+	return ast.EnumEntry{Source: name.Source, Decorations: decos, Name: string(name.Runes)}
+}
+
+func (p *parser) matcherDecl() ast.MatcherDecl {
+	p.expect(tok.Match, "matcher declaration")
+	name := p.expect(tok.Identifier, "matcher name")
+	m := ast.MatcherDecl{Source: name.Source, Name: string(name.Runes)}
+	p.expect(tok.Colon, "matcher declaration")
+	for p.err == nil {
+		m.Options = append(m.Options, p.templatedName())
+		if p.match(tok.Or) == nil {
+			break
+		}
+	}
+	return m
+}
+
+func (p *parser) typeDecl(decos ast.Decorations) ast.TypeDecl {
+	p.expect(tok.Type, "type declaration")
+	name := p.expect(tok.Identifier, "type name")
+	m := ast.TypeDecl{
+		Source:      name.Source,
+		Decorations: decos,
+		Name:        string(name.Runes),
+	}
+	if p.peekIs(0, tok.Lt) {
+		m.TemplateParams = p.templateParams()
+	}
+	return m
+}
+
+func (p *parser) decorations() ast.Decorations {
+	if p.match(tok.Ldeco) == nil {
+		return nil
+	}
+	out := ast.Decorations{}
+	for p.err == nil {
+		name := p.expect(tok.Identifier, "decoration name")
+		values := []string{}
+		if p.match(tok.Lparen) != nil {
+			for p.err == nil {
+				values = append(values, p.string())
+				if p.match(tok.Comma) == nil {
+					break
+				}
+			}
+			p.expect(tok.Rparen, "decoration values")
+		}
+		out = append(out, ast.Decoration{
+			Source: name.Source,
+			Name:   string(name.Runes),
+			Values: values,
+		})
+		if !p.peekIs(0, tok.Comma) {
+			break
+		}
+	}
+	p.expect(tok.Rdeco, "decoration list")
+	return out
+}
+
+func (p *parser) functionDecl(decos ast.Decorations) ast.FunctionDecl {
+	p.expect(tok.Function, "function declaration")
+	name := p.expect(tok.Identifier, "function name")
+	f := ast.FunctionDecl{
+		Source:      name.Source,
+		Decorations: decos,
+		Name:        string(name.Runes),
+	}
+	if p.peekIs(0, tok.Lt) {
+		f.TemplateParams = p.templateParams()
+	}
+	f.Parameters = p.parameters()
+	if p.match(tok.Arrow) != nil {
+		ret := p.templatedName()
+		f.ReturnType = &ret
+	}
+	return f
+}
+
+func (p *parser) parameters() ast.Parameters {
+	l := ast.Parameters{}
+	p.expect(tok.Lparen, "function parameter list")
+	if p.match(tok.Rparen) == nil {
+		for p.err == nil {
+			l = append(l, p.parameter())
+			if p.match(tok.Comma) == nil {
+				break
+			}
+		}
+		p.expect(tok.Rparen, "function parameter list")
+	}
+	return l
+}
+
+func (p *parser) parameter() ast.Parameter {
+	if p.peekIs(1, tok.Colon) {
+		// name type
+		name := p.expect(tok.Identifier, "parameter name")
+		p.expect(tok.Colon, "parameter type")
+		return ast.Parameter{
+			Source: name.Source,
+			Name:   string(name.Runes),
+			Type:   p.templatedName(),
+		}
+	}
+	// type
+	ty := p.templatedName()
+	return ast.Parameter{
+		Source: ty.Source,
+		Type:   ty,
+	}
+}
+
+func (p *parser) string() string {
+	s := p.expect(tok.String, "string")
+	return string(s.Runes)
+}
+
+func (p *parser) templatedName() ast.TemplatedName {
+	name := p.expect(tok.Identifier, "type name")
+	m := ast.TemplatedName{Source: name.Source, Name: string(name.Runes)}
+	if p.match(tok.Lt) != nil {
+		for p.err == nil {
+			m.TemplateArgs = append(m.TemplateArgs, p.templatedName())
+			if p.match(tok.Comma) == nil {
+				break
+			}
+		}
+		p.expect(tok.Gt, "template argument type list")
+	}
+	return m
+}
+
+func (p *parser) templateParams() ast.TemplateParams {
+	t := ast.TemplateParams{}
+	p.expect(tok.Lt, "template parameter list")
+	for p.err == nil && p.peekIs(0, tok.Identifier) {
+		t = append(t, p.templateParam())
+	}
+	p.expect(tok.Gt, "template parameter list")
+	return t
+}
+
+func (p *parser) templateParam() ast.TemplateParam {
+	name := p.match(tok.Identifier)
+	t := ast.TemplateParam{
+		Source: name.Source,
+		Name:   string(name.Runes),
+	}
+	if p.match(tok.Colon) != nil {
+		t.Type = p.templatedName()
+	}
+	p.match(tok.Comma)
+	return t
+}
+
+func (p *parser) expect(kind tok.Kind, use string) tok.Token {
+	if p.err != nil {
+		return tok.Invalid
+	}
+	t := p.match(kind)
+	if t == nil {
+		if len(p.tokens) > 0 {
+			p.err = fmt.Errorf("%v expected '%v' for %v, got '%v'",
+				p.tokens[0].Source, kind, use, p.tokens[0].Kind)
+		} else {
+			p.err = fmt.Errorf("expected '%v' for %v, but reached end of file", kind, use)
+		}
+		return tok.Invalid
+	}
+	return *t
+}
+
+func (p *parser) ident(use string) string {
+	return string(p.expect(tok.Identifier, use).Runes)
+}
+
+// TODO(bclayton): Currently unused, but will be needed for integer bounds
+// func (p *parser) integer(use string) int {
+// 	t := p.expect(tok.Integer, use)
+// 	if t.Kind != tok.Integer {
+// 		return 0
+// 	}
+// 	i, err := strconv.Atoi(string(t.Runes))
+// 	if err != nil {
+// 		p.err = err
+// 		return 0
+// 	}
+// 	return i
+// }
+
+func (p *parser) match(kind tok.Kind) *tok.Token {
+	if p.err != nil || len(p.tokens) == 0 {
+		return nil
+	}
+	t := p.tokens[0]
+	if t.Kind != kind {
+		return nil
+	}
+	p.tokens = p.tokens[1:]
+	return &t
+}
+
+func (p *parser) peekIs(i int, kind tok.Kind) bool {
+	t := p.peek(i)
+	if t == nil {
+		return false
+	}
+	return t.Kind == kind
+}
+
+func (p *parser) peek(i int) *tok.Token {
+	if len(p.tokens) <= i {
+		return nil
+	}
+	return &p.tokens[i]
+}
diff --git a/tools/src/cmd/builtin-gen/parser/parser_test.go b/tools/src/cmd/builtin-gen/parser/parser_test.go
new file mode 100644
index 0000000..3d229c0
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/parser/parser_test.go
@@ -0,0 +1,210 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package parser_test
+
+import (
+	"testing"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/ast"
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/parser"
+)
+
+func TestParser(t *testing.T) {
+	type test struct {
+		src    string
+		expect ast.AST
+	}
+
+	for _, test := range []test{
+		{"enum E {}", ast.AST{
+			Enums: []ast.EnumDecl{{Name: "E"}},
+		}},
+		{"enum E { A [[deco]] B C }", ast.AST{
+			Enums: []ast.EnumDecl{{
+				Name: "E",
+				Entries: []ast.EnumEntry{
+					{Name: "A"},
+					{
+						Decorations: ast.Decorations{{Name: "deco"}},
+						Name:        "B",
+					},
+					{Name: "C"},
+				},
+			}},
+		}},
+		{"type T", ast.AST{
+			Types: []ast.TypeDecl{{Name: "T"}},
+		}},
+		{"type T<A, B, C>", ast.AST{
+			Types: []ast.TypeDecl{{
+				Name: "T",
+				TemplateParams: ast.TemplateParams{
+					{Name: "A"},
+					{Name: "B"},
+					{Name: "C"},
+				},
+			}},
+		}},
+		{"[[deco]] type T", ast.AST{
+			Types: []ast.TypeDecl{{
+				Decorations: ast.Decorations{
+					{Name: "deco"},
+				},
+				Name: "T",
+			}},
+		}},
+		{`[[deco("a", "b")]] type T`, ast.AST{
+			Types: []ast.TypeDecl{{
+				Decorations: ast.Decorations{
+					{Name: "deco", Values: []string{"a", "b"}},
+				},
+				Name: "T",
+			}},
+		}},
+		{"match M : A", ast.AST{
+			Matchers: []ast.MatcherDecl{{
+				Name: "M",
+				Options: ast.MatcherOptions{
+					ast.TemplatedName{Name: "A"},
+				},
+			}},
+		}},
+		{"match M : A | B", ast.AST{
+			Matchers: []ast.MatcherDecl{{
+				Name: "M",
+				Options: ast.MatcherOptions{
+					ast.TemplatedName{Name: "A"},
+					ast.TemplatedName{Name: "B"},
+				},
+			}},
+		}},
+		{"fn F()", ast.AST{
+			Functions: []ast.FunctionDecl{{
+				Name: "F",
+			}},
+		}},
+		{"[[deco]] fn F()", ast.AST{
+			Functions: []ast.FunctionDecl{{
+				Name: "F",
+				Decorations: ast.Decorations{
+					{Name: "deco"},
+				},
+			}},
+		}},
+		{"fn F(a)", ast.AST{
+			Functions: []ast.FunctionDecl{{
+				Name: "F",
+				Parameters: ast.Parameters{
+					{Type: ast.TemplatedName{Name: "a"}},
+				},
+			}},
+		}},
+		{"fn F(a: T)", ast.AST{
+			Functions: []ast.FunctionDecl{{
+				Name: "F",
+				Parameters: ast.Parameters{
+					{Name: "a", Type: ast.TemplatedName{Name: "T"}},
+				},
+			}},
+		}},
+		{"fn F(a, b)", ast.AST{
+			Functions: []ast.FunctionDecl{{
+				Name: "F",
+				Parameters: ast.Parameters{
+					{Type: ast.TemplatedName{Name: "a"}},
+					{Type: ast.TemplatedName{Name: "b"}},
+				},
+			}},
+		}},
+		{"fn F<A : B<C>>()", ast.AST{
+			Functions: []ast.FunctionDecl{{
+				Name: "F",
+				TemplateParams: ast.TemplateParams{
+					{
+						Name: "A", Type: ast.TemplatedName{
+							Name: "B",
+							TemplateArgs: ast.TemplatedNames{
+								{Name: "C"},
+							},
+						},
+					},
+				},
+			}},
+		}},
+		{"fn F<T>(a: X, b: Y<T>)", ast.AST{
+			Functions: []ast.FunctionDecl{{
+				Name: "F",
+				TemplateParams: ast.TemplateParams{
+					{Name: "T"},
+				},
+				Parameters: ast.Parameters{
+					{Name: "a", Type: ast.TemplatedName{Name: "X"}},
+					{Name: "b", Type: ast.TemplatedName{
+						Name:         "Y",
+						TemplateArgs: []ast.TemplatedName{{Name: "T"}},
+					}},
+				},
+			}},
+		}},
+		{"fn F() -> X", ast.AST{
+			Functions: []ast.FunctionDecl{{
+				Name:       "F",
+				ReturnType: &ast.TemplatedName{Name: "X"},
+			}},
+		}},
+		{"fn F() -> X<T>", ast.AST{
+			Functions: []ast.FunctionDecl{{
+				Name: "F",
+				ReturnType: &ast.TemplatedName{
+					Name:         "X",
+					TemplateArgs: []ast.TemplatedName{{Name: "T"}},
+				},
+			}},
+		}},
+	} {
+		got, err := parser.Parse(test.src, "file.txt")
+		if err != nil {
+			t.Errorf("While parsing:\n%s\nParse() returned error: %v", test.src, err)
+			continue
+		}
+
+		gotStr, expectStr := got.String(), test.expect.String()
+		if gotStr != expectStr {
+			t.Errorf("While parsing:\n%s\nGot:\n%s\nExpected:\n%s", test.src, gotStr, expectStr)
+		}
+	}
+}
+
+func TestErrors(t *testing.T) {
+	type test struct {
+		src    string
+		expect string
+	}
+
+	for _, test := range []test{
+		{"+", "test.txt:1:1: unexpected '+'"},
+		{"123", "test.txt:1:1 unexpected token 'integer'"},
+		{"[[123]]", "test.txt:1:3 expected 'ident' for decoration name, got 'integer'"},
+		{"[[abc", "expected ']]' for decoration list, but reached end of file"},
+	} {
+		got, err := parser.Parse(test.src, "test.txt")
+		if gotErr := err.Error(); test.expect != gotErr {
+			t.Errorf(`Parse() returned error "%+v", expected error "%+v"`, gotErr, test.expect)
+		}
+		if got != nil {
+			t.Errorf("Lex() returned non-nil for error")
+		}
+	}
+}
diff --git a/tools/src/cmd/builtin-gen/resolver/resolve.go b/tools/src/cmd/builtin-gen/resolver/resolve.go
new file mode 100644
index 0000000..fbd9c9d
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/resolver/resolve.go
@@ -0,0 +1,653 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package resolver
+
+import (
+	"fmt"
+	"sort"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/ast"
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/sem"
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/tok"
+)
+
+type resolver struct {
+	a *ast.AST
+	s *sem.Sem
+
+	globals           scope
+	functions         map[string]*sem.Function
+	enumEntryMatchers map[*sem.EnumEntry]*sem.EnumMatcher
+}
+
+// Resolve processes the AST
+func Resolve(a *ast.AST) (*sem.Sem, error) {
+	r := resolver{
+		a:                 a,
+		s:                 sem.New(),
+		globals:           newScope(nil),
+		functions:         map[string]*sem.Function{},
+		enumEntryMatchers: map[*sem.EnumEntry]*sem.EnumMatcher{},
+	}
+	// Declare and resolve all the enumerators
+	for _, e := range a.Enums {
+		if err := r.enum(e); err != nil {
+			return nil, err
+		}
+	}
+	// Declare and resolve all the ty types
+	for _, p := range a.Types {
+		if err := r.ty(p); err != nil {
+			return nil, err
+		}
+	}
+	// Declare and resolve the type matchers
+	for _, m := range a.Matchers {
+		if err := r.matcher(m); err != nil {
+			return nil, err
+		}
+	}
+	// Declare and resolve the functions
+	for _, f := range a.Functions {
+		if err := r.function(f); err != nil {
+			return nil, err
+		}
+	}
+
+	// Calculate the unique parameter names
+	r.s.UniqueParameterNames = r.calculateUniqueParameterNames()
+
+	return r.s, nil
+}
+
+// enum() resolves an enum declaration.
+// The resulting sem.Enum is appended to Sem.Enums, and the enum and all its
+// entries are registered with the global scope.
+func (r *resolver) enum(e ast.EnumDecl) error {
+	s := &sem.Enum{
+		Decl: e,
+		Name: e.Name,
+	}
+
+	// Register the enum
+	r.s.Enums = append(r.s.Enums, s)
+	if err := r.globals.declare(s, e.Source); err != nil {
+		return err
+	}
+
+	// Register each of the enum entries
+	for _, ast := range e.Entries {
+		entry := &sem.EnumEntry{
+			Name: ast.Name,
+			Enum: s,
+		}
+		if internal := ast.Decorations.Take("internal"); internal != nil {
+			entry.IsInternal = true
+			if len(internal.Values) != 0 {
+				return fmt.Errorf("%v unexpected value for internal decoration", ast.Source)
+			}
+		}
+		if len(ast.Decorations) != 0 {
+			return fmt.Errorf("%v unknown decoration", ast.Decorations[0].Source)
+		}
+		if err := r.globals.declare(entry, e.Source); err != nil {
+			return err
+		}
+		s.Entries = append(s.Entries, entry)
+	}
+
+	return nil
+}
+
+// ty() resolves a type declaration.
+// The resulting sem.Type is appended to Sem.Types, and the type is registered
+// with the global scope.
+func (r *resolver) ty(a ast.TypeDecl) error {
+	t := &sem.Type{
+		Decl: a,
+		Name: a.Name,
+	}
+
+	// Register the type
+	r.s.Types = append(r.s.Types, t)
+	if err := r.globals.declare(t, a.Source); err != nil {
+		return err
+	}
+
+	// Create a new scope for resolving template parameters
+	s := newScope(&r.globals)
+
+	// Resolve the type template parameters
+	templateParams, err := r.templateParams(&s, a.TemplateParams)
+	if err != nil {
+		return err
+	}
+	t.TemplateParams = templateParams
+
+	// Scan for decorations
+	if d := a.Decorations.Take("display"); d != nil {
+		if len(d.Values) != 1 {
+			return fmt.Errorf("%v expected a single value for 'display' decoration", d.Source)
+		}
+		t.DisplayName = d.Values[0]
+	}
+	if len(a.Decorations) != 0 {
+		return fmt.Errorf("%v unknown decoration", a.Decorations[0].Source)
+	}
+
+	return nil
+}
+
+// matcher() resolves a match declaration to either a sem.TypeMatcher or
+// sem.EnumMatcher.
+// The resulting matcher is appended to either Sem.TypeMatchers or
+// Sem.EnumMatchers, and is registered with the global scope.
+func (r *resolver) matcher(a ast.MatcherDecl) error {
+	// Determine whether this is a type matcher or enum matcher by resolving the
+	// first option
+	firstOption, err := r.lookupNamed(&r.globals, a.Options[0])
+	if err != nil {
+		return err
+	}
+
+	// Resolve to a sem.TypeMatcher or a sem.EnumMatcher
+	switch firstOption := firstOption.(type) {
+	case *sem.Type:
+		options := map[sem.Named]tok.Source{}
+		m := &sem.TypeMatcher{
+			Decl: a,
+			Name: a.Name,
+		}
+
+		// Register the matcher
+		r.s.TypeMatchers = append(r.s.TypeMatchers, m)
+		if err := r.globals.declare(m, a.Source); err != nil {
+			return err
+		}
+
+		// Resolve each of the types in the options list
+		for _, ast := range m.Decl.Options {
+			ty, err := r.lookupType(&r.globals, ast)
+			if err != nil {
+				return err
+			}
+			m.Types = append(m.Types, ty)
+			if s, dup := options[ty]; dup {
+				return fmt.Errorf("%v duplicate option '%v' in matcher\nFirst declared here: %v", ast.Source, ast.Name, s)
+			}
+			options[ty] = ast.Source
+		}
+
+		return nil
+
+	case *sem.EnumEntry:
+		enum := firstOption.Enum
+		m := &sem.EnumMatcher{
+			Decl: a,
+			Name: a.Name,
+			Enum: enum,
+		}
+
+		// Register the matcher
+		r.s.EnumMatchers = append(r.s.EnumMatchers, m)
+		if err := r.globals.declare(m, a.Source); err != nil {
+			return err
+		}
+
+		// Resolve each of the enums in the options list
+		for _, ast := range m.Decl.Options {
+			entry := enum.FindEntry(ast.Name)
+			if entry == nil {
+				return fmt.Errorf("%v enum '%v' does not contain '%v'", ast.Source, enum.Name, ast.Name)
+			}
+			m.Options = append(m.Options, entry)
+		}
+
+		return nil
+	}
+	return fmt.Errorf("'%v' cannot be used for matcher", a.Name)
+}
+
+// function() resolves a function overload declaration.
+// The the first overload for the function creates and appends the sem.Function
+// to Sem.Functions. Subsequent overloads append their resolved overload to the
+// sem.Function.Overloads list.
+func (r *resolver) function(a ast.FunctionDecl) error {
+	// If this is the first overload of the function, create and register the
+	// semantic function.
+	f := r.functions[a.Name]
+	if f == nil {
+		f = &sem.Function{Name: a.Name}
+		r.functions[a.Name] = f
+		r.s.Functions = append(r.s.Functions, f)
+	}
+
+	// Create a new scope for resolving template parameters
+	s := newScope(&r.globals)
+
+	// Resolve the declared template parameters
+	templateParams, err := r.templateParams(&s, a.TemplateParams)
+	if err != nil {
+		return err
+	}
+
+	// Construct the semantic overload
+	overload := &sem.Overload{
+		Decl:           a,
+		Function:       f,
+		Parameters:     make([]sem.Parameter, len(a.Parameters)),
+		TemplateParams: templateParams,
+	}
+
+	// Process overload decorations
+	if stageDeco := a.Decorations.Take("stage"); stageDeco != nil {
+		for stageDeco != nil {
+			for _, stage := range stageDeco.Values {
+				switch stage {
+				case "vertex":
+					overload.CanBeUsedInStage.Vertex = true
+				case "fragment":
+					overload.CanBeUsedInStage.Fragment = true
+				case "compute":
+					overload.CanBeUsedInStage.Compute = true
+				default:
+					return fmt.Errorf("%v unknown stage '%v'", stageDeco.Source, stage)
+				}
+			}
+			stageDeco = a.Decorations.Take("stage")
+		}
+	} else {
+		overload.CanBeUsedInStage = sem.StageUses{
+			Vertex:   true,
+			Fragment: true,
+			Compute:  true,
+		}
+	}
+	if deprecated := a.Decorations.Take("deprecated"); deprecated != nil {
+		overload.IsDeprecated = true
+		if len(deprecated.Values) != 0 {
+			return fmt.Errorf("%v unexpected value for deprecated decoration", deprecated.Source)
+		}
+	}
+	if len(a.Decorations) != 0 {
+		return fmt.Errorf("%v unknown decoration", a.Decorations[0].Source)
+	}
+
+	// Append the overload to the function
+	f.Overloads = append(f.Overloads, overload)
+
+	// Sort the template parameters by resolved type. Append these to
+	// sem.Overload.OpenTypes or sem.Overload.OpenNumbers based on their kind.
+	for _, param := range templateParams {
+		switch param := param.(type) {
+		case *sem.TemplateTypeParam:
+			overload.OpenTypes = append(overload.OpenTypes, param)
+		case *sem.TemplateEnumParam, *sem.TemplateNumberParam:
+			overload.OpenNumbers = append(overload.OpenNumbers, param)
+		}
+	}
+
+	// Update high-water marks of open types / numbers
+	if r.s.MaxOpenTypes < len(overload.OpenTypes) {
+		r.s.MaxOpenTypes = len(overload.OpenTypes)
+	}
+	if r.s.MaxOpenNumbers < len(overload.OpenNumbers) {
+		r.s.MaxOpenNumbers = len(overload.OpenNumbers)
+	}
+
+	// Resolve the parameters
+	for i, p := range a.Parameters {
+		usage, err := r.fullyQualifiedName(&s, p.Type)
+		if err != nil {
+			return err
+		}
+		overload.Parameters[i] = sem.Parameter{
+			Name: p.Name,
+			Type: usage,
+		}
+	}
+
+	// Resolve the return type
+	if a.ReturnType != nil {
+		usage, err := r.fullyQualifiedName(&s, *a.ReturnType)
+		if err != nil {
+			return err
+		}
+		switch usage.Target.(type) {
+		case *sem.Type, *sem.TemplateTypeParam:
+			overload.ReturnType = &usage
+		default:
+			return fmt.Errorf("%v cannot use '%v' as return type. Must be a type or template type", a.ReturnType.Source, a.ReturnType.Name)
+		}
+	}
+
+	return nil
+}
+
+// fullyQualifiedName() resolves the ast.TemplatedName to a sem.FullyQualifiedName.
+func (r *resolver) fullyQualifiedName(s *scope, arg ast.TemplatedName) (sem.FullyQualifiedName, error) {
+	target, err := r.lookupNamed(s, arg)
+	if err != nil {
+		return sem.FullyQualifiedName{}, err
+	}
+
+	if entry, ok := target.(*sem.EnumEntry); ok {
+		// The target resolved to an enum entry.
+		// Automagically transform this into a synthetic matcher with a single
+		// option. i.e.
+		// This:
+		//   enum E{ a b c }
+		//   fn F(b)
+		// Becomes:
+		//   enum E{ a b c }
+		//   matcher b
+		//   fn F(b)
+		// We don't really care right now that we have a symbol collision
+		// between E.b and b, as the generators return different names for
+		// these.
+		matcher, ok := r.enumEntryMatchers[entry]
+		if !ok {
+			matcher = &sem.EnumMatcher{
+				Name:    entry.Name,
+				Enum:    entry.Enum,
+				Options: []*sem.EnumEntry{entry},
+			}
+			r.enumEntryMatchers[entry] = matcher
+			r.s.EnumMatchers = append(r.s.EnumMatchers, matcher)
+		}
+		target = matcher
+	}
+
+	fqn := sem.FullyQualifiedName{
+		Target:            target,
+		TemplateArguments: make([]interface{}, len(arg.TemplateArgs)),
+	}
+	for i, a := range arg.TemplateArgs {
+		arg, err := r.fullyQualifiedName(s, a)
+		if err != nil {
+			return sem.FullyQualifiedName{}, err
+		}
+		fqn.TemplateArguments[i] = arg
+	}
+	return fqn, nil
+}
+
+// templateParams() resolves the ast.TemplateParams into list of sem.TemplateParam.
+// Each sem.TemplateParam is registered with the scope s.
+func (r *resolver) templateParams(s *scope, l ast.TemplateParams) ([]sem.TemplateParam, error) {
+	out := []sem.TemplateParam{}
+	for _, ast := range l {
+		param, err := r.templateParam(ast)
+		if err != nil {
+			return nil, err
+		}
+		s.declare(param, ast.Source)
+		out = append(out, param)
+	}
+	return out, nil
+}
+
+// templateParams() resolves the ast.TemplateParam into sem.TemplateParam, which
+// is either a sem.TemplateEnumParam or a sem.TemplateTypeParam.
+func (r *resolver) templateParam(a ast.TemplateParam) (sem.TemplateParam, error) {
+	if a.Type.Name == "num" {
+		return &sem.TemplateNumberParam{Name: a.Name}, nil
+	}
+
+	if a.Type.Name != "" {
+		resolved, err := r.lookupNamed(&r.globals, a.Type)
+		if err != nil {
+			return nil, err
+		}
+		switch r := resolved.(type) {
+		case *sem.Enum:
+			return &sem.TemplateEnumParam{Name: a.Name, Enum: r}, nil
+		case *sem.EnumMatcher:
+			return &sem.TemplateEnumParam{Name: a.Name, Enum: r.Enum, Matcher: r}, nil
+		case *sem.TypeMatcher:
+			return &sem.TemplateTypeParam{Name: a.Name, Type: r}, nil
+		default:
+			return nil, fmt.Errorf("%v invalid template parameter type '%v'", a.Source, a.Type.Name)
+		}
+	}
+
+	return &sem.TemplateTypeParam{Name: a.Name}, nil
+}
+
+// lookupType() searches the scope `s` and its ancestors for the sem.Type with
+// the given name.
+func (r *resolver) lookupType(s *scope, a ast.TemplatedName) (*sem.Type, error) {
+	resolved, err := r.lookupNamed(s, a)
+	if err != nil {
+		return nil, err
+	}
+	// Something with the given name was found...
+	if ty, ok := resolved.(*sem.Type); ok {
+		return ty, nil
+	}
+	// ... but that something was not a sem.Type
+	return nil, fmt.Errorf("%v '%v' resolves to %v but type is expected", a.Source, a.Name, describe(resolved))
+}
+
+// lookupNamed() searches `s` and its ancestors for the sem.Named object with
+// the given name. If there are template arguments for the name `a`, then
+// lookupNamed() performs basic validation that those arguments can be passed
+// to the named object.
+func (r *resolver) lookupNamed(s *scope, a ast.TemplatedName) (sem.Named, error) {
+	target := s.lookup(a.Name)
+	if target == nil {
+		return nil, fmt.Errorf("%v cannot resolve '%v'", a.Source, a.Name)
+	}
+
+	// Something with the given name was found...
+	var params []sem.TemplateParam
+	var ty sem.ResolvableType
+	switch target := target.object.(type) {
+	case *sem.Type:
+		ty = target
+		params = target.TemplateParams
+	case *sem.TypeMatcher:
+		ty = target
+		params = target.TemplateParams
+	case sem.TemplateParam:
+		if len(a.TemplateArgs) != 0 {
+			return nil, fmt.Errorf("%v '%v' template parameters do not accept template arguments", a.Source, a.Name)
+		}
+		return target.(sem.Named), nil
+	case sem.Named:
+		return target, nil
+	default:
+		panic(fmt.Errorf("Unknown resolved type %T", target))
+	}
+	// ... and that something takes template parameters
+	// Check the number of templated name template arguments match the number of
+	// templated parameters for the target.
+	args := a.TemplateArgs
+	if len(params) != len(args) {
+		return nil, fmt.Errorf("%v '%v' requires %d template arguments, but %d were provided", a.Source, a.Name, len(params), len(args))
+	}
+
+	// Check templated name template argument kinds match the parameter kinds
+	for i, ast := range args {
+		param := params[i]
+		arg, err := r.lookupNamed(s, args[i])
+		if err != nil {
+			return nil, err
+		}
+
+		if err := checkCompatible(arg, param); err != nil {
+			return nil, fmt.Errorf("%v %w", ast.Source, err)
+		}
+	}
+	return ty, nil
+}
+
+// calculateUniqueParameterNames() iterates over all the parameters of all
+// overloads, calculating the list of unique parameter names
+func (r *resolver) calculateUniqueParameterNames() []string {
+	set := map[string]struct{}{"": {}}
+	names := []string{}
+	for _, f := range r.s.Functions {
+		for _, o := range f.Overloads {
+			for _, p := range o.Parameters {
+				if _, dup := set[p.Name]; !dup {
+					set[p.Name] = struct{}{}
+					names = append(names, p.Name)
+				}
+			}
+		}
+	}
+	sort.Strings(names)
+	return names
+}
+
+// describe() returns a string describing a sem.Named
+func describe(n sem.Named) string {
+	switch n := n.(type) {
+	case *sem.Type:
+		return "type '" + n.Name + "'"
+	case *sem.TypeMatcher:
+		return "type matcher '" + n.Name + "'"
+	case *sem.Enum:
+		return "enum '" + n.Name + "'"
+	case *sem.EnumMatcher:
+		return "enum matcher '" + n.Name + "'"
+	case *sem.TemplateTypeParam:
+		return "template type"
+	case *sem.TemplateEnumParam:
+		return "template enum '" + n.Enum.Name + "'"
+	case *sem.EnumEntry:
+		return "enum entry '" + n.Enum.Name + "." + n.Name + "'"
+	case *sem.TemplateNumberParam:
+		return "template number"
+	default:
+		panic(fmt.Errorf("unhandled type %T", n))
+	}
+}
+
+// checkCompatible() returns an error if `arg` cannot be used as an argument for
+// a parameter of `param`.
+func checkCompatible(arg, param sem.Named) error {
+	// asEnum() returns the underlying sem.Enum if n is a enum matcher,
+	// templated enum parameter or an enum entry, otherwise nil
+	asEnum := func(n sem.Named) *sem.Enum {
+		switch n := n.(type) {
+		case *sem.EnumMatcher:
+			return n.Enum
+		case *sem.TemplateEnumParam:
+			return n.Enum
+		case *sem.EnumEntry:
+			return n.Enum
+		default:
+			return nil
+		}
+	}
+
+	if arg := asEnum(arg); arg != nil {
+		param := asEnum(param)
+		if arg == param {
+			return nil
+		}
+	}
+
+	anyNumber := "any number"
+	// asNumber() returns anyNumber if n is a TemplateNumberParam.
+	// TODO(bclayton): Once we support number ranges [e.g.: fn F<N: 1..4>()], we
+	// should check number ranges are compatible
+	asNumber := func(n sem.Named) interface{} {
+		switch n.(type) {
+		case *sem.TemplateNumberParam:
+			return anyNumber
+		default:
+			return nil
+		}
+	}
+
+	if arg := asNumber(arg); arg != nil {
+		param := asNumber(param)
+		if arg == param {
+			return nil
+		}
+	}
+
+	anyType := &sem.Type{}
+	// asNumber() returns the sem.Type, sem.TypeMatcher if the named object
+	// resolves to one of these, or anyType if n is a unconstrained template
+	// type parameter.
+	asResolvableType := func(n sem.Named) sem.ResolvableType {
+		switch n := n.(type) {
+		case *sem.TemplateTypeParam:
+			if n.Type != nil {
+				return n.Type
+			}
+			return anyType
+		case *sem.Type:
+			return n
+		case *sem.TypeMatcher:
+			return n
+		default:
+			return nil
+		}
+	}
+
+	if arg := asResolvableType(arg); arg != nil {
+		param := asResolvableType(param)
+		if arg == param || param == anyType {
+			return nil
+		}
+	}
+
+	return fmt.Errorf("cannot use %v as %v", describe(arg), describe(param))
+}
+
+// scope is a basic hierarchical name to object table
+type scope struct {
+	objects map[string]objectAndSource
+	parent  *scope
+}
+
+// objectAndSource is a sem.Named object with a source
+type objectAndSource struct {
+	object sem.Named
+	source tok.Source
+}
+
+// newScope returns a newly initalized scope
+func newScope(parent *scope) scope {
+	return scope{objects: map[string]objectAndSource{}, parent: parent}
+}
+
+// lookup() searches the scope and then its parents for the symbol with the
+// given name.
+func (s *scope) lookup(name string) *objectAndSource {
+	if o, found := s.objects[name]; found {
+		return &o
+	}
+	if s.parent == nil {
+		return nil
+	}
+	return s.parent.lookup(name)
+}
+
+// declare() declares the symbol with the given name, erroring on symbol
+// collision.
+func (s *scope) declare(object sem.Named, source tok.Source) error {
+	name := object.GetName()
+	if existing := s.lookup(name); existing != nil {
+		return fmt.Errorf("%v '%v' already declared\nFirst declared here: %v", source, name, existing.source)
+	}
+	s.objects[name] = objectAndSource{object, source}
+	return nil
+}
diff --git a/tools/src/cmd/builtin-gen/resolver/resolver_test.go b/tools/src/cmd/builtin-gen/resolver/resolver_test.go
new file mode 100644
index 0000000..11359dd
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/resolver/resolver_test.go
@@ -0,0 +1,330 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package resolver_test
+
+import (
+	"fmt"
+	"strings"
+	"testing"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/parser"
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/resolver"
+)
+
+func TestResolver(t *testing.T) {
+	type test struct {
+		src string
+		err string
+	}
+
+	success := ""
+	for _, test := range []test{
+		{
+			`type X`,
+			success,
+		}, {
+			`enum E {}`,
+			success,
+		}, {
+			`enum E {A B C}`,
+			success,
+		}, {
+			`type X`,
+			success,
+		}, {
+			`[[display("Y")]] type X`,
+			success,
+		}, {
+			`
+type x
+match y: x`,
+			success,
+		}, {
+			`
+enum e {a b c}
+match y: c | a | b`,
+			success,
+		}, {
+			`fn f()`,
+			success,
+		}, {
+			`fn f<T>()`,
+			success,
+		}, {
+			`
+type f32
+fn f<N: num>()`,
+			success,
+		}, {
+			`
+enum e { a b c }
+fn f<N: e>()`,
+			success,
+		}, {
+			`
+type f32
+fn f<T>(T) -> f32`,
+			success,
+		}, {
+			`
+type f32
+type P<T>
+match m: f32
+fn f<T: m>(P<T>) -> T`,
+			success,
+		}, {
+			`
+type f32
+type P<T>
+match m: f32
+fn f(P<m>)`,
+			success,
+		}, {
+			`
+enum e { a }
+fn f(a)`,
+			success,
+		}, {
+			`
+enum e { a b }
+type T<E: e>
+match m: a
+fn f<E: m>(T<E>)`,
+			success,
+		}, {
+			`
+enum e { a b }
+type T<E: e>
+match m: a
+fn f(T<m>)`,
+			success,
+		}, {
+			`
+enum e { a }
+type T<E: e>
+fn f(T<a>)`,
+			success,
+		}, {
+			`
+type T<E: num>
+fn f<E: num>(T<E>)`,
+			success,
+		}, {
+			`fn f<T>(T)`,
+			success,
+		}, {
+			`
+enum e { a b }
+fn f<E: e>()`,
+			success,
+		}, {
+			`
+enum e { a b }
+match m: a | b
+fn f<E: m>()`,
+			success,
+		}, {
+			`
+type f32
+type T<x>
+fn f(T<T<f32>>)`,
+			success,
+		}, {
+			`enum E {A A}`,
+			`
+file.txt:1:6 'A' already declared
+First declared here: file.txt:1:6
+`,
+		},
+		{
+			`type X type X`,
+			`
+file.txt:1:13 'X' already declared
+First declared here: file.txt:1:6`,
+		}, {
+			`[[meow]] type X`,
+			`
+file.txt:1:3 unknown decoration
+`,
+		}, {
+			`[[display("Y", "Z")]] type X`,
+			`
+file.txt:1:3 expected a single value for 'display' decoration`,
+		}, {
+			`
+enum e { a }
+enum e { b }`,
+			`
+file.txt:2:6 'e' already declared
+First declared here: file.txt:1:6`,
+		}, {
+			`
+type X
+match X : X`,
+			`
+file.txt:2:7 'X' already declared
+First declared here: file.txt:1:6`,
+		}, {
+			`type T<X>
+match M : T`,
+			`file.txt:2:11 'T' requires 1 template arguments, but 0 were provided`,
+		}, {
+			`
+match x: y`,
+			`
+file.txt:1:10 cannot resolve 'y'
+`,
+		}, {
+			`
+type a
+match x: a | b`,
+			`
+file.txt:2:14 cannot resolve 'b'
+`,
+		}, {
+			`
+type a
+enum e { b }
+match x: a | b`,
+			`
+file.txt:3:14 'b' resolves to enum entry 'e.b' but type is expected
+`,
+		}, {
+			`
+type a
+type b
+match x: a | b | a`,
+			`
+file.txt:3:18 duplicate option 'a' in matcher
+First declared here: file.txt:3:10
+`,
+		}, {
+			`
+enum e { a c }
+match x: a | b | c`,
+			`
+file.txt:2:14 enum 'e' does not contain 'b'
+`,
+		}, {
+			`
+enum e { a }
+match x: a
+match x: a`,
+			`
+file.txt:3:7 'x' already declared
+First declared here: file.txt:2:7
+`,
+		}, {
+			`
+type t
+match x: t
+match y: x`,
+			`
+'y' cannot be used for matcher
+`,
+		}, {
+			`fn f(u)`,
+			`file.txt:1:6 cannot resolve 'u'`,
+		}, {
+			`fn f() -> u`,
+			`file.txt:1:11 cannot resolve 'u'`,
+		}, {
+			`fn f<T: u>()`,
+			`file.txt:1:9 cannot resolve 'u'`,
+		}, {
+			`
+enum e { a }
+fn f() -> e`,
+			`file.txt:2:11 cannot use 'e' as return type. Must be a type or template type`,
+		}, {
+			`
+type T<x>
+fn f(T<u>)`,
+			`file.txt:2:8 cannot resolve 'u'`,
+		}, {
+			`
+type x
+fn f<T>(T<x>)`,
+			`file.txt:2:9 'T' template parameters do not accept template arguments`,
+		}, {
+			`
+type A<N: num>
+type B
+fn f(A<B>)`,
+			`file.txt:3:8 cannot use type 'B' as template number`,
+		}, {
+			`
+type A<N>
+enum E { b }
+fn f(A<b>)`,
+			`file.txt:3:8 cannot use enum entry 'E.b' as template type`,
+		}, {
+			`
+type T
+type P<N: num>
+match m: T
+fn f(P<m>)`,
+			`file.txt:4:8 cannot use type matcher 'm' as template number`,
+		}, {
+			`
+type P<N: num>
+enum E { b }
+fn f(P<E>)`,
+			`file.txt:3:8 cannot use enum 'E' as template number`,
+		}, {
+			`
+type P<N: num>
+enum E { a b }
+match m: a | b
+fn f(P<m>)`,
+			`file.txt:4:8 cannot use enum matcher 'm' as template number`,
+		}, {
+			`
+type P<N: num>
+enum E { a b }
+match m: a | b
+fn f<M: m>(P<M>)`,
+			`file.txt:4:14 cannot use template enum 'E' as template number`,
+		}, {
+			`
+enum E { a }
+type T<X: a>`,
+			`file.txt:2:8 invalid template parameter type 'a'`,
+		}, {
+			`
+enum E { a }
+fn f<M: a>()`,
+			`file.txt:2:6 invalid template parameter type 'a'`,
+		},
+	} {
+
+		ast, err := parser.Parse(strings.TrimSpace(string(test.src)), "file.txt")
+		if err != nil {
+			t.Errorf("Unexpected parser error: %v", err)
+			continue
+		}
+
+		expectErr := strings.TrimSpace(test.err)
+		_, err = resolver.Resolve(ast)
+		if err != nil {
+			gotErr := strings.TrimSpace(fmt.Sprint(err))
+			if gotErr != expectErr {
+				t.Errorf("While parsing:\n%s\nGot error:\n%s\nExpected:\n%s", test.src, gotErr, expectErr)
+			}
+		} else if expectErr != success {
+			t.Errorf("While parsing:\n%s\nGot no error, expected error:\n%s", test.src, expectErr)
+		}
+	}
+}
diff --git a/tools/src/cmd/builtin-gen/sem/sem.go b/tools/src/cmd/builtin-gen/sem/sem.go
new file mode 100644
index 0000000..16a8c3e
--- /dev/null
+++ b/tools/src/cmd/builtin-gen/sem/sem.go
@@ -0,0 +1,283 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package sem
+
+import (
+	"fmt"
+
+	"dawn.googlesource.com/tint/tools/src/cmd/builtin-gen/ast"
+)
+
+// Sem is the root of the semantic tree
+type Sem struct {
+	Enums        []*Enum
+	Types        []*Type
+	TypeMatchers []*TypeMatcher
+	EnumMatchers []*EnumMatcher
+	Functions    []*Function
+	// Maximum number of open-types used across all builtins
+	MaxOpenTypes int
+	// Maximum number of open-numbers used across all builtins
+	MaxOpenNumbers int
+	// The alphabetically sorted list of unique parameter names
+	UniqueParameterNames []string
+}
+
+// New returns a new Sem
+func New() *Sem {
+	return &Sem{
+		Enums:        []*Enum{},
+		Types:        []*Type{},
+		TypeMatchers: []*TypeMatcher{},
+		EnumMatchers: []*EnumMatcher{},
+		Functions:    []*Function{},
+	}
+}
+
+// Enum describes an enumerator
+type Enum struct {
+	Decl    ast.EnumDecl
+	Name    string
+	Entries []*EnumEntry
+}
+
+// FindEntry returns the enum entry with the given name
+func (e *Enum) FindEntry(name string) *EnumEntry {
+	for _, entry := range e.Entries {
+		if entry.Name == name {
+			return entry
+		}
+	}
+	return nil
+}
+
+// EnumEntry is an entry in an enumerator
+type EnumEntry struct {
+	Enum       *Enum
+	Name       string
+	IsInternal bool // True if this entry is not part of the WGSL grammar
+}
+
+// Format implements the fmt.Formatter interface
+func (e EnumEntry) Format(w fmt.State, verb rune) {
+	if e.IsInternal {
+		fmt.Fprint(w, "[[internal]] ")
+	}
+	fmt.Fprint(w, e.Name)
+}
+
+// Type declares a type
+type Type struct {
+	TemplateParams []TemplateParam
+	Decl           ast.TypeDecl
+	Name           string
+	DisplayName    string
+}
+
+// TypeMatcher declares a type matcher
+type TypeMatcher struct {
+	TemplateParams []TemplateParam
+	Decl           ast.MatcherDecl
+	Name           string
+	Types          []*Type
+}
+
+// EnumMatcher declares a enum matcher
+type EnumMatcher struct {
+	TemplateParams []TemplateParam
+	Decl           ast.MatcherDecl
+	Name           string
+	Enum           *Enum
+	Options        []*EnumEntry
+}
+
+// TemplateEnumParam is a template enum parameter
+type TemplateEnumParam struct {
+	Name    string
+	Enum    *Enum
+	Matcher *EnumMatcher // Optional
+}
+
+// TemplateTypeParam is a template type parameter
+type TemplateTypeParam struct {
+	Name string
+	Type ResolvableType
+}
+
+// TemplateNumberParam is a template type parameter
+type TemplateNumberParam struct {
+	Name string
+}
+
+// Function describes the overloads of a builtin function
+type Function struct {
+	Name      string
+	Overloads []*Overload
+}
+
+// Overload describes a single overload of a function
+type Overload struct {
+	Decl             ast.FunctionDecl
+	Function         *Function
+	TemplateParams   []TemplateParam
+	OpenTypes        []*TemplateTypeParam
+	OpenNumbers      []TemplateParam
+	ReturnType       *FullyQualifiedName
+	Parameters       []Parameter
+	CanBeUsedInStage StageUses
+	IsDeprecated     bool // True if this overload is deprecated
+}
+
+// StageUses describes the stages an overload can be used in
+type StageUses struct {
+	Vertex   bool
+	Fragment bool
+	Compute  bool
+}
+
+// List returns the stage uses as a string list
+func (u StageUses) List() []string {
+	out := []string{}
+	if u.Vertex {
+		out = append(out, "vertex")
+	}
+	if u.Fragment {
+		out = append(out, "fragment")
+	}
+	if u.Compute {
+		out = append(out, "compute")
+	}
+	return out
+}
+
+// Format implements the fmt.Formatter interface
+func (o Overload) Format(w fmt.State, verb rune) {
+	fmt.Fprintf(w, "fn %v", o.Function.Name)
+	if len(o.TemplateParams) > 0 {
+		fmt.Fprintf(w, "<")
+		for i, t := range o.TemplateParams {
+			if i > 0 {
+				fmt.Fprint(w, ", ")
+			}
+			fmt.Fprintf(w, "%v", t)
+		}
+		fmt.Fprintf(w, ">")
+	}
+	fmt.Fprint(w, "(")
+	for i, p := range o.Parameters {
+		if i > 0 {
+			fmt.Fprint(w, ", ")
+		}
+		fmt.Fprintf(w, "%v", p)
+	}
+	fmt.Fprint(w, ")")
+	if o.ReturnType != nil {
+		fmt.Fprintf(w, " -> %v", o.ReturnType)
+	}
+}
+
+// Parameter describes a single parameter of a function overload
+type Parameter struct {
+	Name string
+	Type FullyQualifiedName
+}
+
+// Format implements the fmt.Formatter interface
+func (p Parameter) Format(w fmt.State, verb rune) {
+	if p.Name != "" {
+		fmt.Fprintf(w, "%v: ", p.Name)
+	}
+	fmt.Fprintf(w, "%v", p.Type)
+}
+
+// FullyQualifiedName is the usage of a Type, TypeMatcher or TemplateTypeParam
+type FullyQualifiedName struct {
+	Target            Named
+	TemplateArguments []interface{}
+}
+
+// Format implements the fmt.Formatter interface
+func (f FullyQualifiedName) Format(w fmt.State, verb rune) {
+	fmt.Fprint(w, f.Target.GetName())
+	if len(f.TemplateArguments) > 0 {
+		fmt.Fprintf(w, "<")
+		for i, t := range f.TemplateArguments {
+			if i > 0 {
+				fmt.Fprint(w, ", ")
+			}
+			fmt.Fprintf(w, "%v", t)
+		}
+		fmt.Fprintf(w, ">")
+	}
+}
+
+// TemplateParam is a TemplateEnumParam, TemplateTypeParam or TemplateNumberParam
+type TemplateParam interface {
+	Named
+	isTemplateParam()
+}
+
+func (*TemplateEnumParam) isTemplateParam()   {}
+func (*TemplateTypeParam) isTemplateParam()   {}
+func (*TemplateNumberParam) isTemplateParam() {}
+
+// ResolvableType is a Type, TypeMatcher or TemplateTypeParam
+type ResolvableType interface {
+	Named
+	isResolvableType()
+}
+
+func (*Type) isResolvableType()              {}
+func (*TypeMatcher) isResolvableType()       {}
+func (*TemplateTypeParam) isResolvableType() {}
+
+// Named is something that can be looked up by name
+type Named interface {
+	isNamed()
+	GetName() string
+}
+
+func (*Enum) isNamed()                {}
+func (*EnumEntry) isNamed()           {}
+func (*Type) isNamed()                {}
+func (*TypeMatcher) isNamed()         {}
+func (*EnumMatcher) isNamed()         {}
+func (*TemplateTypeParam) isNamed()   {}
+func (*TemplateEnumParam) isNamed()   {}
+func (*TemplateNumberParam) isNamed() {}
+
+// GetName returns the name of the Enum
+func (e *Enum) GetName() string { return e.Name }
+
+// GetName returns the name of the EnumEntry
+func (e *EnumEntry) GetName() string { return e.Name }
+
+// GetName returns the name of the Type
+func (t *Type) GetName() string { return t.Name }
+
+// GetName returns the name of the TypeMatcher
+func (t *TypeMatcher) GetName() string { return t.Name }
+
+// GetName returns the name of the EnumMatcher
+func (e *EnumMatcher) GetName() string { return e.Name }
+
+// GetName returns the name of the TemplateTypeParam
+func (t *TemplateTypeParam) GetName() string { return t.Name }
+
+// GetName returns the name of the TemplateEnumParam
+func (t *TemplateEnumParam) GetName() string { return t.Name }
+
+// GetName returns the name of the TemplateNumberParam
+func (t *TemplateNumberParam) GetName() string { return t.Name }
diff --git a/tools/src/cmd/intrinsic-gen/tok/tok.go b/tools/src/cmd/builtin-gen/tok/tok.go
similarity index 100%
rename from tools/src/cmd/intrinsic-gen/tok/tok.go
rename to tools/src/cmd/builtin-gen/tok/tok.go
diff --git a/tools/src/cmd/intrinsic-gen/ast/ast.go b/tools/src/cmd/intrinsic-gen/ast/ast.go
deleted file mode 100644
index 8d1da0e..0000000
--- a/tools/src/cmd/intrinsic-gen/ast/ast.go
+++ /dev/null
@@ -1,307 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Package ast defines AST nodes that are produced by the Tint intrinsic
-// definition parser
-package ast
-
-import (
-	"fmt"
-	"strings"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/tok"
-)
-
-// AST is the parsed syntax tree of the intrinsic definition file
-type AST struct {
-	Enums     []EnumDecl
-	Types     []TypeDecl
-	Matchers  []MatcherDecl
-	Functions []FunctionDecl
-}
-
-func (a AST) String() string {
-	sb := strings.Builder{}
-	for _, e := range a.Enums {
-		fmt.Fprintf(&sb, "%v", e)
-		fmt.Fprintln(&sb)
-	}
-	for _, p := range a.Types {
-		fmt.Fprintf(&sb, "%v", p)
-		fmt.Fprintln(&sb)
-	}
-	for _, m := range a.Matchers {
-		fmt.Fprintf(&sb, "%v", m)
-		fmt.Fprintln(&sb)
-	}
-	for _, f := range a.Functions {
-		fmt.Fprintf(&sb, "%v", f)
-		fmt.Fprintln(&sb)
-	}
-	return sb.String()
-}
-
-// EnumDecl describes an enumerator
-type EnumDecl struct {
-	Source  tok.Source
-	Name    string
-	Entries []EnumEntry
-}
-
-// Format implements the fmt.Formatter interface
-func (e EnumDecl) Format(w fmt.State, verb rune) {
-	fmt.Fprintf(w, "enum %v {\n", e.Name)
-	for _, e := range e.Entries {
-		fmt.Fprintf(w, "  %v\n", e)
-	}
-	fmt.Fprintf(w, "}\n")
-}
-
-// EnumEntry describes an entry in a enumerator
-type EnumEntry struct {
-	Source      tok.Source
-	Name        string
-	Decorations Decorations
-}
-
-// Format implements the fmt.Formatter interface
-func (e EnumEntry) Format(w fmt.State, verb rune) {
-	if len(e.Decorations) > 0 {
-		fmt.Fprintf(w, "%v %v", e.Decorations, e.Name)
-	} else {
-		fmt.Fprint(w, e.Name)
-	}
-}
-
-// MatcherDecl describes a matcher declaration
-type MatcherDecl struct {
-	Source  tok.Source
-	Name    string
-	Options MatcherOptions
-}
-
-// Format implements the fmt.Formatter interface
-func (m MatcherDecl) Format(w fmt.State, verb rune) {
-	fmt.Fprintf(w, "match %v", m.Name)
-	fmt.Fprintf(w, ": ")
-	m.Options.Format(w, verb)
-}
-
-// FunctionDecl describes a function declaration
-type FunctionDecl struct {
-	Source         tok.Source
-	Name           string
-	Decorations    Decorations
-	TemplateParams TemplateParams
-	Parameters     Parameters
-	ReturnType     *TemplatedName
-}
-
-// Format implements the fmt.Formatter interface
-func (f FunctionDecl) Format(w fmt.State, verb rune) {
-	fmt.Fprintf(w, "fn %v", f.Name)
-	f.TemplateParams.Format(w, verb)
-	f.Parameters.Format(w, verb)
-	if f.ReturnType != nil {
-		fmt.Fprintf(w, " -> ")
-		f.ReturnType.Format(w, verb)
-	}
-}
-
-// Parameters is a list of parameter
-type Parameters []Parameter
-
-// Format implements the fmt.Formatter interface
-func (l Parameters) Format(w fmt.State, verb rune) {
-	fmt.Fprintf(w, "(")
-	for i, p := range l {
-		if i > 0 {
-			fmt.Fprintf(w, ", ")
-		}
-		p.Format(w, verb)
-	}
-	fmt.Fprintf(w, ")")
-}
-
-// Parameter describes a single parameter of a function
-type Parameter struct {
-	Source tok.Source
-	Name   string // Optional
-	Type   TemplatedName
-}
-
-// Format implements the fmt.Formatter interface
-func (p Parameter) Format(w fmt.State, verb rune) {
-	if p.Name != "" {
-		fmt.Fprintf(w, "%v: ", p.Name)
-	}
-	p.Type.Format(w, verb)
-}
-
-// MatcherOptions is a list of TemplatedName
-type MatcherOptions TemplatedNames
-
-// Format implements the fmt.Formatter interface
-func (o MatcherOptions) Format(w fmt.State, verb rune) {
-	for i, mo := range o {
-		if i > 0 {
-			fmt.Fprintf(w, " | ")
-		}
-		mo.Format(w, verb)
-	}
-}
-
-// TemplatedNames is a list of TemplatedName
-// Example:
-//   a<b>, c<d, e>
-type TemplatedNames []TemplatedName
-
-// Format implements the fmt.Formatter interface
-func (l TemplatedNames) Format(w fmt.State, verb rune) {
-	for i, n := range l {
-		if i > 0 {
-			fmt.Fprintf(w, ", ")
-		}
-		n.Format(w, verb)
-	}
-}
-
-// TemplatedName is an identifier with optional templated arguments
-// Example:
-//  vec<N, T>
-type TemplatedName struct {
-	Source       tok.Source
-	Name         string
-	TemplateArgs TemplatedNames
-}
-
-// Format implements the fmt.Formatter interface
-func (t TemplatedName) Format(w fmt.State, verb rune) {
-	fmt.Fprintf(w, "%v", t.Name)
-	if len(t.TemplateArgs) > 0 {
-		fmt.Fprintf(w, "<")
-		t.TemplateArgs.Format(w, verb)
-		fmt.Fprintf(w, ">")
-	}
-}
-
-// TypeDecl describes a type declaration
-type TypeDecl struct {
-	Source         tok.Source
-	Decorations    Decorations
-	Name           string
-	TemplateParams TemplateParams
-}
-
-// Format implements the fmt.Formatter interface
-func (p TypeDecl) Format(w fmt.State, verb rune) {
-	if len(p.Decorations) > 0 {
-		p.Decorations.Format(w, verb)
-		fmt.Fprintf(w, " type %v", p.Name)
-	}
-	fmt.Fprintf(w, "type %v", p.Name)
-	p.TemplateParams.Format(w, verb)
-}
-
-// TemplateParams is a list of TemplateParam
-// Example:
-//   <A, B : TyB>
-type TemplateParams []TemplateParam
-
-// Format implements the fmt.Formatter interface
-func (p TemplateParams) Format(w fmt.State, verb rune) {
-	if len(p) > 0 {
-		fmt.Fprintf(w, "<")
-		for i, tp := range p {
-			if i > 0 {
-				fmt.Fprintf(w, ", ")
-			}
-			tp.Format(w, verb)
-		}
-		fmt.Fprintf(w, ">")
-	}
-}
-
-// TemplateParam describes a template parameter with optional type
-// Example:
-//   <Name>
-//   <Name: Type>
-type TemplateParam struct {
-	Source tok.Source
-	Name   string
-	Type   TemplatedName // Optional
-}
-
-// Format implements the fmt.Formatter interface
-func (t TemplateParam) Format(w fmt.State, verb rune) {
-	fmt.Fprintf(w, "%v", t.Name)
-	if t.Type.Name != "" {
-		fmt.Fprintf(w, " : ")
-		t.Type.Format(w, verb)
-	}
-}
-
-// Decorations is a list of Decoration
-// Example:
-//   [[a(x), b(y)]]
-type Decorations []Decoration
-
-// Format implements the fmt.Formatter interface
-func (l Decorations) Format(w fmt.State, verb rune) {
-	fmt.Fprint(w, "[[")
-	for i, d := range l {
-		if i > 0 {
-			fmt.Fprintf(w, ", ")
-		}
-		d.Format(w, verb)
-	}
-	fmt.Fprint(w, "]]")
-}
-
-// Take looks up the decoration with the given name. If the decoration is found
-// it is removed from the Decorations list and returned, otherwise nil is
-// returned and the Decorations are not altered.
-func (l *Decorations) Take(name string) *Decoration {
-	for i, d := range *l {
-		if d.Name == name {
-			*l = append((*l)[:i], (*l)[i+1:]...)
-			return &d
-		}
-	}
-	return nil
-}
-
-// Decoration describes a single decoration
-// Example:
-//   a(x)
-type Decoration struct {
-	Source tok.Source
-	Name   string
-	Values []string
-}
-
-// Format implements the fmt.Formatter interface
-func (d Decoration) Format(w fmt.State, verb rune) {
-	fmt.Fprintf(w, "%v", d.Name)
-	if len(d.Values) > 0 {
-		fmt.Fprintf(w, "(")
-		for i, v := range d.Values {
-			if i > 0 {
-				fmt.Fprint(w, ", ")
-			}
-			fmt.Fprintf(w, "%v", v)
-		}
-		fmt.Fprintf(w, ")")
-	}
-}
diff --git a/tools/src/cmd/intrinsic-gen/gen/generate.go b/tools/src/cmd/intrinsic-gen/gen/generate.go
deleted file mode 100644
index 34a8257..0000000
--- a/tools/src/cmd/intrinsic-gen/gen/generate.go
+++ /dev/null
@@ -1,271 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package gen
-
-import (
-	"fmt"
-	"io"
-	"reflect"
-	"strings"
-	"text/template"
-	"unicode"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/sem"
-)
-
-type generator struct {
-	s      *sem.Sem
-	t      *template.Template
-	cached struct {
-		intrinsicTable *IntrinsicTable // lazily built by intrinsicTable()
-		permuter       *Permuter       // lazily built by permute()
-	}
-}
-
-// WriteFile is a function that Generate() may call to emit a new file from a
-// template.
-// relpath is the relative path from the currently executing template.
-// content is the file content to write.
-type WriteFile func(relpath, content string) error
-
-// Generate executes the template tmpl using the provided semantic
-// information, writing the output to w.
-// See https://golang.org/pkg/text/template/ for documentation on the template
-// syntax.
-func Generate(s *sem.Sem, tmpl string, w io.Writer, writeFile WriteFile) error {
-	g := generator{s: s}
-	return g.generate(tmpl, w, writeFile)
-}
-
-func (g *generator) generate(tmpl string, w io.Writer, writeFile WriteFile) error {
-	t, err := template.New("<template>").Funcs(map[string]interface{}{
-		"Map":                   newMap,
-		"Iterate":               iterate,
-		"Title":                 strings.Title,
-		"PascalCase":            pascalCase,
-		"SplitDisplayName":      splitDisplayName,
-		"HasPrefix":             strings.HasPrefix,
-		"HasSuffix":             strings.HasSuffix,
-		"TrimPrefix":            strings.TrimPrefix,
-		"TrimSuffix":            strings.TrimSuffix,
-		"TrimLeft":              strings.TrimLeft,
-		"TrimRight":             strings.TrimRight,
-		"IsEnumEntry":           is(sem.EnumEntry{}),
-		"IsEnumMatcher":         is(sem.EnumMatcher{}),
-		"IsFQN":                 is(sem.FullyQualifiedName{}),
-		"IsInt":                 is(1),
-		"IsTemplateEnumParam":   is(sem.TemplateEnumParam{}),
-		"IsTemplateNumberParam": is(sem.TemplateNumberParam{}),
-		"IsTemplateTypeParam":   is(sem.TemplateTypeParam{}),
-		"IsType":                is(sem.Type{}),
-		"IsDeclarable":          isDeclarable,
-		"IsFirstIn":             isFirstIn,
-		"IsLastIn":              isLastIn,
-		"IntrinsicTable":        g.intrinsicTable,
-		"Permute":               g.permute,
-		"Eval":                  g.eval,
-		"WriteFile":             func(relpath, content string) (string, error) { return "", writeFile(relpath, content) },
-	}).Option("missingkey=error").
-		Parse(tmpl)
-	if err != nil {
-		return err
-	}
-	g.t = t
-	return t.Execute(w, map[string]interface{}{
-		"Sem": g.s,
-	})
-}
-
-// eval executes the sub-template with the given name and argument, returning
-// the generated output
-func (g *generator) eval(template string, args ...interface{}) (string, error) {
-	target := g.t.Lookup(template)
-	if target == nil {
-		return "", fmt.Errorf("template '%v' not found", template)
-	}
-	sb := strings.Builder{}
-
-	var err error
-	if len(args) == 1 {
-		err = target.Execute(&sb, args[0])
-	} else {
-		m := newMap()
-		if len(args)%2 != 0 {
-			return "", fmt.Errorf("Eval expects a single argument or list name-value pairs")
-		}
-		for i := 0; i < len(args); i += 2 {
-			name, ok := args[i].(string)
-			if !ok {
-				return "", fmt.Errorf("Eval argument %v is not a string", i)
-			}
-			m.Put(name, args[i+1])
-		}
-		err = target.Execute(&sb, m)
-	}
-
-	if err != nil {
-		return "", fmt.Errorf("while evaluating '%v': %v", template, err)
-	}
-	return sb.String(), nil
-}
-
-// intrinsicTable lazily calls and returns the result of buildIntrinsicTable(),
-// caching the result for repeated calls.
-func (g *generator) intrinsicTable() (*IntrinsicTable, error) {
-	if g.cached.intrinsicTable == nil {
-		var err error
-		g.cached.intrinsicTable, err = buildIntrinsicTable(g.s)
-		if err != nil {
-			return nil, err
-		}
-	}
-	return g.cached.intrinsicTable, nil
-}
-
-// permute lazily calls buildPermuter(), caching the result for repeated
-// calls, then passes the argument to Permutator.Permute()
-func (g *generator) permute(overload *sem.Overload) ([]Permutation, error) {
-	if g.cached.permuter == nil {
-		var err error
-		g.cached.permuter, err = buildPermuter(g.s)
-		if err != nil {
-			return nil, err
-		}
-	}
-	return g.cached.permuter.Permute(overload)
-}
-
-// Map is a simple generic key-value map, which can be used in the template
-type Map map[interface{}]interface{}
-
-func newMap() Map { return Map{} }
-
-// Put adds the key-value pair into the map.
-// Put always returns an empty string so nothing is printed in the template.
-func (m Map) Put(key, value interface{}) string {
-	m[key] = value
-	return ""
-}
-
-// Get looks up and returns the value with the given key. If the map does not
-// contain the given key, then nil is returned.
-func (m Map) Get(key interface{}) interface{} {
-	return m[key]
-}
-
-// is returns a function that returns true if the value passed to the function
-// matches the type of 'ty'.
-func is(ty interface{}) func(interface{}) bool {
-	rty := reflect.TypeOf(ty)
-	return func(v interface{}) bool {
-		ty := reflect.TypeOf(v)
-		return ty == rty || ty == reflect.PtrTo(rty)
-	}
-}
-
-// isFirstIn returns true if v is the first element of the given slice.
-func isFirstIn(v, slice interface{}) bool {
-	s := reflect.ValueOf(slice)
-	count := s.Len()
-	if count == 0 {
-		return false
-	}
-	return s.Index(0).Interface() == v
-}
-
-// isFirstIn returns true if v is the last element of the given slice.
-func isLastIn(v, slice interface{}) bool {
-	s := reflect.ValueOf(slice)
-	count := s.Len()
-	if count == 0 {
-		return false
-	}
-	return s.Index(count-1).Interface() == v
-}
-
-// iterate returns a slice of length 'n', with each element equal to its index.
-// Useful for: {{- range Iterate $n -}}<this will be looped $n times>{{end}}
-func iterate(n int) []int {
-	out := make([]int, n)
-	for i := range out {
-		out[i] = i
-	}
-	return out
-}
-
-// isDeclarable returns false if the FullyQualifiedName starts with a
-// leading underscore. These are undeclarable as WGSL does not allow identifers
-// to have a leading underscore.
-func isDeclarable(fqn sem.FullyQualifiedName) bool {
-	return !strings.HasPrefix(fqn.Target.GetName(), "_")
-}
-
-// pascalCase returns the snake-case string s transformed into 'PascalCase',
-// Rules:
-// * The first letter of the string is capitalized
-// * Characters following an underscore or number are capitalized
-// * Underscores are removed from the returned string
-// See: https://en.wikipedia.org/wiki/Camel_case
-func pascalCase(s string) string {
-	b := strings.Builder{}
-	upper := true
-	for _, r := range s {
-		if r == '_' {
-			upper = true
-			continue
-		}
-		if upper {
-			b.WriteRune(unicode.ToUpper(r))
-			upper = false
-		} else {
-			b.WriteRune(r)
-		}
-		if unicode.IsNumber(r) {
-			upper = true
-		}
-	}
-	return b.String()
-}
-
-// splitDisplayName splits displayName into parts, where text wrapped in {}
-// braces are not quoted and the rest is quoted. This is used to help process
-// the string value of the [[display()]] decoration. For example:
-//   splitDisplayName("vec{N}<{T}>")
-// would return the strings:
-//   [`"vec"`, `N`, `"<"`, `T`, `">"`]
-func splitDisplayName(displayName string) []string {
-	parts := []string{}
-	pending := strings.Builder{}
-	for _, r := range displayName {
-		switch r {
-		case '{':
-			if pending.Len() > 0 {
-				parts = append(parts, fmt.Sprintf(`"%v"`, pending.String()))
-				pending.Reset()
-			}
-		case '}':
-			if pending.Len() > 0 {
-				parts = append(parts, pending.String())
-				pending.Reset()
-			}
-		default:
-			pending.WriteRune(r)
-		}
-	}
-	if pending.Len() > 0 {
-		parts = append(parts, fmt.Sprintf(`"%v"`, pending.String()))
-	}
-	return parts
-}
diff --git a/tools/src/cmd/intrinsic-gen/gen/intrinsic_table.go b/tools/src/cmd/intrinsic-gen/gen/intrinsic_table.go
deleted file mode 100644
index 821b1d6..0000000
--- a/tools/src/cmd/intrinsic-gen/gen/intrinsic_table.go
+++ /dev/null
@@ -1,387 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package gen
-
-import (
-	"fmt"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/sem"
-	"dawn.googlesource.com/tint/tools/src/list"
-	"dawn.googlesource.com/tint/tools/src/lut"
-)
-
-// IntrinsicTable holds data specific to the intrinsic_table.inl.tmpl template
-type IntrinsicTable struct {
-	// The semantic info
-	Sem *sem.Sem
-
-	// TMatchers are all the sem.OpenType, sem.Type and sem.TypeMatchers.
-	// These are all implemented by classes deriving from tint::TypeMatcher
-	TMatchers     []sem.Named
-	TMatcherIndex map[sem.Named]int // [object -> index] in TMatcher
-
-	// NMatchers are all the sem.OpenNumber and sem.EnumMatchers.
-	// These are all implemented by classes deriving from tint::NumberMatcher
-	NMatchers     []sem.Named
-	NMatcherIndex map[sem.Named]int // [object -> index] in NMatchers
-
-	MatcherIndices []int        // kMatcherIndices table content
-	OpenTypes      []OpenType   // kOpenTypes table content
-	OpenNumbers    []OpenNumber // kOpenNumbers table content
-	Parameters     []Parameter  // kParameters table content
-	Overloads      []Overload   // kOverloads table content
-	Functions      []Function   // kIntrinsics table content
-}
-
-// OpenType is used to create the C++ OpenTypeInfo structure
-type OpenType struct {
-	// Name of the open type (e.g. 'T')
-	Name string
-	// Optional type matcher constraint.
-	// Either an index in Matchers::type, or -1
-	MatcherIndex int
-}
-
-// OpenNumber is used to create the C++ OpenNumberInfo structure
-type OpenNumber struct {
-	// Name of the open number (e.g. 'N')
-	Name string
-	// Optional type matcher constraint.
-	// Either an index in Matchers::type, or -1
-	MatcherIndex int
-}
-
-// Parameter is used to create the C++ ParameterInfo structure
-type Parameter struct {
-	// The parameter usage (parameter name)
-	Usage string
-
-	// Index into IntrinsicTable.MatcherIndices, beginning the list of matchers
-	// required to match the parameter type. The matcher indices index
-	// into IntrinsicTable::TMatchers and / or IntrinsicTable::NMatchers.
-	// These indices are consumed by the matchers themselves.
-	// The first index is always a TypeMatcher.
-	MatcherIndicesOffset *int
-}
-
-// Overload is used to create the C++ OverloadInfo structure
-type Overload struct {
-	// Total number of parameters for the overload
-	NumParameters int
-	// Total number of open types for the overload
-	NumOpenTypes int
-	// Total number of open numbers for the overload
-	NumOpenNumbers int
-	// Index to the first open type in IntrinsicTable.OpenTypes
-	OpenTypesOffset *int
-	// Index to the first open number in IntrinsicTable.OpenNumbers
-	OpenNumbersOffset *int
-	// Index to the first parameter in IntrinsicTable.Parameters
-	ParametersOffset *int
-	// Index into IntrinsicTable.MatcherIndices, beginning the list of matchers
-	// required to match the return type. The matcher indices index
-	// into IntrinsicTable::TMatchers and / or IntrinsicTable::NMatchers.
-	// These indices are consumed by the matchers themselves.
-	// The first index is always a TypeMatcher.
-	ReturnMatcherIndicesOffset *int
-	// StageUses describes the stages an overload can be used in
-	CanBeUsedInStage sem.StageUses
-	// True if the overload is marked as deprecated
-	IsDeprecated bool
-}
-
-// Function is used to create the C++ IntrinsicInfo structure
-type Function struct {
-	OverloadDescriptions []string
-	NumOverloads         int
-	OverloadsOffset      *int
-}
-
-// Helper for building the IntrinsicTable
-type intrinsicTableBuilder struct {
-	// The output of the builder
-	IntrinsicTable
-
-	// Lookup tables.
-	// These are packed (compressed) once all the entries have been added.
-	lut struct {
-		matcherIndices lut.LUT
-		openTypes      lut.LUT
-		openNumbers    lut.LUT
-		parameters     lut.LUT
-		overloads      lut.LUT
-	}
-}
-
-// Helper for building a single overload
-type overloadBuilder struct {
-	*intrinsicTableBuilder
-	// Maps TemplateParam to index in openTypes
-	openTypeIndex map[sem.TemplateParam]int
-	// Maps TemplateParam to index in openNumbers
-	openNumberIndex map[sem.TemplateParam]int
-	// Open types used by the overload
-	openTypes []OpenType
-	// Open numbers used by the overload
-	openNumbers []OpenNumber
-	// All parameters declared by the overload
-	parameters []Parameter
-	// Index into IntrinsicTable.MatcherIndices, beginning the list of matchers
-	// required to match the return type. The matcher indices index
-	// into IntrinsicTable::TMatchers and / or IntrinsicTable::NMatchers.
-	// These indices are consumed by the matchers themselves.
-	// The first index is always a TypeMatcher.
-	returnTypeMatcherIndicesOffset *int
-}
-
-// layoutMatchers assigns each of the TMatchers and NMatchers a unique index
-// in the C++ Matchers::type and Matchers::number arrays, respectively.
-func (b *intrinsicTableBuilder) layoutMatchers(s *sem.Sem) {
-	// First MaxOpenTypes of TMatchers are open types
-	b.TMatchers = make([]sem.Named, s.MaxOpenTypes)
-	for _, m := range s.Types {
-		b.TMatcherIndex[m] = len(b.TMatchers)
-		b.TMatchers = append(b.TMatchers, m)
-	}
-	for _, m := range s.TypeMatchers {
-		b.TMatcherIndex[m] = len(b.TMatchers)
-		b.TMatchers = append(b.TMatchers, m)
-	}
-
-	// First MaxOpenNumbers of NMatchers are open numbers
-	b.NMatchers = make([]sem.Named, s.MaxOpenNumbers)
-	for _, m := range s.EnumMatchers {
-		b.NMatcherIndex[m] = len(b.NMatchers)
-		b.NMatchers = append(b.NMatchers, m)
-	}
-}
-
-// buildOverload constructs an Overload for a sem.Overload
-func (b *intrinsicTableBuilder) buildOverload(o *sem.Overload) (Overload, error) {
-	ob := overloadBuilder{
-		intrinsicTableBuilder: b,
-		openTypeIndex:         map[sem.TemplateParam]int{},
-		openNumberIndex:       map[sem.TemplateParam]int{},
-	}
-
-	if err := ob.buildOpenTypes(o); err != nil {
-		return Overload{}, err
-	}
-	if err := ob.buildOpenNumbers(o); err != nil {
-		return Overload{}, err
-	}
-	if err := ob.buildParameters(o); err != nil {
-		return Overload{}, err
-	}
-	if err := ob.buildReturnType(o); err != nil {
-		return Overload{}, err
-	}
-
-	return Overload{
-		NumParameters:              len(ob.parameters),
-		NumOpenTypes:               len(ob.openTypes),
-		NumOpenNumbers:             len(ob.openNumbers),
-		OpenTypesOffset:            b.lut.openTypes.Add(ob.openTypes),
-		OpenNumbersOffset:          b.lut.openNumbers.Add(ob.openNumbers),
-		ParametersOffset:           b.lut.parameters.Add(ob.parameters),
-		ReturnMatcherIndicesOffset: ob.returnTypeMatcherIndicesOffset,
-		CanBeUsedInStage:           o.CanBeUsedInStage,
-		IsDeprecated:               o.IsDeprecated,
-	}, nil
-}
-
-// buildOpenTypes constructs the OpenTypes used by the overload, populating
-// b.openTypes
-func (b *overloadBuilder) buildOpenTypes(o *sem.Overload) error {
-	b.openTypes = make([]OpenType, len(o.OpenTypes))
-	for i, t := range o.OpenTypes {
-		b.openTypeIndex[t] = i
-		matcherIndex := -1
-		if t.Type != nil {
-			var err error
-			matcherIndex, err = b.matcherIndex(t.Type)
-			if err != nil {
-				return err
-			}
-		}
-		b.openTypes[i] = OpenType{
-			Name:         t.Name,
-			MatcherIndex: matcherIndex,
-		}
-	}
-	return nil
-}
-
-// buildOpenNumbers constructs the OpenNumbers used by the overload, populating
-// b.openNumbers
-func (b *overloadBuilder) buildOpenNumbers(o *sem.Overload) error {
-	b.openNumbers = make([]OpenNumber, len(o.OpenNumbers))
-	for i, t := range o.OpenNumbers {
-		b.openNumberIndex[t] = i
-		matcherIndex := -1
-		if e, ok := t.(*sem.TemplateEnumParam); ok && e.Matcher != nil {
-			var err error
-			matcherIndex, err = b.matcherIndex(e.Matcher)
-			if err != nil {
-				return err
-			}
-		}
-		b.openNumbers[i] = OpenNumber{
-			Name:         t.GetName(),
-			MatcherIndex: matcherIndex,
-		}
-	}
-	return nil
-}
-
-// buildParameters constructs the Parameters used by the overload, populating
-// b.parameters
-func (b *overloadBuilder) buildParameters(o *sem.Overload) error {
-	b.parameters = make([]Parameter, len(o.Parameters))
-	for i, p := range o.Parameters {
-		indices, err := b.collectMatcherIndices(p.Type)
-		if err != nil {
-			return err
-		}
-
-		b.parameters[i] = Parameter{
-			Usage:                p.Name,
-			MatcherIndicesOffset: b.lut.matcherIndices.Add(indices),
-		}
-	}
-	return nil
-}
-
-// buildParameters calculates the matcher indices required to match the
-// overload's return type (if the overload has a return value), possibly
-// populating b.returnTypeMatcherIndicesOffset
-func (b *overloadBuilder) buildReturnType(o *sem.Overload) error {
-	if o.ReturnType != nil {
-		indices, err := b.collectMatcherIndices(*o.ReturnType)
-		if err != nil {
-			return err
-		}
-		b.returnTypeMatcherIndicesOffset = b.lut.matcherIndices.Add(indices)
-	}
-	return nil
-}
-
-// matcherIndex returns the index of TMatcher or NMatcher in
-// IntrinsicTable.TMatcher or IntrinsicTable.NMatcher, respectively.
-func (b *overloadBuilder) matcherIndex(n sem.Named) (int, error) {
-	switch n := n.(type) {
-	case *sem.Type, *sem.TypeMatcher:
-		if i, ok := b.TMatcherIndex[n]; ok {
-			return i, nil
-		}
-		return 0, fmt.Errorf("matcherIndex missing entry for %v %T", n.GetName(), n)
-	case *sem.TemplateTypeParam:
-		if i, ok := b.openTypeIndex[n]; ok {
-			return i, nil
-		}
-		return 0, fmt.Errorf("openTypeIndex missing entry for %v %T", n.Name, n)
-	case *sem.EnumMatcher:
-		if i, ok := b.NMatcherIndex[n]; ok {
-			return i, nil
-		}
-		return 0, fmt.Errorf("matcherIndex missing entry for %v %T", n.GetName(), n)
-	case *sem.TemplateEnumParam:
-		if i, ok := b.openNumberIndex[n]; ok {
-			return i, nil
-		}
-		return 0, fmt.Errorf("openNumberIndex missing entry for %v %T", n, n)
-	case *sem.TemplateNumberParam:
-		if i, ok := b.openNumberIndex[n]; ok {
-			return i, nil
-		}
-		return 0, fmt.Errorf("openNumberIndex missing entry for %v %T", n, n)
-	default:
-		return 0, fmt.Errorf("overload.matcherIndex() does not handle %v %T", n, n)
-	}
-}
-
-// collectMatcherIndices returns the full list of matcher indices required to
-// match the fully-qualified-name. For names that have do not have templated
-// arguments, collectMatcherIndices() will return a single TMatcher index.
-// For names that do have templated arguments, collectMatcherIndices() returns
-// a list of type matcher indices, starting with the target of the fully
-// qualified name, then followed by each of the template arguments from left to
-// right. Note that template arguments may themselves have template arguments,
-// and so collectMatcherIndices() may call itself.
-// The order of returned matcher indices is always the order of the fully
-// qualified name as read from left to right.
-// For example, calling collectMatcherIndices() for the fully qualified name:
-//    A<B<C, D>, E<F, G<H>, I>
-// Would return the matcher indices:
-//    A, B, C, D, E, F, G, H, I
-func (b *overloadBuilder) collectMatcherIndices(fqn sem.FullyQualifiedName) ([]int, error) {
-	idx, err := b.matcherIndex(fqn.Target)
-	if err != nil {
-		return nil, err
-	}
-	out := []int{idx}
-	for _, arg := range fqn.TemplateArguments {
-		indices, err := b.collectMatcherIndices(arg.(sem.FullyQualifiedName))
-		if err != nil {
-			return nil, err
-		}
-		out = append(out, indices...)
-	}
-	return out, nil
-}
-
-// buildIntrinsicTable builds the IntrinsicTable from the semantic info
-func buildIntrinsicTable(s *sem.Sem) (*IntrinsicTable, error) {
-	b := intrinsicTableBuilder{
-		IntrinsicTable: IntrinsicTable{
-			Sem:           s,
-			TMatcherIndex: map[sem.Named]int{},
-			NMatcherIndex: map[sem.Named]int{},
-		},
-	}
-	b.lut.matcherIndices = lut.New(list.Wrap(&b.MatcherIndices))
-	b.lut.openTypes = lut.New(list.Wrap(&b.OpenTypes))
-	b.lut.openNumbers = lut.New(list.Wrap(&b.OpenNumbers))
-	b.lut.parameters = lut.New(list.Wrap(&b.Parameters))
-	b.lut.overloads = lut.New(list.Wrap(&b.Overloads))
-
-	b.layoutMatchers(s)
-
-	for _, f := range s.Functions {
-		overloads := make([]Overload, len(f.Overloads))
-		overloadDescriptions := make([]string, len(f.Overloads))
-		for i, o := range f.Overloads {
-			overloadDescriptions[i] = fmt.Sprint(o.Decl)
-			var err error
-			if overloads[i], err = b.buildOverload(o); err != nil {
-				return nil, err
-			}
-		}
-
-		b.Functions = append(b.Functions, Function{
-			OverloadDescriptions: overloadDescriptions,
-			NumOverloads:         len(overloads),
-			OverloadsOffset:      b.lut.overloads.Add(overloads),
-		})
-	}
-
-	b.lut.matcherIndices.Compact()
-	b.lut.openTypes.Compact()
-	b.lut.openNumbers.Compact()
-	b.lut.parameters.Compact()
-	b.lut.overloads.Compact()
-
-	return &b.IntrinsicTable, nil
-}
diff --git a/tools/src/cmd/intrinsic-gen/gen/permutate.go b/tools/src/cmd/intrinsic-gen/gen/permutate.go
deleted file mode 100644
index 61fda1a..0000000
--- a/tools/src/cmd/intrinsic-gen/gen/permutate.go
+++ /dev/null
@@ -1,380 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package gen
-
-import (
-	"crypto/sha256"
-	"encoding/hex"
-	"fmt"
-	"strings"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/sem"
-	"dawn.googlesource.com/tint/tools/src/fileutils"
-)
-
-// Permuter generates permutations of intrinsic overloads
-type Permuter struct {
-	sem      *sem.Sem
-	allTypes []sem.FullyQualifiedName
-}
-
-// buildPermuter returns a new initialized Permuter
-func buildPermuter(s *sem.Sem) (*Permuter, error) {
-	// allTypes are the list of FQNs that are used for open, unconstrained types
-	allTypes := []sem.FullyQualifiedName{}
-	for _, ty := range s.Types {
-		if len(ty.TemplateParams) > 0 {
-			// Ignore aggregate types for now.
-			// TODO(bclayton): Support a limited set of aggregate types
-			continue
-		}
-		allTypes = append(allTypes, sem.FullyQualifiedName{Target: ty})
-	}
-	return &Permuter{
-		sem:      s,
-		allTypes: allTypes,
-	}, nil
-}
-
-// Permutation describes a single permutation of an overload
-type Permutation struct {
-	sem.Overload        // The permutated overload signature
-	Desc         string // Description of the overload
-	Hash         string // Hash of the overload
-}
-
-// Permute generates a set of permutations for the given intrinsic overload
-func (p *Permuter) Permute(overload *sem.Overload) ([]Permutation, error) {
-	state := permutationState{
-		Permuter:      p,
-		closedTypes:   map[sem.TemplateParam]sem.FullyQualifiedName{},
-		closedNumbers: map[sem.TemplateParam]interface{}{},
-		parameters:    map[int]sem.FullyQualifiedName{},
-	}
-
-	out := []Permutation{}
-
-	// Map of hash to permutation description. Used to detect collisions.
-	hashes := map[string]string{}
-
-	// permutate appends a permutation to out.
-	// permutate may be chained to generate N-dimensional permutations.
-	permutate := func() error {
-		o := sem.Overload{
-			Decl:             overload.Decl,
-			Function:         overload.Function,
-			CanBeUsedInStage: overload.CanBeUsedInStage,
-		}
-		for i, p := range overload.Parameters {
-			ty := state.parameters[i]
-			if !validate(ty, &o.CanBeUsedInStage) {
-				return nil
-			}
-			o.Parameters = append(o.Parameters, sem.Parameter{
-				Name: p.Name,
-				Type: ty,
-			})
-		}
-		if overload.ReturnType != nil {
-			retTys, err := state.permutateFQN(*overload.ReturnType)
-			if err != nil {
-				return fmt.Errorf("while permutating return type: %w", err)
-			}
-			if len(retTys) != 1 {
-				return fmt.Errorf("result type not pinned")
-			}
-			o.ReturnType = &retTys[0]
-		}
-		desc := fmt.Sprint(o)
-		hash := sha256.Sum256([]byte(desc))
-		const hashLength = 6
-		shortHash := hex.EncodeToString(hash[:])[:hashLength]
-		out = append(out, Permutation{
-			Overload: o,
-			Desc:     desc,
-			Hash:     shortHash,
-		})
-
-		// Check for hash collisions
-		if existing, collision := hashes[shortHash]; collision {
-			return fmt.Errorf("hash '%v' collision between %v and %v\nIncrease hashLength in %v",
-				shortHash, existing, desc, fileutils.GoSourcePath())
-		}
-		hashes[shortHash] = desc
-		return nil
-	}
-	for i, param := range overload.Parameters {
-		i, param := i, param // Capture iterator values for anonymous function
-		next := permutate    // Permutation chaining
-		permutate = func() error {
-			permutations, err := state.permutateFQN(param.Type)
-			if err != nil {
-				return fmt.Errorf("while processing parameter %v: %w", i, err)
-			}
-			if len(permutations) == 0 {
-				return fmt.Errorf("parameter %v has no permutations", i)
-			}
-			for _, fqn := range permutations {
-				state.parameters[i] = fqn
-				if err := next(); err != nil {
-					return err
-				}
-			}
-			return nil
-		}
-	}
-	for _, t := range overload.TemplateParams {
-		next := permutate // Permutation chaining
-		switch t := t.(type) {
-		case *sem.TemplateTypeParam:
-			types := p.allTypes
-			if t.Type != nil {
-				var err error
-				types, err = state.permutateFQN(sem.FullyQualifiedName{Target: t.Type})
-				if err != nil {
-					return nil, fmt.Errorf("while permutating open types: %w", err)
-				}
-			}
-			if len(types) == 0 {
-				return nil, fmt.Errorf("open type %v has no permutations", t.Name)
-			}
-			permutate = func() error {
-				for _, ty := range types {
-					state.closedTypes[t] = ty
-					if err := next(); err != nil {
-						return err
-					}
-				}
-				return nil
-			}
-		case *sem.TemplateEnumParam:
-			var permutations []sem.FullyQualifiedName
-			var err error
-			if t.Matcher != nil {
-				permutations, err = state.permutateFQN(sem.FullyQualifiedName{Target: t.Matcher})
-			} else {
-				permutations, err = state.permutateFQN(sem.FullyQualifiedName{Target: t.Enum})
-			}
-			if err != nil {
-				return nil, fmt.Errorf("while permutating open numbers: %w", err)
-			}
-			if len(permutations) == 0 {
-				return nil, fmt.Errorf("open type %v has no permutations", t.Name)
-			}
-			permutate = func() error {
-				for _, n := range permutations {
-					state.closedNumbers[t] = n
-					if err := next(); err != nil {
-						return err
-					}
-				}
-				return nil
-			}
-		case *sem.TemplateNumberParam:
-			// Currently all open numbers are used for vector / matrices
-			permutations := []int{2, 3, 4}
-			permutate = func() error {
-				for _, n := range permutations {
-					state.closedNumbers[t] = n
-					if err := next(); err != nil {
-						return err
-					}
-				}
-				return nil
-			}
-		}
-	}
-
-	if err := permutate(); err != nil {
-		return nil, fmt.Errorf("%v %v %w\nState: %v", overload.Decl.Source, overload.Decl, err, state)
-	}
-
-	return out, nil
-}
-
-type permutationState struct {
-	*Permuter
-	closedTypes   map[sem.TemplateParam]sem.FullyQualifiedName
-	closedNumbers map[sem.TemplateParam]interface{}
-	parameters    map[int]sem.FullyQualifiedName
-}
-
-func (s permutationState) String() string {
-	sb := &strings.Builder{}
-	sb.WriteString("Closed types:\n")
-	for ct, ty := range s.closedTypes {
-		fmt.Fprintf(sb, "  %v: %v\n", ct.GetName(), ty)
-	}
-	sb.WriteString("Closed numbers:\n")
-	for cn, v := range s.closedNumbers {
-		fmt.Fprintf(sb, "  %v: %v\n", cn.GetName(), v)
-	}
-	return sb.String()
-}
-
-func (s *permutationState) permutateFQN(in sem.FullyQualifiedName) ([]sem.FullyQualifiedName, error) {
-	args := append([]interface{}{}, in.TemplateArguments...)
-	out := []sem.FullyQualifiedName{}
-
-	// permutate appends a permutation to out.
-	// permutate may be chained to generate N-dimensional permutations.
-	var permutate func() error
-
-	switch target := in.Target.(type) {
-	case *sem.Type:
-		permutate = func() error {
-			out = append(out, sem.FullyQualifiedName{Target: in.Target, TemplateArguments: args})
-			args = append([]interface{}{}, in.TemplateArguments...)
-			return nil
-		}
-	case sem.TemplateParam:
-		if ty, ok := s.closedTypes[target]; ok {
-			permutate = func() error {
-				out = append(out, ty)
-				return nil
-			}
-		} else {
-			return nil, fmt.Errorf("'%v' was not found in closedTypes", target.GetName())
-		}
-	case *sem.TypeMatcher:
-		permutate = func() error {
-			for _, ty := range target.Types {
-				out = append(out, sem.FullyQualifiedName{Target: ty})
-			}
-			return nil
-		}
-	case *sem.EnumMatcher:
-		permutate = func() error {
-			for _, o := range target.Options {
-				if !o.IsInternal {
-					out = append(out, sem.FullyQualifiedName{Target: o})
-				}
-			}
-			return nil
-		}
-	case *sem.Enum:
-		permutate = func() error {
-			for _, e := range target.Entries {
-				if !e.IsInternal {
-					out = append(out, sem.FullyQualifiedName{Target: e})
-				}
-			}
-			return nil
-		}
-	default:
-		return nil, fmt.Errorf("unhandled target type: %T", in.Target)
-	}
-
-	for i, arg := range in.TemplateArguments {
-		i := i            // Capture iterator value for anonymous functions
-		next := permutate // Permutation chaining
-		switch arg := arg.(type) {
-		case sem.FullyQualifiedName:
-			switch target := arg.Target.(type) {
-			case sem.TemplateParam:
-				if ty, ok := s.closedTypes[target]; ok {
-					args[i] = ty
-				} else if num, ok := s.closedNumbers[target]; ok {
-					args[i] = num
-				} else {
-					return nil, fmt.Errorf("'%v' was not found in closedTypes or closedNumbers", target.GetName())
-				}
-			default:
-				perms, err := s.permutateFQN(arg)
-				if err != nil {
-					return nil, fmt.Errorf("while processing template argument %v: %v", i, err)
-				}
-				if len(perms) == 0 {
-					return nil, fmt.Errorf("template argument %v has no permutations", i)
-				}
-				permutate = func() error {
-					for _, f := range perms {
-						args[i] = f
-						if err := next(); err != nil {
-							return err
-						}
-					}
-					return nil
-				}
-			}
-		default:
-			return nil, fmt.Errorf("permutateFQN() unhandled template argument type: %T", arg)
-		}
-	}
-
-	if err := permutate(); err != nil {
-		return nil, fmt.Errorf("while processing fully qualified name '%v': %w", in.Target.GetName(), err)
-	}
-
-	return out, nil
-}
-
-func validate(fqn sem.FullyQualifiedName, uses *sem.StageUses) bool {
-	switch fqn.Target.GetName() {
-	case "array":
-		elTy := fqn.TemplateArguments[0].(sem.FullyQualifiedName)
-		elTyName := elTy.Target.GetName()
-		switch {
-		case elTyName == "bool" ||
-			strings.Contains(elTyName, "sampler"),
-			strings.Contains(elTyName, "texture"):
-			return false // Not storable
-		}
-	case "ptr":
-		// https://gpuweb.github.io/gpuweb/wgsl/#storage-class
-		access := fqn.TemplateArguments[2].(sem.FullyQualifiedName).Target.(*sem.EnumEntry).Name
-		storageClass := fqn.TemplateArguments[0].(sem.FullyQualifiedName).Target.(*sem.EnumEntry).Name
-		switch storageClass {
-		case "function", "private":
-			if access != "read_write" {
-				return false
-			}
-		case "workgroup":
-			uses.Vertex = false
-			uses.Fragment = false
-			if access != "read_write" {
-				return false
-			}
-		case "uniform":
-			if access != "read" {
-				return false
-			}
-		case "storage":
-			if access != "read_write" && access != "read" {
-				return false
-			}
-		case "handle":
-			if access != "read" {
-				return false
-			}
-		default:
-			return false
-		}
-	}
-
-	if !isDeclarable(fqn) {
-		return false
-	}
-
-	for _, arg := range fqn.TemplateArguments {
-		if argFQN, ok := arg.(sem.FullyQualifiedName); ok {
-			if !validate(argFQN, uses) {
-				return false
-			}
-		}
-	}
-
-	return true
-}
diff --git a/tools/src/cmd/intrinsic-gen/lexer/lexer.go b/tools/src/cmd/intrinsic-gen/lexer/lexer.go
deleted file mode 100644
index 1f25aea..0000000
--- a/tools/src/cmd/intrinsic-gen/lexer/lexer.go
+++ /dev/null
@@ -1,200 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Package lexer provides a basic lexer for the Tint intrinsic definition
-// language
-package lexer
-
-import (
-	"fmt"
-	"unicode"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/tok"
-)
-
-// Lex produces a list of tokens for the given source code
-func Lex(src []rune, filepath string) ([]tok.Token, error) {
-	l := lexer{
-		tok.Location{Line: 1, Column: 1, Rune: 0, Filepath: filepath},
-		src,
-		[]tok.Token{},
-	}
-	if err := l.lex(); err != nil {
-		return nil, err
-	}
-	return l.tokens, nil
-}
-
-type lexer struct {
-	loc    tok.Location
-	runes  []rune
-	tokens []tok.Token
-}
-
-// lex() lexes the source, populating l.tokens
-func (l *lexer) lex() error {
-	for {
-		switch l.peek(0) {
-		case 0:
-			return nil
-		case ' ', '\t':
-			l.next()
-		case '\n':
-			l.next()
-		case '<':
-			l.tok(1, tok.Lt)
-		case '>':
-			l.tok(1, tok.Gt)
-		case '(':
-			l.tok(1, tok.Lparen)
-		case ')':
-			l.tok(1, tok.Rparen)
-		case '{':
-			l.tok(1, tok.Lbrace)
-		case '}':
-			l.tok(1, tok.Rbrace)
-		case ':':
-			l.tok(1, tok.Colon)
-		case ',':
-			l.tok(1, tok.Comma)
-		case '|':
-			l.tok(1, tok.Or)
-		case '"':
-			start := l.loc
-			l.next() // Skip opening quote
-			n := l.count(toFirst('\n', '"'))
-			if l.peek(n) != '"' {
-				return fmt.Errorf("%v unterminated string", start)
-			}
-			l.tok(n, tok.String)
-			l.next() // Skip closing quote
-		default:
-			switch {
-			case l.peek(1) == '/':
-				l.skip(l.count(toFirst('\n')))
-				l.next() // Consume newline
-			case l.match("[[", tok.Ldeco):
-			case l.match("]]", tok.Rdeco):
-			case l.match("->", tok.Arrow):
-			case l.match("fn", tok.Function):
-			case l.match("enum", tok.Enum):
-			case l.match("type", tok.Type):
-			case l.match("match", tok.Match):
-			case unicode.IsLetter(l.peek(0)) || l.peek(0) == '_':
-				l.tok(l.count(alphaNumericOrUnderscore), tok.Identifier)
-			case unicode.IsNumber(l.peek(0)):
-				l.tok(l.count(unicode.IsNumber), tok.Integer)
-			default:
-				return fmt.Errorf("%v: unexpected '%v'", l.loc, string(l.runes[0]))
-			}
-		}
-	}
-}
-
-// next() consumes and returns the next rune in the source, or 0 if reached EOF
-func (l *lexer) next() rune {
-	if len(l.runes) > 0 {
-		r := l.runes[0]
-		l.runes = l.runes[1:]
-		l.loc.Rune++
-		if r == '\n' {
-			l.loc.Line++
-			l.loc.Column = 1
-		} else {
-			l.loc.Column++
-		}
-		return r
-	}
-	return 0
-}
-
-// skip() consumes the next `n` runes in the source
-func (l *lexer) skip(n int) {
-	for i := 0; i < n; i++ {
-		l.next()
-	}
-}
-
-// peek() returns the rune `i` runes ahead of the current position
-func (l *lexer) peek(i int) rune {
-	if i >= len(l.runes) {
-		return 0
-	}
-	return l.runes[i]
-}
-
-// predicate is a function that can be passed to count()
-type predicate func(r rune) bool
-
-// count() returns the number of sequential runes from the current position that
-// match the predicate `p`
-func (l *lexer) count(p predicate) int {
-	for i := 0; i < len(l.runes); i++ {
-		if !p(l.peek(i)) {
-			return i
-		}
-	}
-	return len(l.runes)
-}
-
-// tok() appends a new token of kind `k` using the next `n` runes.
-// The next `n` runes are consumed by tok().
-func (l *lexer) tok(n int, k tok.Kind) {
-	start := l.loc
-	runes := l.runes[:n]
-	l.skip(n)
-	end := l.loc
-
-	src := tok.Source{S: start, E: end}
-	l.tokens = append(l.tokens, tok.Token{Kind: k, Source: src, Runes: runes})
-}
-
-// match() checks whether the next runes are equal to `s`. If they are, then
-// these runes are used to append a new token of kind `k`, and match() returns
-// true. If the next runes are not equal to `s` then false is returned, and no
-// runes are consumed.
-func (l *lexer) match(s string, kind tok.Kind) bool {
-	runes := []rune(s)
-	if len(l.runes) < len(runes) {
-		return false
-	}
-	for i, r := range runes {
-		if l.runes[i] != r {
-			return false
-		}
-	}
-	l.tok(len(runes), kind)
-	return true
-}
-
-// toFirst() returns a predicate that returns true if the rune is not in `runes`
-// toFirst() is intended to be used with count(), so `count(toFirst('x'))` will
-// count up to, but not including the number of consecutive runes that are not
-// 'x'.
-func toFirst(runes ...rune) predicate {
-	return func(r rune) bool {
-		for _, t := range runes {
-			if t == r {
-				return false
-			}
-		}
-		return true
-	}
-}
-
-// alphaNumericOrUnderscore() returns true if the rune `r` is a number, letter
-// or underscore.
-func alphaNumericOrUnderscore(r rune) bool {
-	return r == '_' || unicode.IsLetter(r) || unicode.IsNumber(r)
-}
diff --git a/tools/src/cmd/intrinsic-gen/lexer/lexer_test.go b/tools/src/cmd/intrinsic-gen/lexer/lexer_test.go
deleted file mode 100644
index d0ec922..0000000
--- a/tools/src/cmd/intrinsic-gen/lexer/lexer_test.go
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package lexer_test
-
-import (
-	"fmt"
-	"testing"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/lexer"
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/tok"
-)
-
-func TestLexTokens(t *testing.T) {
-	type test struct {
-		src    string
-		expect tok.Token
-	}
-
-	filepath := "test.txt"
-	loc := func(l, c, r int) tok.Location {
-		return tok.Location{Line: l, Column: c, Rune: r, Filepath: filepath}
-	}
-
-	for _, test := range []test{
-		{"ident", tok.Token{Kind: tok.Identifier, Runes: []rune("ident"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 6, 5),
-		}}},
-		{"ident_123", tok.Token{Kind: tok.Identifier, Runes: []rune("ident_123"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 10, 9),
-		}}},
-		{"_ident_", tok.Token{Kind: tok.Identifier, Runes: []rune("_ident_"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 8, 7),
-		}}},
-		{"123456789", tok.Token{Kind: tok.Integer, Runes: []rune("123456789"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 10, 9),
-		}}},
-		{"match", tok.Token{Kind: tok.Match, Runes: []rune("match"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 6, 5),
-		}}},
-		{"fn", tok.Token{Kind: tok.Function, Runes: []rune("fn"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 3, 2),
-		}}},
-		{"type", tok.Token{Kind: tok.Type, Runes: []rune("type"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 5, 4),
-		}}},
-		{"enum", tok.Token{Kind: tok.Enum, Runes: []rune("enum"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 5, 4),
-		}}},
-		{":", tok.Token{Kind: tok.Colon, Runes: []rune(":"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 2, 1),
-		}}},
-		{",", tok.Token{Kind: tok.Comma, Runes: []rune(","), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 2, 1),
-		}}},
-		{"<", tok.Token{Kind: tok.Lt, Runes: []rune("<"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 2, 1),
-		}}},
-		{">", tok.Token{Kind: tok.Gt, Runes: []rune(">"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 2, 1),
-		}}},
-		{"{", tok.Token{Kind: tok.Lbrace, Runes: []rune("{"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 2, 1),
-		}}},
-		{"}", tok.Token{Kind: tok.Rbrace, Runes: []rune("}"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 2, 1),
-		}}},
-		{"[[", tok.Token{Kind: tok.Ldeco, Runes: []rune("[["), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 3, 2),
-		}}},
-		{"]]", tok.Token{Kind: tok.Rdeco, Runes: []rune("]]"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 3, 2),
-		}}},
-		{"(", tok.Token{Kind: tok.Lparen, Runes: []rune("("), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 2, 1),
-		}}},
-		{")", tok.Token{Kind: tok.Rparen, Runes: []rune(")"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 2, 1),
-		}}},
-		{"|", tok.Token{Kind: tok.Or, Runes: []rune("|"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 2, 1),
-		}}},
-		{"->", tok.Token{Kind: tok.Arrow, Runes: []rune("->"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 3, 2),
-		}}},
-		{"x // y ", tok.Token{Kind: tok.Identifier, Runes: []rune("x"), Source: tok.Source{
-			S: loc(1, 1, 0), E: loc(1, 2, 1),
-		}}},
-		{`"abc"`, tok.Token{Kind: tok.String, Runes: []rune("abc"), Source: tok.Source{
-			S: loc(1, 2, 1), E: loc(1, 5, 4),
-		}}},
-		{`
-   //
-   ident
-
-   `, tok.Token{Kind: tok.Identifier, Runes: []rune("ident"), Source: tok.Source{
-			S: loc(3, 4, 10), E: loc(3, 9, 15),
-		}}},
-	} {
-		got, err := lexer.Lex([]rune(test.src), filepath)
-		name := fmt.Sprintf(`Lex("%v")`, test.src)
-		switch {
-		case err != nil:
-			t.Errorf("%v returned error: %v", name, err)
-		case len(got) != 1:
-			t.Errorf("%v returned %d tokens: %v", name, len(got), got)
-		case got[0].Kind != test.expect.Kind:
-			t.Errorf(`%v returned unexpected token kind: got "%+v", expected "%+v"`, name, got[0], test.expect)
-		case string(got[0].Runes) != string(test.expect.Runes):
-			t.Errorf(`%v returned unexpected token runes: got "%+v", expected "%+v"`, name, string(got[0].Runes), string(test.expect.Runes))
-		case got[0].Source != test.expect.Source:
-			t.Errorf(`%v returned unexpected token source: got %+v, expected %+v`, name, got[0].Source, test.expect.Source)
-		}
-	}
-}
-
-func TestErrors(t *testing.T) {
-	type test struct {
-		src    string
-		expect string
-	}
-
-	for _, test := range []test{
-		{" \"abc", "test.txt:1:2 unterminated string"},
-		{" \"abc\n", "test.txt:1:2 unterminated string"},
-		{"*", "test.txt:1:1: unexpected '*'"},
-	} {
-		got, err := lexer.Lex([]rune(test.src), "test.txt")
-		if gotErr := err.Error(); test.expect != gotErr {
-			t.Errorf(`Lex() returned error "%+v", expected error "%+v"`, gotErr, test.expect)
-		}
-		if got != nil {
-			t.Errorf("Lex() returned non-nil for error")
-		}
-	}
-}
diff --git a/tools/src/cmd/intrinsic-gen/main.go b/tools/src/cmd/intrinsic-gen/main.go
deleted file mode 100644
index 0a55fdd..0000000
--- a/tools/src/cmd/intrinsic-gen/main.go
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// intrinsic-gen parses the <tint>/src/intrinsics.def file, then scans the
-// project directory for '<file>.tmpl' files, to produce '<file>' source code
-// files.
-package main
-
-import (
-	"flag"
-	"fmt"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"strings"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/gen"
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/parser"
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/resolver"
-	"dawn.googlesource.com/tint/tools/src/fileutils"
-	"dawn.googlesource.com/tint/tools/src/glob"
-)
-
-const defProjectRelPath = "src/intrinsics.def"
-
-func main() {
-	if err := run(); err != nil {
-		fmt.Println(err)
-		os.Exit(1)
-	}
-}
-
-func showUsage() {
-	fmt.Println(`
-intrinsic-gen generates the intrinsic table for the Tint compiler
-
-intrinsic-gen parses the <tint>/src/intrinsics.def file, then scans the project
-directory for '<file>.tmpl' files, to produce '<file>' source code files.
-
-usage:
-  intrinsic-gen
-
-optional flags:`)
-	flag.PrintDefaults()
-	fmt.Println(``)
-	os.Exit(1)
-}
-
-func run() error {
-	// Load the intrinsics definition file
-	projectRoot := fileutils.ProjectRoot()
-	defPath := filepath.Join(projectRoot, defProjectRelPath)
-
-	defSource, err := ioutil.ReadFile(defPath)
-	if err != nil {
-		return err
-	}
-
-	// Parse the definition file to produce an AST
-	ast, err := parser.Parse(string(defSource), defProjectRelPath)
-	if err != nil {
-		return err
-	}
-
-	// Resolve the AST to produce the semantic info
-	sem, err := resolver.Resolve(ast)
-	if err != nil {
-		return err
-	}
-
-	// Recursively find all the template files in the <tint>/src directory
-	files, err := glob.Scan(projectRoot, glob.MustParseConfig(`{
-		"paths": [{"include": [
-			"src/**.tmpl",
-			"test/**.tmpl"
-		]}]
-	}`))
-	if err != nil {
-		return err
-	}
-
-	// For each template file...
-	for _, relTmplPath := range files {
-		// Make tmplPath absolute
-		tmplPath := filepath.Join(projectRoot, relTmplPath)
-
-		// Read the template file
-		tmpl, err := ioutil.ReadFile(tmplPath)
-		if err != nil {
-			return fmt.Errorf("failed to open '%v': %w", tmplPath, err)
-		}
-
-		// Create or update the file at relpath if the file content has changed
-		// relpath is a path relative to the template
-		writeFile := func(relpath, body string) error {
-			// Write the common file header
-			sb := strings.Builder{}
-			sb.WriteString(fmt.Sprintf(header, filepath.ToSlash(relTmplPath), filepath.ToSlash(defProjectRelPath)))
-			sb.WriteString(body)
-			content := sb.String()
-			abspath := filepath.Join(filepath.Dir(tmplPath), relpath)
-			return writeFileIfChanged(abspath, content)
-		}
-
-		// Write the content generated using the template and semantic info
-		sb := strings.Builder{}
-		if err := gen.Generate(sem, string(tmpl), &sb, writeFile); err != nil {
-			return fmt.Errorf("while processing '%v': %w", tmplPath, err)
-		}
-
-		if body := sb.String(); body != "" {
-			_, tmplFileName := filepath.Split(tmplPath)
-			outFileName := strings.TrimSuffix(tmplFileName, ".tmpl")
-			if err := writeFile(outFileName, body); err != nil {
-				return err
-			}
-		}
-	}
-
-	return nil
-}
-
-// writes content to path if the file has changed
-func writeFileIfChanged(path, content string) error {
-	existing, err := ioutil.ReadFile(path)
-	if err == nil && string(existing) == content {
-		return nil // Not changed
-	}
-	if err := os.MkdirAll(filepath.Dir(path), 0777); err != nil {
-		return fmt.Errorf("failed to create directory for '%v': %w", path, err)
-	}
-	if err := ioutil.WriteFile(path, []byte(content), 0666); err != nil {
-		return fmt.Errorf("failed to write file '%v': %w", path, err)
-	}
-	return nil
-}
-
-const header = `// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/intrinsic-gen
-// using the template:
-//   %v
-// and the intrinsic defintion file:
-//   %v
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-`
diff --git a/tools/src/cmd/intrinsic-gen/parser/parser.go b/tools/src/cmd/intrinsic-gen/parser/parser.go
deleted file mode 100644
index 4ab3516..0000000
--- a/tools/src/cmd/intrinsic-gen/parser/parser.go
+++ /dev/null
@@ -1,312 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Package parser provides a basic parser for the Tint intrinsic definition
-// language
-package parser
-
-import (
-	"fmt"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/ast"
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/lexer"
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/tok"
-)
-
-// Parse produces a list of tokens for the given source code
-func Parse(source, filepath string) (*ast.AST, error) {
-	runes := []rune(source)
-	tokens, err := lexer.Lex(runes, filepath)
-	if err != nil {
-		return nil, err
-	}
-
-	p := parser{tokens: tokens}
-	return p.parse()
-}
-
-type parser struct {
-	tokens []tok.Token
-	err    error
-}
-
-func (p *parser) parse() (*ast.AST, error) {
-	out := ast.AST{}
-	var decorations ast.Decorations
-	for p.err == nil {
-		t := p.peek(0)
-		if t == nil {
-			break
-		}
-		switch t.Kind {
-		case tok.Ldeco:
-			decorations = append(decorations, p.decorations()...)
-		case tok.Enum:
-			if len(decorations) > 0 {
-				p.err = fmt.Errorf("%v unexpected decoration", decorations[0].Source)
-			}
-			out.Enums = append(out.Enums, p.enumDecl())
-		case tok.Match:
-			if len(decorations) > 0 {
-				p.err = fmt.Errorf("%v unexpected decoration", decorations[0].Source)
-			}
-			out.Matchers = append(out.Matchers, p.matcherDecl())
-		case tok.Type:
-			out.Types = append(out.Types, p.typeDecl(decorations))
-			decorations = nil
-		case tok.Function:
-			out.Functions = append(out.Functions, p.functionDecl(decorations))
-			decorations = nil
-		default:
-			p.err = fmt.Errorf("%v unexpected token '%v'", t.Source, t.Kind)
-		}
-		if p.err != nil {
-			return nil, p.err
-		}
-	}
-	return &out, nil
-}
-
-func (p *parser) enumDecl() ast.EnumDecl {
-	p.expect(tok.Enum, "enum declaration")
-	name := p.expect(tok.Identifier, "enum name")
-	e := ast.EnumDecl{Source: name.Source, Name: string(name.Runes)}
-	p.expect(tok.Lbrace, "enum declaration")
-	for p.err == nil && p.match(tok.Rbrace) == nil {
-		e.Entries = append(e.Entries, p.enumEntry())
-	}
-	return e
-}
-
-func (p *parser) enumEntry() ast.EnumEntry {
-	decos := p.decorations()
-	name := p.expect(tok.Identifier, "enum entry")
-	return ast.EnumEntry{Source: name.Source, Decorations: decos, Name: string(name.Runes)}
-}
-
-func (p *parser) matcherDecl() ast.MatcherDecl {
-	p.expect(tok.Match, "matcher declaration")
-	name := p.expect(tok.Identifier, "matcher name")
-	m := ast.MatcherDecl{Source: name.Source, Name: string(name.Runes)}
-	p.expect(tok.Colon, "matcher declaration")
-	for p.err == nil {
-		m.Options = append(m.Options, p.templatedName())
-		if p.match(tok.Or) == nil {
-			break
-		}
-	}
-	return m
-}
-
-func (p *parser) typeDecl(decos ast.Decorations) ast.TypeDecl {
-	p.expect(tok.Type, "type declaration")
-	name := p.expect(tok.Identifier, "type name")
-	m := ast.TypeDecl{
-		Source:      name.Source,
-		Decorations: decos,
-		Name:        string(name.Runes),
-	}
-	if p.peekIs(0, tok.Lt) {
-		m.TemplateParams = p.templateParams()
-	}
-	return m
-}
-
-func (p *parser) decorations() ast.Decorations {
-	if p.match(tok.Ldeco) == nil {
-		return nil
-	}
-	out := ast.Decorations{}
-	for p.err == nil {
-		name := p.expect(tok.Identifier, "decoration name")
-		values := []string{}
-		if p.match(tok.Lparen) != nil {
-			for p.err == nil {
-				values = append(values, p.string())
-				if p.match(tok.Comma) == nil {
-					break
-				}
-			}
-			p.expect(tok.Rparen, "decoration values")
-		}
-		out = append(out, ast.Decoration{
-			Source: name.Source,
-			Name:   string(name.Runes),
-			Values: values,
-		})
-		if !p.peekIs(0, tok.Comma) {
-			break
-		}
-	}
-	p.expect(tok.Rdeco, "decoration list")
-	return out
-}
-
-func (p *parser) functionDecl(decos ast.Decorations) ast.FunctionDecl {
-	p.expect(tok.Function, "function declaration")
-	name := p.expect(tok.Identifier, "function name")
-	f := ast.FunctionDecl{
-		Source:      name.Source,
-		Decorations: decos,
-		Name:        string(name.Runes),
-	}
-	if p.peekIs(0, tok.Lt) {
-		f.TemplateParams = p.templateParams()
-	}
-	f.Parameters = p.parameters()
-	if p.match(tok.Arrow) != nil {
-		ret := p.templatedName()
-		f.ReturnType = &ret
-	}
-	return f
-}
-
-func (p *parser) parameters() ast.Parameters {
-	l := ast.Parameters{}
-	p.expect(tok.Lparen, "function parameter list")
-	if p.match(tok.Rparen) == nil {
-		for p.err == nil {
-			l = append(l, p.parameter())
-			if p.match(tok.Comma) == nil {
-				break
-			}
-		}
-		p.expect(tok.Rparen, "function parameter list")
-	}
-	return l
-}
-
-func (p *parser) parameter() ast.Parameter {
-	if p.peekIs(1, tok.Colon) {
-		// name type
-		name := p.expect(tok.Identifier, "parameter name")
-		p.expect(tok.Colon, "parameter type")
-		return ast.Parameter{
-			Source: name.Source,
-			Name:   string(name.Runes),
-			Type:   p.templatedName(),
-		}
-	}
-	// type
-	ty := p.templatedName()
-	return ast.Parameter{
-		Source: ty.Source,
-		Type:   ty,
-	}
-}
-
-func (p *parser) string() string {
-	s := p.expect(tok.String, "string")
-	return string(s.Runes)
-}
-
-func (p *parser) templatedName() ast.TemplatedName {
-	name := p.expect(tok.Identifier, "type name")
-	m := ast.TemplatedName{Source: name.Source, Name: string(name.Runes)}
-	if p.match(tok.Lt) != nil {
-		for p.err == nil {
-			m.TemplateArgs = append(m.TemplateArgs, p.templatedName())
-			if p.match(tok.Comma) == nil {
-				break
-			}
-		}
-		p.expect(tok.Gt, "template argument type list")
-	}
-	return m
-}
-
-func (p *parser) templateParams() ast.TemplateParams {
-	t := ast.TemplateParams{}
-	p.expect(tok.Lt, "template parameter list")
-	for p.err == nil && p.peekIs(0, tok.Identifier) {
-		t = append(t, p.templateParam())
-	}
-	p.expect(tok.Gt, "template parameter list")
-	return t
-}
-
-func (p *parser) templateParam() ast.TemplateParam {
-	name := p.match(tok.Identifier)
-	t := ast.TemplateParam{
-		Source: name.Source,
-		Name:   string(name.Runes),
-	}
-	if p.match(tok.Colon) != nil {
-		t.Type = p.templatedName()
-	}
-	p.match(tok.Comma)
-	return t
-}
-
-func (p *parser) expect(kind tok.Kind, use string) tok.Token {
-	if p.err != nil {
-		return tok.Invalid
-	}
-	t := p.match(kind)
-	if t == nil {
-		if len(p.tokens) > 0 {
-			p.err = fmt.Errorf("%v expected '%v' for %v, got '%v'",
-				p.tokens[0].Source, kind, use, p.tokens[0].Kind)
-		} else {
-			p.err = fmt.Errorf("expected '%v' for %v, but reached end of file", kind, use)
-		}
-		return tok.Invalid
-	}
-	return *t
-}
-
-func (p *parser) ident(use string) string {
-	return string(p.expect(tok.Identifier, use).Runes)
-}
-
-// TODO(bclayton): Currently unused, but will be needed for integer bounds
-// func (p *parser) integer(use string) int {
-// 	t := p.expect(tok.Integer, use)
-// 	if t.Kind != tok.Integer {
-// 		return 0
-// 	}
-// 	i, err := strconv.Atoi(string(t.Runes))
-// 	if err != nil {
-// 		p.err = err
-// 		return 0
-// 	}
-// 	return i
-// }
-
-func (p *parser) match(kind tok.Kind) *tok.Token {
-	if p.err != nil || len(p.tokens) == 0 {
-		return nil
-	}
-	t := p.tokens[0]
-	if t.Kind != kind {
-		return nil
-	}
-	p.tokens = p.tokens[1:]
-	return &t
-}
-
-func (p *parser) peekIs(i int, kind tok.Kind) bool {
-	t := p.peek(i)
-	if t == nil {
-		return false
-	}
-	return t.Kind == kind
-}
-
-func (p *parser) peek(i int) *tok.Token {
-	if len(p.tokens) <= i {
-		return nil
-	}
-	return &p.tokens[i]
-}
diff --git a/tools/src/cmd/intrinsic-gen/parser/parser_test.go b/tools/src/cmd/intrinsic-gen/parser/parser_test.go
deleted file mode 100644
index fdc884b..0000000
--- a/tools/src/cmd/intrinsic-gen/parser/parser_test.go
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package parser_test
-
-import (
-	"testing"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/ast"
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/parser"
-)
-
-func TestParser(t *testing.T) {
-	type test struct {
-		src    string
-		expect ast.AST
-	}
-
-	for _, test := range []test{
-		{"enum E {}", ast.AST{
-			Enums: []ast.EnumDecl{{Name: "E"}},
-		}},
-		{"enum E { A [[deco]] B C }", ast.AST{
-			Enums: []ast.EnumDecl{{
-				Name: "E",
-				Entries: []ast.EnumEntry{
-					{Name: "A"},
-					{
-						Decorations: ast.Decorations{{Name: "deco"}},
-						Name:        "B",
-					},
-					{Name: "C"},
-				},
-			}},
-		}},
-		{"type T", ast.AST{
-			Types: []ast.TypeDecl{{Name: "T"}},
-		}},
-		{"type T<A, B, C>", ast.AST{
-			Types: []ast.TypeDecl{{
-				Name: "T",
-				TemplateParams: ast.TemplateParams{
-					{Name: "A"},
-					{Name: "B"},
-					{Name: "C"},
-				},
-			}},
-		}},
-		{"[[deco]] type T", ast.AST{
-			Types: []ast.TypeDecl{{
-				Decorations: ast.Decorations{
-					{Name: "deco"},
-				},
-				Name: "T",
-			}},
-		}},
-		{`[[deco("a", "b")]] type T`, ast.AST{
-			Types: []ast.TypeDecl{{
-				Decorations: ast.Decorations{
-					{Name: "deco", Values: []string{"a", "b"}},
-				},
-				Name: "T",
-			}},
-		}},
-		{"match M : A", ast.AST{
-			Matchers: []ast.MatcherDecl{{
-				Name: "M",
-				Options: ast.MatcherOptions{
-					ast.TemplatedName{Name: "A"},
-				},
-			}},
-		}},
-		{"match M : A | B", ast.AST{
-			Matchers: []ast.MatcherDecl{{
-				Name: "M",
-				Options: ast.MatcherOptions{
-					ast.TemplatedName{Name: "A"},
-					ast.TemplatedName{Name: "B"},
-				},
-			}},
-		}},
-		{"fn F()", ast.AST{
-			Functions: []ast.FunctionDecl{{
-				Name: "F",
-			}},
-		}},
-		{"[[deco]] fn F()", ast.AST{
-			Functions: []ast.FunctionDecl{{
-				Name: "F",
-				Decorations: ast.Decorations{
-					{Name: "deco"},
-				},
-			}},
-		}},
-		{"fn F(a)", ast.AST{
-			Functions: []ast.FunctionDecl{{
-				Name: "F",
-				Parameters: ast.Parameters{
-					{Type: ast.TemplatedName{Name: "a"}},
-				},
-			}},
-		}},
-		{"fn F(a: T)", ast.AST{
-			Functions: []ast.FunctionDecl{{
-				Name: "F",
-				Parameters: ast.Parameters{
-					{Name: "a", Type: ast.TemplatedName{Name: "T"}},
-				},
-			}},
-		}},
-		{"fn F(a, b)", ast.AST{
-			Functions: []ast.FunctionDecl{{
-				Name: "F",
-				Parameters: ast.Parameters{
-					{Type: ast.TemplatedName{Name: "a"}},
-					{Type: ast.TemplatedName{Name: "b"}},
-				},
-			}},
-		}},
-		{"fn F<A : B<C>>()", ast.AST{
-			Functions: []ast.FunctionDecl{{
-				Name: "F",
-				TemplateParams: ast.TemplateParams{
-					{
-						Name: "A", Type: ast.TemplatedName{
-							Name: "B",
-							TemplateArgs: ast.TemplatedNames{
-								{Name: "C"},
-							},
-						},
-					},
-				},
-			}},
-		}},
-		{"fn F<T>(a: X, b: Y<T>)", ast.AST{
-			Functions: []ast.FunctionDecl{{
-				Name: "F",
-				TemplateParams: ast.TemplateParams{
-					{Name: "T"},
-				},
-				Parameters: ast.Parameters{
-					{Name: "a", Type: ast.TemplatedName{Name: "X"}},
-					{Name: "b", Type: ast.TemplatedName{
-						Name:         "Y",
-						TemplateArgs: []ast.TemplatedName{{Name: "T"}},
-					}},
-				},
-			}},
-		}},
-		{"fn F() -> X", ast.AST{
-			Functions: []ast.FunctionDecl{{
-				Name:       "F",
-				ReturnType: &ast.TemplatedName{Name: "X"},
-			}},
-		}},
-		{"fn F() -> X<T>", ast.AST{
-			Functions: []ast.FunctionDecl{{
-				Name: "F",
-				ReturnType: &ast.TemplatedName{
-					Name:         "X",
-					TemplateArgs: []ast.TemplatedName{{Name: "T"}},
-				},
-			}},
-		}},
-	} {
-		got, err := parser.Parse(test.src, "file.txt")
-		if err != nil {
-			t.Errorf("While parsing:\n%s\nParse() returned error: %v", test.src, err)
-			continue
-		}
-
-		gotStr, expectStr := got.String(), test.expect.String()
-		if gotStr != expectStr {
-			t.Errorf("While parsing:\n%s\nGot:\n%s\nExpected:\n%s", test.src, gotStr, expectStr)
-		}
-	}
-}
-
-func TestErrors(t *testing.T) {
-	type test struct {
-		src    string
-		expect string
-	}
-
-	for _, test := range []test{
-		{"+", "test.txt:1:1: unexpected '+'"},
-		{"123", "test.txt:1:1 unexpected token 'integer'"},
-		{"[[123]]", "test.txt:1:3 expected 'ident' for decoration name, got 'integer'"},
-		{"[[abc", "expected ']]' for decoration list, but reached end of file"},
-	} {
-		got, err := parser.Parse(test.src, "test.txt")
-		if gotErr := err.Error(); test.expect != gotErr {
-			t.Errorf(`Parse() returned error "%+v", expected error "%+v"`, gotErr, test.expect)
-		}
-		if got != nil {
-			t.Errorf("Lex() returned non-nil for error")
-		}
-	}
-}
diff --git a/tools/src/cmd/intrinsic-gen/resolver/resolve.go b/tools/src/cmd/intrinsic-gen/resolver/resolve.go
deleted file mode 100644
index 951df74..0000000
--- a/tools/src/cmd/intrinsic-gen/resolver/resolve.go
+++ /dev/null
@@ -1,653 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package resolver
-
-import (
-	"fmt"
-	"sort"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/ast"
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/sem"
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/tok"
-)
-
-type resolver struct {
-	a *ast.AST
-	s *sem.Sem
-
-	globals           scope
-	functions         map[string]*sem.Function
-	enumEntryMatchers map[*sem.EnumEntry]*sem.EnumMatcher
-}
-
-// Resolve processes the AST
-func Resolve(a *ast.AST) (*sem.Sem, error) {
-	r := resolver{
-		a:                 a,
-		s:                 sem.New(),
-		globals:           newScope(nil),
-		functions:         map[string]*sem.Function{},
-		enumEntryMatchers: map[*sem.EnumEntry]*sem.EnumMatcher{},
-	}
-	// Declare and resolve all the enumerators
-	for _, e := range a.Enums {
-		if err := r.enum(e); err != nil {
-			return nil, err
-		}
-	}
-	// Declare and resolve all the ty types
-	for _, p := range a.Types {
-		if err := r.ty(p); err != nil {
-			return nil, err
-		}
-	}
-	// Declare and resolve the type matchers
-	for _, m := range a.Matchers {
-		if err := r.matcher(m); err != nil {
-			return nil, err
-		}
-	}
-	// Declare and resolve the functions
-	for _, f := range a.Functions {
-		if err := r.function(f); err != nil {
-			return nil, err
-		}
-	}
-
-	// Calculate the unique parameter names
-	r.s.UniqueParameterNames = r.calculateUniqueParameterNames()
-
-	return r.s, nil
-}
-
-// enum() resolves an enum declaration.
-// The resulting sem.Enum is appended to Sem.Enums, and the enum and all its
-// entries are registered with the global scope.
-func (r *resolver) enum(e ast.EnumDecl) error {
-	s := &sem.Enum{
-		Decl: e,
-		Name: e.Name,
-	}
-
-	// Register the enum
-	r.s.Enums = append(r.s.Enums, s)
-	if err := r.globals.declare(s, e.Source); err != nil {
-		return err
-	}
-
-	// Register each of the enum entries
-	for _, ast := range e.Entries {
-		entry := &sem.EnumEntry{
-			Name: ast.Name,
-			Enum: s,
-		}
-		if internal := ast.Decorations.Take("internal"); internal != nil {
-			entry.IsInternal = true
-			if len(internal.Values) != 0 {
-				return fmt.Errorf("%v unexpected value for internal decoration", ast.Source)
-			}
-		}
-		if len(ast.Decorations) != 0 {
-			return fmt.Errorf("%v unknown decoration", ast.Decorations[0].Source)
-		}
-		if err := r.globals.declare(entry, e.Source); err != nil {
-			return err
-		}
-		s.Entries = append(s.Entries, entry)
-	}
-
-	return nil
-}
-
-// ty() resolves a type declaration.
-// The resulting sem.Type is appended to Sem.Types, and the type is registered
-// with the global scope.
-func (r *resolver) ty(a ast.TypeDecl) error {
-	t := &sem.Type{
-		Decl: a,
-		Name: a.Name,
-	}
-
-	// Register the type
-	r.s.Types = append(r.s.Types, t)
-	if err := r.globals.declare(t, a.Source); err != nil {
-		return err
-	}
-
-	// Create a new scope for resolving template parameters
-	s := newScope(&r.globals)
-
-	// Resolve the type template parameters
-	templateParams, err := r.templateParams(&s, a.TemplateParams)
-	if err != nil {
-		return err
-	}
-	t.TemplateParams = templateParams
-
-	// Scan for decorations
-	if d := a.Decorations.Take("display"); d != nil {
-		if len(d.Values) != 1 {
-			return fmt.Errorf("%v expected a single value for 'display' decoration", d.Source)
-		}
-		t.DisplayName = d.Values[0]
-	}
-	if len(a.Decorations) != 0 {
-		return fmt.Errorf("%v unknown decoration", a.Decorations[0].Source)
-	}
-
-	return nil
-}
-
-// matcher() resolves a match declaration to either a sem.TypeMatcher or
-// sem.EnumMatcher.
-// The resulting matcher is appended to either Sem.TypeMatchers or
-// Sem.EnumMatchers, and is registered with the global scope.
-func (r *resolver) matcher(a ast.MatcherDecl) error {
-	// Determine whether this is a type matcher or enum matcher by resolving the
-	// first option
-	firstOption, err := r.lookupNamed(&r.globals, a.Options[0])
-	if err != nil {
-		return err
-	}
-
-	// Resolve to a sem.TypeMatcher or a sem.EnumMatcher
-	switch firstOption := firstOption.(type) {
-	case *sem.Type:
-		options := map[sem.Named]tok.Source{}
-		m := &sem.TypeMatcher{
-			Decl: a,
-			Name: a.Name,
-		}
-
-		// Register the matcher
-		r.s.TypeMatchers = append(r.s.TypeMatchers, m)
-		if err := r.globals.declare(m, a.Source); err != nil {
-			return err
-		}
-
-		// Resolve each of the types in the options list
-		for _, ast := range m.Decl.Options {
-			ty, err := r.lookupType(&r.globals, ast)
-			if err != nil {
-				return err
-			}
-			m.Types = append(m.Types, ty)
-			if s, dup := options[ty]; dup {
-				return fmt.Errorf("%v duplicate option '%v' in matcher\nFirst declared here: %v", ast.Source, ast.Name, s)
-			}
-			options[ty] = ast.Source
-		}
-
-		return nil
-
-	case *sem.EnumEntry:
-		enum := firstOption.Enum
-		m := &sem.EnumMatcher{
-			Decl: a,
-			Name: a.Name,
-			Enum: enum,
-		}
-
-		// Register the matcher
-		r.s.EnumMatchers = append(r.s.EnumMatchers, m)
-		if err := r.globals.declare(m, a.Source); err != nil {
-			return err
-		}
-
-		// Resolve each of the enums in the options list
-		for _, ast := range m.Decl.Options {
-			entry := enum.FindEntry(ast.Name)
-			if entry == nil {
-				return fmt.Errorf("%v enum '%v' does not contain '%v'", ast.Source, enum.Name, ast.Name)
-			}
-			m.Options = append(m.Options, entry)
-		}
-
-		return nil
-	}
-	return fmt.Errorf("'%v' cannot be used for matcher", a.Name)
-}
-
-// function() resolves a function overload declaration.
-// The the first overload for the function creates and appends the sem.Function
-// to Sem.Functions. Subsequent overloads append their resolved overload to the
-// sem.Function.Overloads list.
-func (r *resolver) function(a ast.FunctionDecl) error {
-	// If this is the first overload of the function, create and register the
-	// semantic function.
-	f := r.functions[a.Name]
-	if f == nil {
-		f = &sem.Function{Name: a.Name}
-		r.functions[a.Name] = f
-		r.s.Functions = append(r.s.Functions, f)
-	}
-
-	// Create a new scope for resolving template parameters
-	s := newScope(&r.globals)
-
-	// Resolve the declared template parameters
-	templateParams, err := r.templateParams(&s, a.TemplateParams)
-	if err != nil {
-		return err
-	}
-
-	// Construct the semantic overload
-	overload := &sem.Overload{
-		Decl:           a,
-		Function:       f,
-		Parameters:     make([]sem.Parameter, len(a.Parameters)),
-		TemplateParams: templateParams,
-	}
-
-	// Process overload decorations
-	if stageDeco := a.Decorations.Take("stage"); stageDeco != nil {
-		for stageDeco != nil {
-			for _, stage := range stageDeco.Values {
-				switch stage {
-				case "vertex":
-					overload.CanBeUsedInStage.Vertex = true
-				case "fragment":
-					overload.CanBeUsedInStage.Fragment = true
-				case "compute":
-					overload.CanBeUsedInStage.Compute = true
-				default:
-					return fmt.Errorf("%v unknown stage '%v'", stageDeco.Source, stage)
-				}
-			}
-			stageDeco = a.Decorations.Take("stage")
-		}
-	} else {
-		overload.CanBeUsedInStage = sem.StageUses{
-			Vertex:   true,
-			Fragment: true,
-			Compute:  true,
-		}
-	}
-	if deprecated := a.Decorations.Take("deprecated"); deprecated != nil {
-		overload.IsDeprecated = true
-		if len(deprecated.Values) != 0 {
-			return fmt.Errorf("%v unexpected value for deprecated decoration", deprecated.Source)
-		}
-	}
-	if len(a.Decorations) != 0 {
-		return fmt.Errorf("%v unknown decoration", a.Decorations[0].Source)
-	}
-
-	// Append the overload to the function
-	f.Overloads = append(f.Overloads, overload)
-
-	// Sort the template parameters by resolved type. Append these to
-	// sem.Overload.OpenTypes or sem.Overload.OpenNumbers based on their kind.
-	for _, param := range templateParams {
-		switch param := param.(type) {
-		case *sem.TemplateTypeParam:
-			overload.OpenTypes = append(overload.OpenTypes, param)
-		case *sem.TemplateEnumParam, *sem.TemplateNumberParam:
-			overload.OpenNumbers = append(overload.OpenNumbers, param)
-		}
-	}
-
-	// Update high-water marks of open types / numbers
-	if r.s.MaxOpenTypes < len(overload.OpenTypes) {
-		r.s.MaxOpenTypes = len(overload.OpenTypes)
-	}
-	if r.s.MaxOpenNumbers < len(overload.OpenNumbers) {
-		r.s.MaxOpenNumbers = len(overload.OpenNumbers)
-	}
-
-	// Resolve the parameters
-	for i, p := range a.Parameters {
-		usage, err := r.fullyQualifiedName(&s, p.Type)
-		if err != nil {
-			return err
-		}
-		overload.Parameters[i] = sem.Parameter{
-			Name: p.Name,
-			Type: usage,
-		}
-	}
-
-	// Resolve the return type
-	if a.ReturnType != nil {
-		usage, err := r.fullyQualifiedName(&s, *a.ReturnType)
-		if err != nil {
-			return err
-		}
-		switch usage.Target.(type) {
-		case *sem.Type, *sem.TemplateTypeParam:
-			overload.ReturnType = &usage
-		default:
-			return fmt.Errorf("%v cannot use '%v' as return type. Must be a type or template type", a.ReturnType.Source, a.ReturnType.Name)
-		}
-	}
-
-	return nil
-}
-
-// fullyQualifiedName() resolves the ast.TemplatedName to a sem.FullyQualifiedName.
-func (r *resolver) fullyQualifiedName(s *scope, arg ast.TemplatedName) (sem.FullyQualifiedName, error) {
-	target, err := r.lookupNamed(s, arg)
-	if err != nil {
-		return sem.FullyQualifiedName{}, err
-	}
-
-	if entry, ok := target.(*sem.EnumEntry); ok {
-		// The target resolved to an enum entry.
-		// Automagically transform this into a synthetic matcher with a single
-		// option. i.e.
-		// This:
-		//   enum E{ a b c }
-		//   fn F(b)
-		// Becomes:
-		//   enum E{ a b c }
-		//   matcher b
-		//   fn F(b)
-		// We don't really care right now that we have a symbol collision
-		// between E.b and b, as the generators return different names for
-		// these.
-		matcher, ok := r.enumEntryMatchers[entry]
-		if !ok {
-			matcher = &sem.EnumMatcher{
-				Name:    entry.Name,
-				Enum:    entry.Enum,
-				Options: []*sem.EnumEntry{entry},
-			}
-			r.enumEntryMatchers[entry] = matcher
-			r.s.EnumMatchers = append(r.s.EnumMatchers, matcher)
-		}
-		target = matcher
-	}
-
-	fqn := sem.FullyQualifiedName{
-		Target:            target,
-		TemplateArguments: make([]interface{}, len(arg.TemplateArgs)),
-	}
-	for i, a := range arg.TemplateArgs {
-		arg, err := r.fullyQualifiedName(s, a)
-		if err != nil {
-			return sem.FullyQualifiedName{}, err
-		}
-		fqn.TemplateArguments[i] = arg
-	}
-	return fqn, nil
-}
-
-// templateParams() resolves the ast.TemplateParams into list of sem.TemplateParam.
-// Each sem.TemplateParam is registered with the scope s.
-func (r *resolver) templateParams(s *scope, l ast.TemplateParams) ([]sem.TemplateParam, error) {
-	out := []sem.TemplateParam{}
-	for _, ast := range l {
-		param, err := r.templateParam(ast)
-		if err != nil {
-			return nil, err
-		}
-		s.declare(param, ast.Source)
-		out = append(out, param)
-	}
-	return out, nil
-}
-
-// templateParams() resolves the ast.TemplateParam into sem.TemplateParam, which
-// is either a sem.TemplateEnumParam or a sem.TemplateTypeParam.
-func (r *resolver) templateParam(a ast.TemplateParam) (sem.TemplateParam, error) {
-	if a.Type.Name == "num" {
-		return &sem.TemplateNumberParam{Name: a.Name}, nil
-	}
-
-	if a.Type.Name != "" {
-		resolved, err := r.lookupNamed(&r.globals, a.Type)
-		if err != nil {
-			return nil, err
-		}
-		switch r := resolved.(type) {
-		case *sem.Enum:
-			return &sem.TemplateEnumParam{Name: a.Name, Enum: r}, nil
-		case *sem.EnumMatcher:
-			return &sem.TemplateEnumParam{Name: a.Name, Enum: r.Enum, Matcher: r}, nil
-		case *sem.TypeMatcher:
-			return &sem.TemplateTypeParam{Name: a.Name, Type: r}, nil
-		default:
-			return nil, fmt.Errorf("%v invalid template parameter type '%v'", a.Source, a.Type.Name)
-		}
-	}
-
-	return &sem.TemplateTypeParam{Name: a.Name}, nil
-}
-
-// lookupType() searches the scope `s` and its ancestors for the sem.Type with
-// the given name.
-func (r *resolver) lookupType(s *scope, a ast.TemplatedName) (*sem.Type, error) {
-	resolved, err := r.lookupNamed(s, a)
-	if err != nil {
-		return nil, err
-	}
-	// Something with the given name was found...
-	if ty, ok := resolved.(*sem.Type); ok {
-		return ty, nil
-	}
-	// ... but that something was not a sem.Type
-	return nil, fmt.Errorf("%v '%v' resolves to %v but type is expected", a.Source, a.Name, describe(resolved))
-}
-
-// lookupNamed() searches `s` and its ancestors for the sem.Named object with
-// the given name. If there are template arguments for the name `a`, then
-// lookupNamed() performs basic validation that those arguments can be passed
-// to the named object.
-func (r *resolver) lookupNamed(s *scope, a ast.TemplatedName) (sem.Named, error) {
-	target := s.lookup(a.Name)
-	if target == nil {
-		return nil, fmt.Errorf("%v cannot resolve '%v'", a.Source, a.Name)
-	}
-
-	// Something with the given name was found...
-	var params []sem.TemplateParam
-	var ty sem.ResolvableType
-	switch target := target.object.(type) {
-	case *sem.Type:
-		ty = target
-		params = target.TemplateParams
-	case *sem.TypeMatcher:
-		ty = target
-		params = target.TemplateParams
-	case sem.TemplateParam:
-		if len(a.TemplateArgs) != 0 {
-			return nil, fmt.Errorf("%v '%v' template parameters do not accept template arguments", a.Source, a.Name)
-		}
-		return target.(sem.Named), nil
-	case sem.Named:
-		return target, nil
-	default:
-		panic(fmt.Errorf("Unknown resolved type %T", target))
-	}
-	// ... and that something takes template parameters
-	// Check the number of templated name template arguments match the number of
-	// templated parameters for the target.
-	args := a.TemplateArgs
-	if len(params) != len(args) {
-		return nil, fmt.Errorf("%v '%v' requires %d template arguments, but %d were provided", a.Source, a.Name, len(params), len(args))
-	}
-
-	// Check templated name template argument kinds match the parameter kinds
-	for i, ast := range args {
-		param := params[i]
-		arg, err := r.lookupNamed(s, args[i])
-		if err != nil {
-			return nil, err
-		}
-
-		if err := checkCompatible(arg, param); err != nil {
-			return nil, fmt.Errorf("%v %w", ast.Source, err)
-		}
-	}
-	return ty, nil
-}
-
-// calculateUniqueParameterNames() iterates over all the parameters of all
-// overloads, calculating the list of unique parameter names
-func (r *resolver) calculateUniqueParameterNames() []string {
-	set := map[string]struct{}{"": {}}
-	names := []string{}
-	for _, f := range r.s.Functions {
-		for _, o := range f.Overloads {
-			for _, p := range o.Parameters {
-				if _, dup := set[p.Name]; !dup {
-					set[p.Name] = struct{}{}
-					names = append(names, p.Name)
-				}
-			}
-		}
-	}
-	sort.Strings(names)
-	return names
-}
-
-// describe() returns a string describing a sem.Named
-func describe(n sem.Named) string {
-	switch n := n.(type) {
-	case *sem.Type:
-		return "type '" + n.Name + "'"
-	case *sem.TypeMatcher:
-		return "type matcher '" + n.Name + "'"
-	case *sem.Enum:
-		return "enum '" + n.Name + "'"
-	case *sem.EnumMatcher:
-		return "enum matcher '" + n.Name + "'"
-	case *sem.TemplateTypeParam:
-		return "template type"
-	case *sem.TemplateEnumParam:
-		return "template enum '" + n.Enum.Name + "'"
-	case *sem.EnumEntry:
-		return "enum entry '" + n.Enum.Name + "." + n.Name + "'"
-	case *sem.TemplateNumberParam:
-		return "template number"
-	default:
-		panic(fmt.Errorf("unhandled type %T", n))
-	}
-}
-
-// checkCompatible() returns an error if `arg` cannot be used as an argument for
-// a parameter of `param`.
-func checkCompatible(arg, param sem.Named) error {
-	// asEnum() returns the underlying sem.Enum if n is a enum matcher,
-	// templated enum parameter or an enum entry, otherwise nil
-	asEnum := func(n sem.Named) *sem.Enum {
-		switch n := n.(type) {
-		case *sem.EnumMatcher:
-			return n.Enum
-		case *sem.TemplateEnumParam:
-			return n.Enum
-		case *sem.EnumEntry:
-			return n.Enum
-		default:
-			return nil
-		}
-	}
-
-	if arg := asEnum(arg); arg != nil {
-		param := asEnum(param)
-		if arg == param {
-			return nil
-		}
-	}
-
-	anyNumber := "any number"
-	// asNumber() returns anyNumber if n is a TemplateNumberParam.
-	// TODO(bclayton): Once we support number ranges [e.g.: fn F<N: 1..4>()], we
-	// should check number ranges are compatible
-	asNumber := func(n sem.Named) interface{} {
-		switch n.(type) {
-		case *sem.TemplateNumberParam:
-			return anyNumber
-		default:
-			return nil
-		}
-	}
-
-	if arg := asNumber(arg); arg != nil {
-		param := asNumber(param)
-		if arg == param {
-			return nil
-		}
-	}
-
-	anyType := &sem.Type{}
-	// asNumber() returns the sem.Type, sem.TypeMatcher if the named object
-	// resolves to one of these, or anyType if n is a unconstrained template
-	// type parameter.
-	asResolvableType := func(n sem.Named) sem.ResolvableType {
-		switch n := n.(type) {
-		case *sem.TemplateTypeParam:
-			if n.Type != nil {
-				return n.Type
-			}
-			return anyType
-		case *sem.Type:
-			return n
-		case *sem.TypeMatcher:
-			return n
-		default:
-			return nil
-		}
-	}
-
-	if arg := asResolvableType(arg); arg != nil {
-		param := asResolvableType(param)
-		if arg == param || param == anyType {
-			return nil
-		}
-	}
-
-	return fmt.Errorf("cannot use %v as %v", describe(arg), describe(param))
-}
-
-// scope is a basic hierarchical name to object table
-type scope struct {
-	objects map[string]objectAndSource
-	parent  *scope
-}
-
-// objectAndSource is a sem.Named object with a source
-type objectAndSource struct {
-	object sem.Named
-	source tok.Source
-}
-
-// newScope returns a newly initalized scope
-func newScope(parent *scope) scope {
-	return scope{objects: map[string]objectAndSource{}, parent: parent}
-}
-
-// lookup() searches the scope and then its parents for the symbol with the
-// given name.
-func (s *scope) lookup(name string) *objectAndSource {
-	if o, found := s.objects[name]; found {
-		return &o
-	}
-	if s.parent == nil {
-		return nil
-	}
-	return s.parent.lookup(name)
-}
-
-// declare() declares the symbol with the given name, erroring on symbol
-// collision.
-func (s *scope) declare(object sem.Named, source tok.Source) error {
-	name := object.GetName()
-	if existing := s.lookup(name); existing != nil {
-		return fmt.Errorf("%v '%v' already declared\nFirst declared here: %v", source, name, existing.source)
-	}
-	s.objects[name] = objectAndSource{object, source}
-	return nil
-}
diff --git a/tools/src/cmd/intrinsic-gen/resolver/resolver_test.go b/tools/src/cmd/intrinsic-gen/resolver/resolver_test.go
deleted file mode 100644
index 944ddb4..0000000
--- a/tools/src/cmd/intrinsic-gen/resolver/resolver_test.go
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package resolver_test
-
-import (
-	"fmt"
-	"strings"
-	"testing"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/parser"
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/resolver"
-)
-
-func TestResolver(t *testing.T) {
-	type test struct {
-		src string
-		err string
-	}
-
-	success := ""
-	for _, test := range []test{
-		{
-			`type X`,
-			success,
-		}, {
-			`enum E {}`,
-			success,
-		}, {
-			`enum E {A B C}`,
-			success,
-		}, {
-			`type X`,
-			success,
-		}, {
-			`[[display("Y")]] type X`,
-			success,
-		}, {
-			`
-type x
-match y: x`,
-			success,
-		}, {
-			`
-enum e {a b c}
-match y: c | a | b`,
-			success,
-		}, {
-			`fn f()`,
-			success,
-		}, {
-			`fn f<T>()`,
-			success,
-		}, {
-			`
-type f32
-fn f<N: num>()`,
-			success,
-		}, {
-			`
-enum e { a b c }
-fn f<N: e>()`,
-			success,
-		}, {
-			`
-type f32
-fn f<T>(T) -> f32`,
-			success,
-		}, {
-			`
-type f32
-type P<T>
-match m: f32
-fn f<T: m>(P<T>) -> T`,
-			success,
-		}, {
-			`
-type f32
-type P<T>
-match m: f32
-fn f(P<m>)`,
-			success,
-		}, {
-			`
-enum e { a }
-fn f(a)`,
-			success,
-		}, {
-			`
-enum e { a b }
-type T<E: e>
-match m: a
-fn f<E: m>(T<E>)`,
-			success,
-		}, {
-			`
-enum e { a b }
-type T<E: e>
-match m: a
-fn f(T<m>)`,
-			success,
-		}, {
-			`
-enum e { a }
-type T<E: e>
-fn f(T<a>)`,
-			success,
-		}, {
-			`
-type T<E: num>
-fn f<E: num>(T<E>)`,
-			success,
-		}, {
-			`fn f<T>(T)`,
-			success,
-		}, {
-			`
-enum e { a b }
-fn f<E: e>()`,
-			success,
-		}, {
-			`
-enum e { a b }
-match m: a | b
-fn f<E: m>()`,
-			success,
-		}, {
-			`
-type f32
-type T<x>
-fn f(T<T<f32>>)`,
-			success,
-		}, {
-			`enum E {A A}`,
-			`
-file.txt:1:6 'A' already declared
-First declared here: file.txt:1:6
-`,
-		},
-		{
-			`type X type X`,
-			`
-file.txt:1:13 'X' already declared
-First declared here: file.txt:1:6`,
-		}, {
-			`[[meow]] type X`,
-			`
-file.txt:1:3 unknown decoration
-`,
-		}, {
-			`[[display("Y", "Z")]] type X`,
-			`
-file.txt:1:3 expected a single value for 'display' decoration`,
-		}, {
-			`
-enum e { a }
-enum e { b }`,
-			`
-file.txt:2:6 'e' already declared
-First declared here: file.txt:1:6`,
-		}, {
-			`
-type X
-match X : X`,
-			`
-file.txt:2:7 'X' already declared
-First declared here: file.txt:1:6`,
-		}, {
-			`type T<X>
-match M : T`,
-			`file.txt:2:11 'T' requires 1 template arguments, but 0 were provided`,
-		}, {
-			`
-match x: y`,
-			`
-file.txt:1:10 cannot resolve 'y'
-`,
-		}, {
-			`
-type a
-match x: a | b`,
-			`
-file.txt:2:14 cannot resolve 'b'
-`,
-		}, {
-			`
-type a
-enum e { b }
-match x: a | b`,
-			`
-file.txt:3:14 'b' resolves to enum entry 'e.b' but type is expected
-`,
-		}, {
-			`
-type a
-type b
-match x: a | b | a`,
-			`
-file.txt:3:18 duplicate option 'a' in matcher
-First declared here: file.txt:3:10
-`,
-		}, {
-			`
-enum e { a c }
-match x: a | b | c`,
-			`
-file.txt:2:14 enum 'e' does not contain 'b'
-`,
-		}, {
-			`
-enum e { a }
-match x: a
-match x: a`,
-			`
-file.txt:3:7 'x' already declared
-First declared here: file.txt:2:7
-`,
-		}, {
-			`
-type t
-match x: t
-match y: x`,
-			`
-'y' cannot be used for matcher
-`,
-		}, {
-			`fn f(u)`,
-			`file.txt:1:6 cannot resolve 'u'`,
-		}, {
-			`fn f() -> u`,
-			`file.txt:1:11 cannot resolve 'u'`,
-		}, {
-			`fn f<T: u>()`,
-			`file.txt:1:9 cannot resolve 'u'`,
-		}, {
-			`
-enum e { a }
-fn f() -> e`,
-			`file.txt:2:11 cannot use 'e' as return type. Must be a type or template type`,
-		}, {
-			`
-type T<x>
-fn f(T<u>)`,
-			`file.txt:2:8 cannot resolve 'u'`,
-		}, {
-			`
-type x
-fn f<T>(T<x>)`,
-			`file.txt:2:9 'T' template parameters do not accept template arguments`,
-		}, {
-			`
-type A<N: num>
-type B
-fn f(A<B>)`,
-			`file.txt:3:8 cannot use type 'B' as template number`,
-		}, {
-			`
-type A<N>
-enum E { b }
-fn f(A<b>)`,
-			`file.txt:3:8 cannot use enum entry 'E.b' as template type`,
-		}, {
-			`
-type T
-type P<N: num>
-match m: T
-fn f(P<m>)`,
-			`file.txt:4:8 cannot use type matcher 'm' as template number`,
-		}, {
-			`
-type P<N: num>
-enum E { b }
-fn f(P<E>)`,
-			`file.txt:3:8 cannot use enum 'E' as template number`,
-		}, {
-			`
-type P<N: num>
-enum E { a b }
-match m: a | b
-fn f(P<m>)`,
-			`file.txt:4:8 cannot use enum matcher 'm' as template number`,
-		}, {
-			`
-type P<N: num>
-enum E { a b }
-match m: a | b
-fn f<M: m>(P<M>)`,
-			`file.txt:4:14 cannot use template enum 'E' as template number`,
-		}, {
-			`
-enum E { a }
-type T<X: a>`,
-			`file.txt:2:8 invalid template parameter type 'a'`,
-		}, {
-			`
-enum E { a }
-fn f<M: a>()`,
-			`file.txt:2:6 invalid template parameter type 'a'`,
-		},
-	} {
-
-		ast, err := parser.Parse(strings.TrimSpace(string(test.src)), "file.txt")
-		if err != nil {
-			t.Errorf("Unexpected parser error: %v", err)
-			continue
-		}
-
-		expectErr := strings.TrimSpace(test.err)
-		_, err = resolver.Resolve(ast)
-		if err != nil {
-			gotErr := strings.TrimSpace(fmt.Sprint(err))
-			if gotErr != expectErr {
-				t.Errorf("While parsing:\n%s\nGot error:\n%s\nExpected:\n%s", test.src, gotErr, expectErr)
-			}
-		} else if expectErr != success {
-			t.Errorf("While parsing:\n%s\nGot no error, expected error:\n%s", test.src, expectErr)
-		}
-	}
-}
diff --git a/tools/src/cmd/intrinsic-gen/sem/sem.go b/tools/src/cmd/intrinsic-gen/sem/sem.go
deleted file mode 100644
index b1dc485..0000000
--- a/tools/src/cmd/intrinsic-gen/sem/sem.go
+++ /dev/null
@@ -1,283 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package sem
-
-import (
-	"fmt"
-
-	"dawn.googlesource.com/tint/tools/src/cmd/intrinsic-gen/ast"
-)
-
-// Sem is the root of the semantic tree
-type Sem struct {
-	Enums        []*Enum
-	Types        []*Type
-	TypeMatchers []*TypeMatcher
-	EnumMatchers []*EnumMatcher
-	Functions    []*Function
-	// Maximum number of open-types used across all intrinsics
-	MaxOpenTypes int
-	// Maximum number of open-numbers used across all intrinsics
-	MaxOpenNumbers int
-	// The alphabetically sorted list of unique parameter names
-	UniqueParameterNames []string
-}
-
-// New returns a new Sem
-func New() *Sem {
-	return &Sem{
-		Enums:        []*Enum{},
-		Types:        []*Type{},
-		TypeMatchers: []*TypeMatcher{},
-		EnumMatchers: []*EnumMatcher{},
-		Functions:    []*Function{},
-	}
-}
-
-// Enum describes an enumerator
-type Enum struct {
-	Decl    ast.EnumDecl
-	Name    string
-	Entries []*EnumEntry
-}
-
-// FindEntry returns the enum entry with the given name
-func (e *Enum) FindEntry(name string) *EnumEntry {
-	for _, entry := range e.Entries {
-		if entry.Name == name {
-			return entry
-		}
-	}
-	return nil
-}
-
-// EnumEntry is an entry in an enumerator
-type EnumEntry struct {
-	Enum       *Enum
-	Name       string
-	IsInternal bool // True if this entry is not part of the WGSL grammar
-}
-
-// Format implements the fmt.Formatter interface
-func (e EnumEntry) Format(w fmt.State, verb rune) {
-	if e.IsInternal {
-		fmt.Fprint(w, "[[internal]] ")
-	}
-	fmt.Fprint(w, e.Name)
-}
-
-// Type declares a type
-type Type struct {
-	TemplateParams []TemplateParam
-	Decl           ast.TypeDecl
-	Name           string
-	DisplayName    string
-}
-
-// TypeMatcher declares a type matcher
-type TypeMatcher struct {
-	TemplateParams []TemplateParam
-	Decl           ast.MatcherDecl
-	Name           string
-	Types          []*Type
-}
-
-// EnumMatcher declares a enum matcher
-type EnumMatcher struct {
-	TemplateParams []TemplateParam
-	Decl           ast.MatcherDecl
-	Name           string
-	Enum           *Enum
-	Options        []*EnumEntry
-}
-
-// TemplateEnumParam is a template enum parameter
-type TemplateEnumParam struct {
-	Name    string
-	Enum    *Enum
-	Matcher *EnumMatcher // Optional
-}
-
-// TemplateTypeParam is a template type parameter
-type TemplateTypeParam struct {
-	Name string
-	Type ResolvableType
-}
-
-// TemplateNumberParam is a template type parameter
-type TemplateNumberParam struct {
-	Name string
-}
-
-// Function describes the overloads of an intrinsic function
-type Function struct {
-	Name      string
-	Overloads []*Overload
-}
-
-// Overload describes a single overload of a function
-type Overload struct {
-	Decl             ast.FunctionDecl
-	Function         *Function
-	TemplateParams   []TemplateParam
-	OpenTypes        []*TemplateTypeParam
-	OpenNumbers      []TemplateParam
-	ReturnType       *FullyQualifiedName
-	Parameters       []Parameter
-	CanBeUsedInStage StageUses
-	IsDeprecated     bool // True if this overload is deprecated
-}
-
-// StageUses describes the stages an overload can be used in
-type StageUses struct {
-	Vertex   bool
-	Fragment bool
-	Compute  bool
-}
-
-// List returns the stage uses as a string list
-func (u StageUses) List() []string {
-	out := []string{}
-	if u.Vertex {
-		out = append(out, "vertex")
-	}
-	if u.Fragment {
-		out = append(out, "fragment")
-	}
-	if u.Compute {
-		out = append(out, "compute")
-	}
-	return out
-}
-
-// Format implements the fmt.Formatter interface
-func (o Overload) Format(w fmt.State, verb rune) {
-	fmt.Fprintf(w, "fn %v", o.Function.Name)
-	if len(o.TemplateParams) > 0 {
-		fmt.Fprintf(w, "<")
-		for i, t := range o.TemplateParams {
-			if i > 0 {
-				fmt.Fprint(w, ", ")
-			}
-			fmt.Fprintf(w, "%v", t)
-		}
-		fmt.Fprintf(w, ">")
-	}
-	fmt.Fprint(w, "(")
-	for i, p := range o.Parameters {
-		if i > 0 {
-			fmt.Fprint(w, ", ")
-		}
-		fmt.Fprintf(w, "%v", p)
-	}
-	fmt.Fprint(w, ")")
-	if o.ReturnType != nil {
-		fmt.Fprintf(w, " -> %v", o.ReturnType)
-	}
-}
-
-// Parameter describes a single parameter of a function overload
-type Parameter struct {
-	Name string
-	Type FullyQualifiedName
-}
-
-// Format implements the fmt.Formatter interface
-func (p Parameter) Format(w fmt.State, verb rune) {
-	if p.Name != "" {
-		fmt.Fprintf(w, "%v: ", p.Name)
-	}
-	fmt.Fprintf(w, "%v", p.Type)
-}
-
-// FullyQualifiedName is the usage of a Type, TypeMatcher or TemplateTypeParam
-type FullyQualifiedName struct {
-	Target            Named
-	TemplateArguments []interface{}
-}
-
-// Format implements the fmt.Formatter interface
-func (f FullyQualifiedName) Format(w fmt.State, verb rune) {
-	fmt.Fprint(w, f.Target.GetName())
-	if len(f.TemplateArguments) > 0 {
-		fmt.Fprintf(w, "<")
-		for i, t := range f.TemplateArguments {
-			if i > 0 {
-				fmt.Fprint(w, ", ")
-			}
-			fmt.Fprintf(w, "%v", t)
-		}
-		fmt.Fprintf(w, ">")
-	}
-}
-
-// TemplateParam is a TemplateEnumParam, TemplateTypeParam or TemplateNumberParam
-type TemplateParam interface {
-	Named
-	isTemplateParam()
-}
-
-func (*TemplateEnumParam) isTemplateParam()   {}
-func (*TemplateTypeParam) isTemplateParam()   {}
-func (*TemplateNumberParam) isTemplateParam() {}
-
-// ResolvableType is a Type, TypeMatcher or TemplateTypeParam
-type ResolvableType interface {
-	Named
-	isResolvableType()
-}
-
-func (*Type) isResolvableType()              {}
-func (*TypeMatcher) isResolvableType()       {}
-func (*TemplateTypeParam) isResolvableType() {}
-
-// Named is something that can be looked up by name
-type Named interface {
-	isNamed()
-	GetName() string
-}
-
-func (*Enum) isNamed()                {}
-func (*EnumEntry) isNamed()           {}
-func (*Type) isNamed()                {}
-func (*TypeMatcher) isNamed()         {}
-func (*EnumMatcher) isNamed()         {}
-func (*TemplateTypeParam) isNamed()   {}
-func (*TemplateEnumParam) isNamed()   {}
-func (*TemplateNumberParam) isNamed() {}
-
-// GetName returns the name of the Enum
-func (e *Enum) GetName() string { return e.Name }
-
-// GetName returns the name of the EnumEntry
-func (e *EnumEntry) GetName() string { return e.Name }
-
-// GetName returns the name of the Type
-func (t *Type) GetName() string { return t.Name }
-
-// GetName returns the name of the TypeMatcher
-func (t *TypeMatcher) GetName() string { return t.Name }
-
-// GetName returns the name of the EnumMatcher
-func (e *EnumMatcher) GetName() string { return e.Name }
-
-// GetName returns the name of the TemplateTypeParam
-func (t *TemplateTypeParam) GetName() string { return t.Name }
-
-// GetName returns the name of the TemplateEnumParam
-func (t *TemplateEnumParam) GetName() string { return t.Name }
-
-// GetName returns the name of the TemplateNumberParam
-func (t *TemplateNumberParam) GetName() string { return t.Name }