[glsl] Move combined texture sampler naming to printer

Instead of setting the name for combined texture sampler variables in
the TexturePolyfill transform, apply them in the Printer instead. We
do this by adding a new instruction for combined texture sampler
variables that the polyfill transform generates. The printer can then
perform the map lookup to find the desired name.

This removes the need to preserve the names that are held in the IR
module, which in turn simplifies the renaming process.

Bug: 380043958
Change-Id: I47b50927847eaaf93384049457cf3d01da48e789
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/219234
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/src/tint/lang/core/ir/var.h b/src/tint/lang/core/ir/var.h
index b274514..8c597bb 100644
--- a/src/tint/lang/core/ir/var.h
+++ b/src/tint/lang/core/ir/var.h
@@ -40,7 +40,7 @@
 namespace tint::core::ir {
 
 /// A var instruction in the IR.
-class Var final : public Castable<Var, OperandInstruction<1, 1>> {
+class Var : public Castable<Var, OperandInstruction<1, 1>> {
   public:
     /// The offset in Operands() for the initializer
     static constexpr size_t kInitializerOperandOffset = 0;
diff --git a/src/tint/lang/glsl/ir/BUILD.bazel b/src/tint/lang/glsl/ir/BUILD.bazel
index ac3a1dc..f040e2a 100644
--- a/src/tint/lang/glsl/ir/BUILD.bazel
+++ b/src/tint/lang/glsl/ir/BUILD.bazel
@@ -40,10 +40,12 @@
   name = "ir",
   srcs = [
     "builtin_call.cc",
+    "combined_texture_sampler_var.cc",
     "member_builtin_call.cc",
   ],
   hdrs = [
     "builtin_call.h",
+    "combined_texture_sampler_var.h",
     "member_builtin_call.h",
   ],
   deps = [
@@ -76,6 +78,7 @@
   alwayslink = True,
   srcs = [
     "builtin_call_test.cc",
+    "combined_texture_sampler_var_test.cc",
     "member_builtin_call_test.cc",
   ],
   deps = [
diff --git a/src/tint/lang/glsl/ir/BUILD.cmake b/src/tint/lang/glsl/ir/BUILD.cmake
index 2ede788..0e8cd98 100644
--- a/src/tint/lang/glsl/ir/BUILD.cmake
+++ b/src/tint/lang/glsl/ir/BUILD.cmake
@@ -41,6 +41,8 @@
 tint_add_target(tint_lang_glsl_ir lib
   lang/glsl/ir/builtin_call.cc
   lang/glsl/ir/builtin_call.h
+  lang/glsl/ir/combined_texture_sampler_var.cc
+  lang/glsl/ir/combined_texture_sampler_var.h
   lang/glsl/ir/member_builtin_call.cc
   lang/glsl/ir/member_builtin_call.h
 )
@@ -77,6 +79,7 @@
 ################################################################################
 tint_add_target(tint_lang_glsl_ir_test test
   lang/glsl/ir/builtin_call_test.cc
+  lang/glsl/ir/combined_texture_sampler_var_test.cc
   lang/glsl/ir/member_builtin_call_test.cc
 )
 
diff --git a/src/tint/lang/glsl/ir/BUILD.gn b/src/tint/lang/glsl/ir/BUILD.gn
index 65c38da..eaeb8f7 100644
--- a/src/tint/lang/glsl/ir/BUILD.gn
+++ b/src/tint/lang/glsl/ir/BUILD.gn
@@ -47,6 +47,8 @@
   sources = [
     "builtin_call.cc",
     "builtin_call.h",
+    "combined_texture_sampler_var.cc",
+    "combined_texture_sampler_var.h",
     "member_builtin_call.cc",
     "member_builtin_call.h",
   ]
@@ -77,6 +79,7 @@
   tint_unittests_source_set("unittests") {
     sources = [
       "builtin_call_test.cc",
+      "combined_texture_sampler_var_test.cc",
       "member_builtin_call_test.cc",
     ]
     deps = [
diff --git a/src/tint/lang/glsl/ir/combined_texture_sampler_var.cc b/src/tint/lang/glsl/ir/combined_texture_sampler_var.cc
new file mode 100644
index 0000000..d862710
--- /dev/null
+++ b/src/tint/lang/glsl/ir/combined_texture_sampler_var.cc
@@ -0,0 +1,56 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "src/tint/lang/glsl/ir/combined_texture_sampler_var.h"
+
+#include <utility>
+
+#include "src/tint/lang/core/ir/clone_context.h"
+#include "src/tint/lang/core/ir/module.h"
+#include "src/tint/utils/ice/ice.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::glsl::ir::CombinedTextureSamplerVar);
+
+namespace tint::glsl::ir {
+
+CombinedTextureSamplerVar::CombinedTextureSamplerVar(Id id,
+                                                     core::ir::InstructionResult* result,
+                                                     tint::BindingPoint texture_bp,
+                                                     tint::BindingPoint sampler_bp)
+    : Base(id, result), sampler_binding_point_(sampler_bp) {
+    SetBindingPoint(texture_bp.group, texture_bp.binding);
+}
+
+CombinedTextureSamplerVar::~CombinedTextureSamplerVar() = default;
+
+CombinedTextureSamplerVar* CombinedTextureSamplerVar::Clone(core::ir::CloneContext& ctx) {
+    auto* new_result = ctx.Clone(Result(0));
+    return ctx.ir.CreateInstruction<CombinedTextureSamplerVar>(new_result, TextureBindingPoint(),
+                                                               SamplerBindingPoint());
+}
+
+}  // namespace tint::glsl::ir
diff --git a/src/tint/lang/glsl/ir/combined_texture_sampler_var.h b/src/tint/lang/glsl/ir/combined_texture_sampler_var.h
new file mode 100644
index 0000000..1aa2552
--- /dev/null
+++ b/src/tint/lang/glsl/ir/combined_texture_sampler_var.h
@@ -0,0 +1,75 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef SRC_TINT_LANG_GLSL_IR_COMBINED_TEXTURE_SAMPLER_VAR_H_
+#define SRC_TINT_LANG_GLSL_IR_COMBINED_TEXTURE_SAMPLER_VAR_H_
+
+#include <string>
+
+#include "src/tint/lang/core/ir/var.h"
+#include "src/tint/utils/rtti/castable.h"
+
+namespace tint::glsl::ir {
+
+/// A combined texture sampler variable instruction in the IR.
+class CombinedTextureSamplerVar final : public Castable<CombinedTextureSamplerVar, core::ir::Var> {
+  public:
+    /// Constructor
+    /// @param id the instruction id
+    /// @param result the result value
+    /// @param texture_bp the texture binding point
+    /// @param sampler_bp the sampler binding point
+    CombinedTextureSamplerVar(Id id,
+                              core::ir::InstructionResult* result,
+                              tint::BindingPoint texture_bp,
+                              tint::BindingPoint sampler_bp);
+
+    ~CombinedTextureSamplerVar() override;
+
+    /// @returns the texture binding point
+    tint::BindingPoint TextureBindingPoint() {
+        auto bp = BindingPoint();
+        TINT_ASSERT(bp);
+        return *bp;
+    }
+
+    /// @returns the sampler binding point
+    tint::BindingPoint SamplerBindingPoint() { return sampler_binding_point_; }
+
+    /// @copydoc core::ir::Instruction::Clone()
+    CombinedTextureSamplerVar* Clone(core::ir::CloneContext& ctx) override;
+
+    /// @returns the friendly name for the instruction
+    std::string FriendlyName() const override { return "combined_texture_sampler"; }
+
+  private:
+    tint::BindingPoint sampler_binding_point_;
+};
+
+}  // namespace tint::glsl::ir
+
+#endif  // SRC_TINT_LANG_GLSL_IR_COMBINED_TEXTURE_SAMPLER_VAR_H_
diff --git a/src/tint/lang/glsl/ir/combined_texture_sampler_var_test.cc b/src/tint/lang/glsl/ir/combined_texture_sampler_var_test.cc
new file mode 100644
index 0000000..429d3c1
--- /dev/null
+++ b/src/tint/lang/glsl/ir/combined_texture_sampler_var_test.cc
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "src/tint/lang/glsl/ir/combined_texture_sampler_var.h"
+
+#include "gtest/gtest.h"
+#include "src/tint/lang/core/ir/ir_helper_test.h"
+#include "src/tint/lang/core/ir/validator.h"
+#include "src/tint/lang/core/type/sampled_texture.h"
+
+using namespace tint::core::fluent_types;  // NOLINT
+
+namespace tint::glsl::ir {
+namespace {
+
+using namespace tint::core::number_suffixes;  // NOLINT
+                                              //
+using IR_GlslCombinedTextureSamplerTest = core::ir::IRTestHelper;
+
+TEST_F(IR_GlslCombinedTextureSamplerTest, Clone) {
+    BindingPoint texture_bp{1, 2};
+    BindingPoint sampler_bp{3, 4};
+    auto* type = ty.ptr<handle>(
+        ty.Get<core::type::SampledTexture>(core::type::TextureDimension::k2d, ty.f32()));
+    auto* var = mod.CreateInstruction<CombinedTextureSamplerVar>(b.InstructionResult(type),
+                                                                 texture_bp, sampler_bp);
+
+    auto* new_var = clone_ctx.Clone(var);
+
+    EXPECT_NE(var, new_var);
+    EXPECT_NE(var->Result(0), new_var->Result(0));
+    EXPECT_EQ(new_var->Result(0)->Type(), type);
+
+    EXPECT_EQ(new_var->TextureBindingPoint(), texture_bp);
+    EXPECT_EQ(new_var->SamplerBindingPoint(), sampler_bp);
+}
+
+}  // namespace
+}  // namespace tint::glsl::ir
diff --git a/src/tint/lang/glsl/writer/printer/BUILD.bazel b/src/tint/lang/glsl/writer/printer/BUILD.bazel
index 07e317e..a97e90d 100644
--- a/src/tint/lang/glsl/writer/printer/BUILD.bazel
+++ b/src/tint/lang/glsl/writer/printer/BUILD.bazel
@@ -54,6 +54,11 @@
     "//src/tint/lang/glsl",
     "//src/tint/lang/glsl/intrinsic",
     "//src/tint/lang/glsl/ir",
+    "//src/tint/lang/wgsl",
+    "//src/tint/lang/wgsl/ast",
+    "//src/tint/lang/wgsl/ast/transform",
+    "//src/tint/lang/wgsl/program",
+    "//src/tint/lang/wgsl/sem",
     "//src/tint/utils",
     "//src/tint/utils/containers",
     "//src/tint/utils/diagnostic",
diff --git a/src/tint/lang/glsl/writer/printer/BUILD.cmake b/src/tint/lang/glsl/writer/printer/BUILD.cmake
index 109b197..3c8c058 100644
--- a/src/tint/lang/glsl/writer/printer/BUILD.cmake
+++ b/src/tint/lang/glsl/writer/printer/BUILD.cmake
@@ -55,6 +55,11 @@
   tint_lang_glsl
   tint_lang_glsl_intrinsic
   tint_lang_glsl_ir
+  tint_lang_wgsl
+  tint_lang_wgsl_ast
+  tint_lang_wgsl_ast_transform
+  tint_lang_wgsl_program
+  tint_lang_wgsl_sem
   tint_utils
   tint_utils_containers
   tint_utils_diagnostic
diff --git a/src/tint/lang/glsl/writer/printer/BUILD.gn b/src/tint/lang/glsl/writer/printer/BUILD.gn
index 9fe36b6..4e006f4 100644
--- a/src/tint/lang/glsl/writer/printer/BUILD.gn
+++ b/src/tint/lang/glsl/writer/printer/BUILD.gn
@@ -55,6 +55,11 @@
       "${tint_src_dir}/lang/glsl",
       "${tint_src_dir}/lang/glsl/intrinsic",
       "${tint_src_dir}/lang/glsl/ir",
+      "${tint_src_dir}/lang/wgsl",
+      "${tint_src_dir}/lang/wgsl/ast",
+      "${tint_src_dir}/lang/wgsl/ast/transform",
+      "${tint_src_dir}/lang/wgsl/program",
+      "${tint_src_dir}/lang/wgsl/sem",
       "${tint_src_dir}/utils",
       "${tint_src_dir}/utils/containers",
       "${tint_src_dir}/utils/diagnostic",
diff --git a/src/tint/lang/glsl/writer/printer/printer.cc b/src/tint/lang/glsl/writer/printer/printer.cc
index 8a82824..fa208c3 100644
--- a/src/tint/lang/glsl/writer/printer/printer.cc
+++ b/src/tint/lang/glsl/writer/printer/printer.cc
@@ -81,7 +81,9 @@
 #include "src/tint/lang/core/type/vector.h"
 #include "src/tint/lang/core/type/void.h"
 #include "src/tint/lang/glsl/ir/builtin_call.h"
+#include "src/tint/lang/glsl/ir/combined_texture_sampler_var.h"
 #include "src/tint/lang/glsl/ir/member_builtin_call.h"
+#include "src/tint/lang/glsl/writer/common/options.h"
 #include "src/tint/lang/glsl/writer/common/printer_support.h"
 #include "src/tint/lang/glsl/writer/common/version.h"
 #include "src/tint/utils/containers/map.h"
@@ -110,8 +112,8 @@
   public:
     /// Constructor
     /// @param module the Tint IR module to generate
-    /// @param version the GLSL version information
-    Printer(core::ir::Module& module, const Version& version) : ir_(module), version_(version) {}
+    /// @param options the options to use for generating code
+    Printer(core::ir::Module& module, const Options& options) : ir_(module), options_(options) {}
 
     /// @returns the generated GLSL shader
     tint::Result<Output> Generate() {
@@ -126,8 +128,9 @@
             TINT_SCOPED_ASSIGNMENT(current_buffer_, &header_buffer_);
 
             auto out = Line();
-            out << "#version " << version_.major_version << version_.minor_version << "0";
-            if (version_.IsES()) {
+            out << "#version " << options_.version.major_version << options_.version.minor_version
+                << "0";
+            if (options_.version.IsES()) {
                 out << " es";
             }
         }
@@ -169,7 +172,7 @@
 
     Output result_;
 
-    const Version& version_;
+    const Options& options_;
 
     /// The buffer holding header text
     TextBuffer header_buffer_;
@@ -845,7 +848,7 @@
                     out << "writeonly ";
                     break;
                 case core::Access::kReadWrite: {
-                    if (version_.IsES()) {
+                    if (options_.version.IsES()) {
                         // ESSL 3.1 SPEC (chapter 4.9, Memory Access Qualifiers):
                         // Except for image variables qualified with the format qualifiers r32f,
                         // r32i, and r32ui, image variables must specify either memory qualifier
@@ -1037,6 +1040,18 @@
             out << " ";
         }
 
+        // If this is a combined texture sampler variable, check the provided map to see if we need
+        // to give it a specific name.
+        if (auto* combined_texture_sampler = var->As<ir::CombinedTextureSamplerVar>()) {
+            binding::CombinedTextureSamplerPair key{
+                combined_texture_sampler->TextureBindingPoint(),
+                combined_texture_sampler->SamplerBindingPoint()};
+            auto itr = options_.bindings.sampler_texture_to_name.find(key);
+            if (itr != options_.bindings.sampler_texture_to_name.end()) {
+                names_.Add(var->Result(0), itr->second);
+            }
+        }
+
         EmitVar(out, var);
     }
 
@@ -1051,8 +1066,9 @@
         auto addrspace = var->Result(0)->Type()->As<core::type::Pointer>()->AddressSpace();
 
         if (attrs.builtin.has_value()) {
-            if (version_.IsES() && (attrs.builtin == tint::core::BuiltinValue::kSampleIndex ||
-                                    attrs.builtin == tint::core::BuiltinValue::kSampleMask)) {
+            if (options_.version.IsES() &&
+                (attrs.builtin == tint::core::BuiltinValue::kSampleIndex ||
+                 attrs.builtin == tint::core::BuiltinValue::kSampleMask)) {
                 EmitExtension(kOESSampleVariables);
             }
 
@@ -1563,13 +1579,13 @@
                 break;
             case core::BuiltinFn::kDpdxCoarse:
                 out << "dFdx";
-                if (version_.IsDesktop()) {
+                if (options_.version.IsDesktop()) {
                     out << "Coarse";
                 }
                 break;
             case core::BuiltinFn::kDpdxFine:
                 out << "dFdx";
-                if (version_.IsDesktop()) {
+                if (options_.version.IsDesktop()) {
                     out << "Fine";
                 }
                 break;
@@ -1578,13 +1594,13 @@
                 break;
             case core::BuiltinFn::kDpdyCoarse:
                 out << "dFdy";
-                if (version_.IsDesktop()) {
+                if (options_.version.IsDesktop()) {
                     out << "Coarse";
                 }
                 break;
             case core::BuiltinFn::kDpdyFine:
                 out << "dFdy";
-                if (version_.IsDesktop()) {
+                if (options_.version.IsDesktop()) {
                     out << "Fine";
                 }
                 break;
@@ -1784,8 +1800,8 @@
 
 }  // namespace
 
-Result<Output> Print(core::ir::Module& module, const Version& version) {
-    return Printer{module, version}.Generate();
+Result<Output> Print(core::ir::Module& module, const Options& options) {
+    return Printer{module, options}.Generate();
 }
 
 }  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/writer/printer/printer.h b/src/tint/lang/glsl/writer/printer/printer.h
index aaeccf7..7114424 100644
--- a/src/tint/lang/glsl/writer/printer/printer.h
+++ b/src/tint/lang/glsl/writer/printer/printer.h
@@ -36,15 +36,15 @@
 class Module;
 }  // namespace tint::core::ir
 namespace tint::glsl::writer {
-struct Version;
+struct Options;
 }  // namespace tint::glsl::writer
 
 namespace tint::glsl::writer {
 
 /// @returns the generated GLSL shader on success, or failure
 /// @param module the Tint IR module to generate
-/// @param version the GLSL version information
-Result<Output> Print(core::ir::Module& module, const Version& version);
+/// @param options the options to use
+Result<Output> Print(core::ir::Module& module, const Options& options);
 
 }  // namespace tint::glsl::writer
 
diff --git a/src/tint/lang/glsl/writer/raise/raise.cc b/src/tint/lang/glsl/writer/raise/raise.cc
index ae6283d..d94ebfa 100644
--- a/src/tint/lang/glsl/writer/raise/raise.cc
+++ b/src/tint/lang/glsl/writer/raise/raise.cc
@@ -179,7 +179,6 @@
     {
         // Must come after DirectVariableAccess
         raise::TexturePolyfillConfig tex_config;
-        tex_config.sampler_texture_to_name = options.bindings.sampler_texture_to_name;
         tex_config.placeholder_sampler_bind_point = options.bindings.placeholder_sampler_bind_point;
         tex_config.texture_builtins_from_uniform = options.bindings.texture_builtins_from_uniform;
         RUN_TRANSFORM(raise::TexturePolyfill, module, tex_config);
diff --git a/src/tint/lang/glsl/writer/raise/texture_polyfill.cc b/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
index 83118cf..baf355d 100644
--- a/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
+++ b/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
@@ -41,6 +41,7 @@
 #include "src/tint/lang/core/type/sampled_texture.h"
 #include "src/tint/lang/core/type/storage_texture.h"
 #include "src/tint/lang/glsl/ir/builtin_call.h"
+#include "src/tint/lang/glsl/ir/combined_texture_sampler_var.h"
 #include "src/tint/lang/glsl/ir/member_builtin_call.h"
 
 namespace tint::glsl::writer::raise {
@@ -269,32 +270,29 @@
                            core::ir::Var* tex,
                            core::ir::Var* sampler,
                            const core::type::Pointer* tex_ty) {
-        std::string name;
-        auto it = (cfg.sampler_texture_to_name.find(key));
-        if (it != cfg.sampler_texture_to_name.end()) {
-            name = it->second;
-        } else {
-            name = ir.NameOf(tex).Name();
-            if (name.empty()) {
-                name = "t";
-            }
+        // Create a combined texture sampler variable and insert it into the root block.
+        auto* result = b.InstructionResult(tex_ty);
+        auto* var = ir.CreateInstruction<glsl::ir::CombinedTextureSamplerVar>(result, key.texture,
+                                                                              key.sampler);
+        ir.root_block->Append(var);
 
-            if (sampler) {
-                auto sampler_name = ir.NameOf(sampler).Name();
-                if (sampler_name.empty()) {
-                    sampler_name = "s";
-                }
-                name += "_" + sampler_name;
-            }
-            if (name.empty()) {
-                name = "v";
+        // Set the variable name based on the original texture and sampler names if provided.
+        StringStream name;
+        if (auto texture_name = ir.NameOf(tex)) {
+            name << texture_name.NameView();
+        } else {
+            name << "t";
+        }
+        if (sampler) {
+            name << "_";
+            if (auto sampler_name = ir.NameOf(sampler)) {
+                name << sampler_name.NameView();
+            } else {
+                name << "s";
             }
         }
+        ir.SetName(var, name.str());
 
-        core::ir::Var* var = nullptr;
-        // We may already be inside an insert block, so make a new insert block instead of
-        // appending directly to the root block.
-        b.Append(ir.root_block, [&] { var = b.Var(name, tex_ty); });
         return var;
     }
 
diff --git a/src/tint/lang/glsl/writer/raise/texture_polyfill.h b/src/tint/lang/glsl/writer/raise/texture_polyfill.h
index 63ed0dd..a52a727 100644
--- a/src/tint/lang/glsl/writer/raise/texture_polyfill.h
+++ b/src/tint/lang/glsl/writer/raise/texture_polyfill.h
@@ -39,10 +39,6 @@
 namespace tint::glsl::writer::raise {
 
 struct TexturePolyfillConfig {
-    /// A map of SamplerTexturePair to combined sampler names for the
-    /// CombineSamplers transform
-    CombinedTextureSamplerInfo sampler_texture_to_name;
-
     /// The binding point to use for placeholder samplers.
     BindingPoint placeholder_sampler_bind_point;
 
@@ -53,7 +49,6 @@
 
     /// Reflection for this class
     TINT_REFLECT(TexturePolyfillConfig,
-                 sampler_texture_to_name,
                  placeholder_sampler_bind_point,
                  texture_builtins_from_uniform);
 };
diff --git a/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc b/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc
index 4ebcdb7..37bfe55 100644
--- a/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc
+++ b/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc
@@ -78,7 +78,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_2d<f32>, read_write> = var
+  %v:ptr<handle, texture_2d<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = func():u32 {
@@ -130,7 +130,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_2d<f32>, read_write> = var
+  %v:ptr<handle, texture_2d<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = func():vec2<u32> {
@@ -181,7 +181,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_2d<f32>, read_write> = var
+  %v:ptr<handle, texture_2d<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = func():vec2<u32> {
@@ -233,7 +233,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_2d_array<f32>, read_write> = var
+  %v:ptr<handle, texture_2d_array<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -338,7 +338,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_depth_multisampled_2d, read_write> = var
+  %v:ptr<handle, texture_depth_multisampled_2d, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -391,7 +391,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_2d_array<f32>, read_write> = var
+  %v:ptr<handle, texture_2d_array<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -444,7 +444,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_2d_array<f32>, read_write> = var
+  %v:ptr<handle, texture_2d_array<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -498,7 +498,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_cube_array<f32>, read_write> = var
+  %v:ptr<handle, texture_cube_array<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -551,7 +551,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_cube_array<f32>, read_write> = var
+  %v:ptr<handle, texture_cube_array<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -660,7 +660,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_2d<f32>, read_write> = var
+  %v:ptr<handle, texture_2d<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -715,7 +715,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_2d<i32>, read_write> = var
+  %v:ptr<handle, texture_2d<i32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -769,7 +769,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_3d<f32>, read_write> = var
+  %v:ptr<handle, texture_3d<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -825,7 +825,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %v:ptr<handle, texture_multisampled_2d<i32>, read_write> = var
+  %v:ptr<handle, texture_multisampled_2d<i32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1204,12 +1204,12 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d<f32>, read_write> = var
+  %t:ptr<handle, texture_2d<f32>, read_write> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = func():vec2<u32> {
   $B2: {
-    %3:texture_2d<f32> = load %my_tex
+    %3:texture_2d<f32> = load %t
     %4:vec2<i32> = glsl.textureSize %3, 0i
     %5:vec2<u32> = bitcast %4
     ret %5
@@ -1221,12 +1221,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -1277,7 +1271,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1295,12 +1289,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -1353,7 +1341,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1372,12 +1360,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -1429,7 +1411,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_depth_cube_array, read> = var
+  %t_s:ptr<handle, texture_depth_cube_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1449,12 +1431,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -1508,7 +1484,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1529,12 +1505,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -1583,7 +1553,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_2d<i32>, read> = var
+  %t_s:ptr<handle, texture_2d<i32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1602,12 +1572,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -1656,7 +1620,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_2d<i32>, read> = var
+  %t_s:ptr<handle, texture_2d<i32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1675,12 +1639,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -1730,7 +1688,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_2d_array<i32>, read> = var
+  %t_s:ptr<handle, texture_2d_array<i32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1751,12 +1709,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -1808,7 +1760,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_2d_array<i32>, read> = var
+  %t_s:ptr<handle, texture_2d_array<i32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1829,12 +1781,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -1883,7 +1829,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1901,12 +1847,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -1955,7 +1895,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -1973,12 +1913,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2028,7 +1962,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -2048,12 +1982,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2105,7 +2033,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %t_s:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -2125,12 +2053,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {2, 2};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2178,13 +2100,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d<f32>, read> = var
+  %t_s:ptr<handle, texture_2d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 0.5f
-    %4:texture_2d<f32> = load %my_tex
+    %4:texture_2d<f32> = load %t_s
     %5:vec4<f32> = glsl.texture %4, %3
     %x:vec4<f32> = let %5
     ret
@@ -2196,12 +2118,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2250,13 +2166,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d<f32>, read> = var
+  %t_s:ptr<handle, texture_2d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d<f32> = load %my_tex
+    %4:texture_2d<f32> = load %t_s
     %5:vec4<f32> = glsl.texture %4, %3
     %x:vec4<f32> = let %5
     ret
@@ -2268,12 +2184,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2323,13 +2233,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d<f32>, read> = var
+  %t_s:ptr<handle, texture_2d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d<f32> = load %my_tex
+    %4:texture_2d<f32> = load %t_s
     %5:vec4<f32> = glsl.textureOffset %4, %3, vec2<i32>(4i, 5i)
     %x:vec4<f32> = let %5
     ret
@@ -2341,12 +2251,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2396,13 +2300,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d_array<f32>, read> = var
+  %t_s:ptr<handle, texture_2d_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d_array<f32> = load %my_tex
+    %4:texture_2d_array<f32> = load %t_s
     %5:f32 = convert 4u
     %6:vec3<f32> = construct %3, %5
     %7:vec4<f32> = glsl.texture %4, %6
@@ -2416,12 +2320,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2473,13 +2371,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d_array<f32>, read> = var
+  %t_s:ptr<handle, texture_2d_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d_array<f32> = load %my_tex
+    %4:texture_2d_array<f32> = load %t_s
     %5:f32 = convert 4u
     %6:vec3<f32> = construct %3, %5
     %7:vec4<f32> = glsl.textureOffset %4, %6, vec2<i32>(4i, 5i)
@@ -2493,12 +2391,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2547,13 +2439,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_3d<f32>, read> = var
+  %t_s:ptr<handle, texture_3d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_3d<f32> = load %my_tex
+    %4:texture_3d<f32> = load %t_s
     %5:vec4<f32> = glsl.texture %4, %3
     %x:vec4<f32> = let %5
     ret
@@ -2565,12 +2457,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2620,13 +2506,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_3d<f32>, read> = var
+  %t_s:ptr<handle, texture_3d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_3d<f32> = load %my_tex
+    %4:texture_3d<f32> = load %t_s
     %5:vec4<f32> = glsl.textureOffset %4, %3, vec3<i32>(4i, 5i, 6i)
     %x:vec4<f32> = let %5
     ret
@@ -2638,12 +2524,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2692,13 +2572,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_cube<f32>, read> = var
+  %t_s:ptr<handle, texture_cube<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_cube<f32> = load %my_tex
+    %4:texture_cube<f32> = load %t_s
     %5:vec4<f32> = glsl.texture %4, %3
     %x:vec4<f32> = let %5
     ret
@@ -2710,12 +2590,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2765,13 +2639,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_cube_array<f32>, read> = var
+  %t_s:ptr<handle, texture_cube_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_cube_array<f32> = load %my_tex
+    %4:texture_cube_array<f32> = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5
     %7:vec4<f32> = glsl.texture %4, %6
@@ -2785,12 +2659,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2839,13 +2707,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d = load %my_tex
+    %4:texture_depth_2d = load %t_s
     %5:vec3<f32> = construct %3, 0.0f
     %6:f32 = glsl.texture %4, %5
     %x:f32 = let %6
@@ -2858,12 +2726,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2913,13 +2775,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d = load %my_tex
+    %4:texture_depth_2d = load %t_s
     %5:vec3<f32> = construct %3, 0.0f
     %6:f32 = glsl.textureOffset %4, %5, vec2<i32>(4i, 5i)
     %x:f32 = let %6
@@ -2932,12 +2794,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -2987,13 +2843,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d_array = load %my_tex
+    %4:texture_depth_2d_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5, 0.0f
     %7:f32 = glsl.texture %4, %6
@@ -3007,12 +2863,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3063,13 +2913,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d_array = load %my_tex
+    %4:texture_depth_2d_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5, 0.0f
     %7:vec2<f32> = dpdx %3
@@ -3085,12 +2935,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3140,13 +2984,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_cube_array, read> = var
+  %t_s:ptr<handle, texture_depth_cube_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_depth_cube_array = load %my_tex
+    %4:texture_depth_cube_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5
     %7:f32 = glsl.texture %4, %6, 0.0f
@@ -3160,12 +3004,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3214,13 +3052,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d<f32>, read> = var
+  %t_s:ptr<handle, texture_2d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d<f32> = load %my_tex
+    %4:texture_2d<f32> = load %t_s
     %5:vec4<f32> = glsl.texture %4, %3, 3.0f
     %x:vec4<f32> = let %5
     ret
@@ -3232,12 +3070,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3288,13 +3120,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d<f32>, read> = var
+  %t_s:ptr<handle, texture_2d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d<f32> = load %my_tex
+    %4:texture_2d<f32> = load %t_s
     %5:vec4<f32> = glsl.textureOffset %4, %3, vec2<i32>(4i, 5i), 3.0f
     %x:vec4<f32> = let %5
     ret
@@ -3306,12 +3138,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3362,13 +3188,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d_array<f32>, read> = var
+  %t_s:ptr<handle, texture_2d_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d_array<f32> = load %my_tex
+    %4:texture_2d_array<f32> = load %t_s
     %5:f32 = convert 4u
     %6:vec3<f32> = construct %3, %5
     %7:vec4<f32> = glsl.texture %4, %6, 3.0f
@@ -3382,12 +3208,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3439,13 +3259,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d_array<f32>, read> = var
+  %t_s:ptr<handle, texture_2d_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d_array<f32> = load %my_tex
+    %4:texture_2d_array<f32> = load %t_s
     %5:f32 = convert 4u
     %6:vec3<f32> = construct %3, %5
     %7:vec4<f32> = glsl.textureOffset %4, %6, vec2<i32>(4i, 5i), 3.0f
@@ -3459,12 +3279,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3513,13 +3327,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_3d<f32>, read> = var
+  %t_s:ptr<handle, texture_3d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_3d<f32> = load %my_tex
+    %4:texture_3d<f32> = load %t_s
     %5:vec4<f32> = glsl.texture %4, %3, 3.0f
     %x:vec4<f32> = let %5
     ret
@@ -3531,12 +3345,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3587,13 +3395,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_3d<f32>, read> = var
+  %t_s:ptr<handle, texture_3d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_3d<f32> = load %my_tex
+    %4:texture_3d<f32> = load %t_s
     %5:vec4<f32> = glsl.textureOffset %4, %3, vec3<i32>(4i, 5i, 6i), 3.0f
     %x:vec4<f32> = let %5
     ret
@@ -3605,12 +3413,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3659,13 +3461,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_cube<f32>, read> = var
+  %t_s:ptr<handle, texture_cube<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_cube<f32> = load %my_tex
+    %4:texture_cube<f32> = load %t_s
     %5:vec4<f32> = glsl.texture %4, %3, 3.0f
     %x:vec4<f32> = let %5
     ret
@@ -3677,12 +3479,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3733,13 +3529,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_cube_array<f32>, read> = var
+  %t_s:ptr<handle, texture_cube_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_cube_array<f32> = load %my_tex
+    %4:texture_cube_array<f32> = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5
     %7:vec4<f32> = glsl.texture %4, %6, 3.0f
@@ -3753,12 +3549,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3807,13 +3597,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d<f32>, read> = var
+  %t_s:ptr<handle, texture_2d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d<f32> = load %my_tex
+    %4:texture_2d<f32> = load %t_s
     %5:f32 = convert 3.0f
     %6:vec4<f32> = glsl.textureLod %4, %3, %5
     %x:vec4<f32> = let %6
@@ -3826,12 +3616,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3882,13 +3666,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d<f32>, read> = var
+  %t_s:ptr<handle, texture_2d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d<f32> = load %my_tex
+    %4:texture_2d<f32> = load %t_s
     %5:f32 = convert 3.0f
     %6:vec4<f32> = glsl.textureLodOffset %4, %3, %5, vec2<i32>(4i, 5i)
     %x:vec4<f32> = let %6
@@ -3901,12 +3685,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -3957,13 +3735,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d_array<f32>, read> = var
+  %t_s:ptr<handle, texture_2d_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d_array<f32> = load %my_tex
+    %4:texture_2d_array<f32> = load %t_s
     %5:f32 = convert 4u
     %6:vec3<f32> = construct %3, %5
     %7:f32 = convert 3.0f
@@ -3978,12 +3756,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4035,13 +3807,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d_array<f32>, read> = var
+  %t_s:ptr<handle, texture_2d_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_2d_array<f32> = load %my_tex
+    %4:texture_2d_array<f32> = load %t_s
     %5:f32 = convert 4u
     %6:vec3<f32> = construct %3, %5
     %7:f32 = convert 3.0f
@@ -4056,12 +3828,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4110,13 +3876,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_3d<f32>, read> = var
+  %t_s:ptr<handle, texture_3d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_3d<f32> = load %my_tex
+    %4:texture_3d<f32> = load %t_s
     %5:f32 = convert 3.0f
     %6:vec4<f32> = glsl.textureLod %4, %3, %5
     %x:vec4<f32> = let %6
@@ -4129,12 +3895,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4185,13 +3945,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_3d<f32>, read> = var
+  %t_s:ptr<handle, texture_3d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_3d<f32> = load %my_tex
+    %4:texture_3d<f32> = load %t_s
     %5:f32 = convert 3.0f
     %6:vec4<f32> = glsl.textureLodOffset %4, %3, %5, vec3<i32>(4i, 5i, 6i)
     %x:vec4<f32> = let %6
@@ -4204,12 +3964,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4258,13 +4012,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_cube<f32>, read> = var
+  %t_s:ptr<handle, texture_cube<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_cube<f32> = load %my_tex
+    %4:texture_cube<f32> = load %t_s
     %5:f32 = convert 3.0f
     %6:vec4<f32> = glsl.textureLod %4, %3, %5
     %x:vec4<f32> = let %6
@@ -4277,12 +4031,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4333,13 +4081,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_cube_array<f32>, read> = var
+  %t_s:ptr<handle, texture_cube_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_cube_array<f32> = load %my_tex
+    %4:texture_cube_array<f32> = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5
     %7:f32 = convert 3.0f
@@ -4354,12 +4102,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4408,13 +4150,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d = load %my_tex
+    %4:texture_depth_2d = load %t_s
     %5:vec3<f32> = construct %3, 0.0f
     %6:f32 = convert 3i
     %7:f32 = glsl.textureLod %4, %5, %6
@@ -4428,12 +4170,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4483,13 +4219,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d = load %my_tex
+    %4:texture_depth_2d = load %t_s
     %5:vec3<f32> = construct %3, 0.0f
     %6:f32 = convert 3u
     %7:f32 = glsl.textureLodOffset %4, %5, %6, vec2<i32>(4i, 5i)
@@ -4503,12 +4239,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4558,13 +4288,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d_array = load %my_tex
+    %4:texture_depth_2d_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5, 0.0f
     %7:f32 = convert 3i
@@ -4579,12 +4309,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4636,13 +4360,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d_array = load %my_tex
+    %4:texture_depth_2d_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5, 0.0f
     %7:f32 = convert 3u
@@ -4657,12 +4381,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4712,13 +4430,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_cube_array, read> = var
+  %t_s:ptr<handle, texture_depth_cube_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3i
-    %4:texture_depth_cube_array = load %my_tex
+    %4:texture_depth_cube_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5
     %7:f32 = convert 3i
@@ -4733,12 +4451,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4791,7 +4503,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d<f32>, read> = var
+  %t_s:ptr<handle, texture_2d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -4799,7 +4511,7 @@
     %3:vec2<f32> = construct 1.0f, 2.0f
     %4:vec2<f32> = construct 3.0f, 4.0f
     %5:vec2<f32> = construct 6.0f, 7.0f
-    %6:texture_2d<f32> = load %my_tex
+    %6:texture_2d<f32> = load %t_s
     %7:vec4<f32> = glsl.textureGrad %6, %3, %4, %5
     %x:vec4<f32> = let %7
     ret
@@ -4811,12 +4523,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4871,7 +4577,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d<f32>, read> = var
+  %t_s:ptr<handle, texture_2d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -4879,7 +4585,7 @@
     %3:vec2<f32> = construct 1.0f, 2.0f
     %4:vec2<f32> = construct 3.0f, 4.0f
     %5:vec2<f32> = construct 6.0f, 7.0f
-    %6:texture_2d<f32> = load %my_tex
+    %6:texture_2d<f32> = load %t_s
     %7:vec4<f32> = glsl.textureGradOffset %6, %3, %4, %5, vec2<i32>(4i, 5i)
     %x:vec4<f32> = let %7
     ret
@@ -4891,12 +4597,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -4951,7 +4651,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d_array<f32>, read> = var
+  %t_s:ptr<handle, texture_2d_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -4959,7 +4659,7 @@
     %3:vec2<f32> = construct 1.0f, 2.0f
     %4:vec2<f32> = construct 3.0f, 4.0f
     %5:vec2<f32> = construct 6.0f, 7.0f
-    %6:texture_2d_array<f32> = load %my_tex
+    %6:texture_2d_array<f32> = load %t_s
     %7:f32 = convert 4u
     %8:vec3<f32> = construct %3, %7
     %9:vec4<f32> = glsl.textureGrad %6, %8, %4, %5
@@ -4973,12 +4673,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5034,7 +4728,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_2d_array<f32>, read> = var
+  %t_s:ptr<handle, texture_2d_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -5042,7 +4736,7 @@
     %3:vec2<f32> = construct 1.0f, 2.0f
     %4:vec2<f32> = construct 3.0f, 4.0f
     %5:vec2<f32> = construct 6.0f, 7.0f
-    %6:texture_2d_array<f32> = load %my_tex
+    %6:texture_2d_array<f32> = load %t_s
     %7:f32 = convert 4u
     %8:vec3<f32> = construct %3, %7
     %9:vec4<f32> = glsl.textureGradOffset %6, %8, %4, %5, vec2<i32>(4i, 5i)
@@ -5056,12 +4750,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5114,7 +4802,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_3d<f32>, read> = var
+  %t_s:ptr<handle, texture_3d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -5122,7 +4810,7 @@
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
     %4:vec3<f32> = construct 3.0f, 4.0f, 5.0f
     %5:vec3<f32> = construct 6.0f, 7.0f, 8.0f
-    %6:texture_3d<f32> = load %my_tex
+    %6:texture_3d<f32> = load %t_s
     %7:vec4<f32> = glsl.textureGrad %6, %3, %4, %5
     %x:vec4<f32> = let %7
     ret
@@ -5134,12 +4822,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5194,7 +4876,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_3d<f32>, read> = var
+  %t_s:ptr<handle, texture_3d<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -5202,7 +4884,7 @@
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
     %4:vec3<f32> = construct 3.0f, 4.0f, 5.0f
     %5:vec3<f32> = construct 6.0f, 7.0f, 8.0f
-    %6:texture_3d<f32> = load %my_tex
+    %6:texture_3d<f32> = load %t_s
     %7:vec4<f32> = glsl.textureGradOffset %6, %3, %4, %5, vec3<i32>(4i, 5i, 6i)
     %x:vec4<f32> = let %7
     ret
@@ -5214,12 +4896,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5272,7 +4948,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_cube<f32>, read> = var
+  %t_s:ptr<handle, texture_cube<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -5280,7 +4956,7 @@
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
     %4:vec3<f32> = construct 3.0f, 4.0f, 5.0f
     %5:vec3<f32> = construct 6.0f, 7.0f, 8.0f
-    %6:texture_cube<f32> = load %my_tex
+    %6:texture_cube<f32> = load %t_s
     %7:vec4<f32> = glsl.textureGrad %6, %3, %4, %5
     %x:vec4<f32> = let %7
     ret
@@ -5292,12 +4968,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5352,7 +5022,7 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_cube_array<f32>, read> = var
+  %t_s:ptr<handle, texture_cube_array<f32>, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
@@ -5360,7 +5030,7 @@
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
     %4:vec3<f32> = construct 3.0f, 4.0f, 5.0f
     %5:vec3<f32> = construct 6.0f, 7.0f, 8.0f
-    %6:texture_cube_array<f32> = load %my_tex
+    %6:texture_cube_array<f32> = load %t_s
     %7:f32 = convert 4u
     %8:vec4<f32> = construct %3, %7
     %9:vec4<f32> = glsl.textureGrad %6, %8, %4, %5
@@ -5374,12 +5044,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5428,13 +5092,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d = load %my_tex
+    %4:texture_depth_2d = load %t_s
     %5:vec3<f32> = construct %3, 3.0f
     %6:f32 = glsl.texture %4, %5
     %x:f32 = let %6
@@ -5447,12 +5111,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5502,13 +5160,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d = load %my_tex
+    %4:texture_depth_2d = load %t_s
     %5:vec3<f32> = construct %3, 3.0f
     %6:f32 = glsl.textureOffset %4, %5, vec2<i32>(4i, 5i)
     %x:f32 = let %6
@@ -5521,12 +5179,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5577,13 +5229,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d_array = load %my_tex
+    %4:texture_depth_2d_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5, 3.0f
     %7:f32 = glsl.texture %4, %6
@@ -5597,12 +5249,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5654,13 +5300,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d_array = load %my_tex
+    %4:texture_depth_2d_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5, 3.0f
     %7:vec2<f32> = dpdx %3
@@ -5676,12 +5322,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5730,13 +5370,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_cube, read> = var
+  %t_s:ptr<handle, texture_depth_cube, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_depth_cube = load %my_tex
+    %4:texture_depth_cube = load %t_s
     %5:vec4<f32> = construct %3, 3.0f
     %6:f32 = glsl.texture %4, %5
     %x:f32 = let %6
@@ -5749,12 +5389,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5805,13 +5439,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_cube_array, read> = var
+  %t_s:ptr<handle, texture_depth_cube_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_depth_cube_array = load %my_tex
+    %4:texture_depth_cube_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5
     %7:f32 = glsl.texture %4, %6, 3.0f
@@ -5825,12 +5459,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5879,13 +5507,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d = load %my_tex
+    %4:texture_depth_2d = load %t_s
     %5:vec3<f32> = construct %3, 3.0f
     %6:f32 = glsl.texture %4, %5
     %x:f32 = let %6
@@ -5898,12 +5526,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -5954,13 +5576,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d, read> = var
+  %t_s:ptr<handle, texture_depth_2d, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d = load %my_tex
+    %4:texture_depth_2d = load %t_s
     %5:vec3<f32> = construct %3, 3.0f
     %6:f32 = glsl.textureOffset %4, %5, vec2<i32>(4i, 5i)
     %x:f32 = let %6
@@ -5973,12 +5595,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -6029,13 +5645,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d_array = load %my_tex
+    %4:texture_depth_2d_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5, 3.0f
     %7:f32 = glsl.texture %4, %6
@@ -6049,12 +5665,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -6106,13 +5716,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+  %t_s:ptr<handle, texture_depth_2d_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec2<f32> = construct 1.0f, 2.0f
-    %4:texture_depth_2d_array = load %my_tex
+    %4:texture_depth_2d_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5, 3.0f
     %7:f32 = glsl.textureGradOffset %4, %6, vec2<f32>(0.0f), vec2<f32>(0.0f), vec2<i32>(4i, 5i)
@@ -6126,12 +5736,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -6180,13 +5784,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_cube, read> = var
+  %t_s:ptr<handle, texture_depth_cube, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_depth_cube = load %my_tex
+    %4:texture_depth_cube = load %t_s
     %5:vec4<f32> = construct %3, 3.0f
     %6:f32 = glsl.texture %4, %5
     %x:f32 = let %6
@@ -6199,12 +5803,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
@@ -6255,13 +5853,13 @@
 
     auto* expect = R"(
 $B1: {  # root
-  %my_tex:ptr<handle, texture_depth_cube_array, read> = var
+  %t_s:ptr<handle, texture_depth_cube_array, read> = combined_texture_sampler @binding_point(0, 0)
 }
 
 %foo = @fragment func():void {
   $B2: {
     %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
-    %4:texture_depth_cube_array = load %my_tex
+    %4:texture_depth_cube_array = load %t_s
     %5:f32 = convert 4u
     %6:vec4<f32> = construct %3, %5
     %7:f32 = glsl.texture %4, %6, 3.0f
@@ -6275,12 +5873,6 @@
 
     TexturePolyfillConfig cfg;
     cfg.placeholder_sampler_bind_point = {2, 2};
-
-    binding::CombinedTextureSamplerPair pair;
-    pair.texture = {0, 0};
-    pair.sampler = {0, 1};
-    cfg.sampler_texture_to_name[pair] = "my_tex";
-
     Run(TexturePolyfill, cfg);
     EXPECT_EQ(expect, str());
 }
diff --git a/src/tint/lang/glsl/writer/writer.cc b/src/tint/lang/glsl/writer/writer.cc
index b061d8a..5a64557 100644
--- a/src/tint/lang/glsl/writer/writer.cc
+++ b/src/tint/lang/glsl/writer/writer.cc
@@ -41,7 +41,7 @@
         return res.Failure();
     }
 
-    return Print(ir, options.version);
+    return Print(ir, options);
 }
 
 }  // namespace tint::glsl::writer