[glsl][ir] Polyfill `textureSampleCompare`

This Cl replaces the WGSL `textureSampleCompare` call with the needed
GLSL polyfill.

Bug: 42251044
Change-Id: I0ab80333b0c01820098f2ba3b318d32b0301bb4f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/209555
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/src/tint/lang/glsl/writer/builtin_test.cc b/src/tint/lang/glsl/writer/builtin_test.cc
index aaa89a7..67aaf4f 100644
--- a/src/tint/lang/glsl/writer/builtin_test.cc
+++ b/src/tint/lang/glsl/writer/builtin_test.cc
@@ -3808,5 +3808,225 @@
 )");
 }
 
+TEST_F(GlslWriterTest, BuiltinTextureSampleCompare_2d) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(
+            ty.ptr(handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2d)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, 3_f));
+        b.Return(func);
+    });
+
+    ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+    EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler2DShadow t_s;
+void main() {
+  float x = texture(t_s, vec3(vec2(1.0f, 2.0f), 3.0f));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleCompare_2d_Offset) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(
+            ty.ptr(handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2d)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+        auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, 3_f, offset));
+        b.Return(func);
+    });
+
+    ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+    EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler2DShadow t_s;
+void main() {
+  float x = textureOffset(t_s, vec3(vec2(1.0f, 2.0f), 3.0f), ivec2(4, 5));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleCompare_2d_Array) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(ty.ptr(
+            handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2dArray)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+        auto* array_idx = b.Value(4_u);
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x",
+              b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, array_idx, 3_f));
+        b.Return(func);
+    });
+
+    ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+    EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler2DArrayShadow t_s;
+void main() {
+  vec2 v = vec2(1.0f, 2.0f);
+  float x = texture(t_s, vec4(v, float(4u), 3.0f));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleCompare_2d_Array_Offset) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(ty.ptr(
+            handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2dArray)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+        auto* array_idx = b.Value(4_u);
+        auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, array_idx, 3_f,
+                               offset));
+        b.Return(func);
+    });
+
+    ASSERT_TRUE(Generate({}, ast::PipelineStage::kFragment)) << err_ << output_.glsl;
+    EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler2DArrayShadow t_s;
+void main() {
+  vec2 v = vec2(1.0f, 2.0f);
+  vec4 v_1 = vec4(v, float(4u), 3.0f);
+  vec2 v_2 = dFdx(v);
+  float x = textureGradOffset(t_s, v_1, v_2, dFdy(v), ivec2(4, 5));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleCompare_Cube) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(
+            ty.ptr(handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::kCube)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, 3_f));
+        b.Return(func);
+    });
+
+    ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+    EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp samplerCubeShadow t_s;
+void main() {
+  float x = texture(t_s, vec4(vec3(1.0f, 2.0f, 3.0f), 3.0f));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleCompare_Cube_Array) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(ty.ptr(
+            handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::kCubeArray)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+        auto* array_idx = b.Value(4_u);
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x",
+              b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, array_idx, 3_f));
+        b.Return(func);
+    });
+
+    Options opts{};
+    opts.version = Version(Version::Standard::kDesktop, 4, 6);
+    ASSERT_TRUE(Generate(opts)) << err_ << output_.glsl;
+    EXPECT_EQ(output_.glsl, R"(#version 460
+precision highp float;
+precision highp int;
+
+uniform highp samplerCubeArrayShadow t_s;
+void main() {
+  vec3 v = vec3(1.0f, 2.0f, 3.0f);
+  float x = texture(t_s, vec4(v, float(4u)), 3.0f);
+}
+)");
+}
+
 }  // namespace
 }  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/writer/raise/texture_polyfill.cc b/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
index 179262f..0c7a821 100644
--- a/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
+++ b/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
@@ -138,6 +138,9 @@
                 case core::BuiltinFn::kTextureSampleBias:
                     TextureSampleBias(call);
                     break;
+                case core::BuiltinFn::kTextureSampleCompare:
+                    TextureSampleCompare(call);
+                    break;
                 case core::BuiltinFn::kTextureSampleGrad:
                     TextureSampleGrad(call);
                     break;
@@ -147,7 +150,6 @@
                 case core::BuiltinFn::kTextureStore:
                     TextureStore(call);
                     break;
-                case core::BuiltinFn::kTextureSampleCompare:
                 case core::BuiltinFn::kTextureSampleCompareLevel:
                 default:
                     TINT_UNREACHABLE() << "TODO(dsinclair): " << call->Func();
@@ -811,6 +813,9 @@
 
             auto fn = glsl::BuiltinFn::kTexture;
             if (idx < args.Length()) {
+                // In GLSL ES `textureOffset` does not support depth 2d array textures. In order to
+                // support this texture we polyfill with a `textureGradOffset` and explicitly
+                // calculate the `dPdx` and `dPdy` values.
                 if (is_depth && is_array) {
                     fn = glsl::BuiltinFn::kTextureGradOffset;
 
@@ -1020,6 +1025,81 @@
         });
         call->Destroy();
     }
+
+    void TextureSampleCompare(core::ir::BuiltinCall* call) {
+        auto args = call->Args();
+        b.InsertBefore(call, [&] {
+            Vector<core::ir::Value*, 4> params;
+
+            uint32_t idx = 0;
+            uint32_t tex_arg = idx++;
+            uint32_t sampler_arg = idx++;
+
+            auto* tex = GetNewTexture(args[tex_arg], args[sampler_arg]);
+            auto* tex_type = tex->Type()->As<core::type::Texture>();
+            TINT_ASSERT(tex_type);
+
+            params.Push(tex);
+
+            bool is_array = false;
+
+            core::ir::Value* coords = args[idx++];
+            switch (tex_type->Dim()) {
+                case core::type::TextureDimension::k2d:
+                    coords = b.Construct(ty.vec3<f32>(), coords, args[idx++])->Result(0);
+                    params.Push(coords);
+
+                    break;
+                case core::type::TextureDimension::k2dArray: {
+                    is_array = true;
+
+                    Vector<core::ir::Value*, 3> new_coords;
+                    new_coords.Push(coords);
+                    new_coords.Push(b.Convert<f32>(args[idx++])->Result(0));
+                    new_coords.Push(b.Value(args[idx++]));
+
+                    params.Push(b.Construct(ty.vec4<f32>(), new_coords)->Result(0));
+                    break;
+                }
+                case core::type::TextureDimension::kCube:
+                    coords = b.Construct(ty.vec4<f32>(), coords, args[idx++])->Result(0);
+                    params.Push(coords);
+                    break;
+                case core::type::TextureDimension::kCubeArray:
+                    is_array = true;
+                    params.Push(b.Construct(ty.vec4<f32>(), coords, b.Convert<f32>(args[idx++]))
+                                    ->Result(0));
+
+                    params.Push(b.Value(args[idx++]));
+                    break;
+                default:
+                    TINT_UNREACHABLE();
+            }
+
+            auto fn = glsl::BuiltinFn::kTexture;
+            if (idx < args.Length()) {
+                // In GLSL ES `textureOffset` does not support depth 2d array textures. In order to
+                // support this texture we polyfill with a `textureGradOffset` and explicitly
+                // calculate the `dPdx` and `dPdy` values.
+                if (is_array) {
+                    fn = glsl::BuiltinFn::kTextureGradOffset;
+
+                    auto* dpdx = b.Call(coords->Type(), core::BuiltinFn::kDpdx, coords);
+                    auto* dpdy = b.Call(coords->Type(), core::BuiltinFn::kDpdy, coords);
+
+                    params.Push(dpdx->Result(0));
+                    params.Push(dpdy->Result(0));
+                } else {
+                    fn = glsl::BuiltinFn::kTextureOffset;
+                }
+
+                params.Push(args[idx++]);
+            }
+
+            b.CallWithResult<glsl::ir::BuiltinCall>(call->DetachResult(), fn, params);
+        });
+        call->Destroy();
+    }
 };
 
 }  // namespace
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 a02a1f7..7bc6a18 100644
--- a/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc
+++ b/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc
@@ -5274,5 +5274,456 @@
     EXPECT_EQ(expect, str());
 }
 
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleCompare_2d) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(
+            ty.ptr(handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2d)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, 3_f));
+        b.Return(func);
+    });
+
+    auto* src = R"(
+$B1: {  # root
+  %1:ptr<handle, texture_depth_2d, read> = var @binding_point(0, 0)
+  %2:ptr<handle, sampler_comparison, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %4:vec2<f32> = construct 1.0f, 2.0f
+    %5:texture_depth_2d = load %1
+    %6:sampler_comparison = load %2
+    %7:f32 = textureSampleCompare %5, %6, %4, 3.0f
+    %x:f32 = let %7
+    ret
+  }
+}
+)";
+    ASSERT_EQ(src, str());
+
+    auto* expect = R"(
+$B1: {  # root
+  %my_tex:ptr<handle, texture_depth_2d, read> = var
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %3:vec2<f32> = construct 1.0f, 2.0f
+    %4:texture_depth_2d = load %my_tex
+    %5:vec3<f32> = construct %3, 3.0f
+    %6:f32 = glsl.texture %4, %5
+    %x:f32 = let %6
+    ret
+  }
+}
+)";
+
+    capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+    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());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleCompare_2d_Offset) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(
+            ty.ptr(handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2d)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+        auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, 3_f, offset));
+        b.Return(func);
+    });
+
+    auto* src = R"(
+$B1: {  # root
+  %1:ptr<handle, texture_depth_2d, read> = var @binding_point(0, 0)
+  %2:ptr<handle, sampler_comparison, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %4:vec2<f32> = construct 1.0f, 2.0f
+    %5:texture_depth_2d = load %1
+    %6:sampler_comparison = load %2
+    %7:f32 = textureSampleCompare %5, %6, %4, 3.0f, vec2<i32>(4i, 5i)
+    %x:f32 = let %7
+    ret
+  }
+}
+)";
+    ASSERT_EQ(src, str());
+
+    auto* expect = R"(
+$B1: {  # root
+  %my_tex:ptr<handle, texture_depth_2d, read> = var
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %3:vec2<f32> = construct 1.0f, 2.0f
+    %4:texture_depth_2d = load %my_tex
+    %5:vec3<f32> = construct %3, 3.0f
+    %6:f32 = glsl.textureOffset %4, %5, vec2<i32>(4i, 5i)
+    %x:f32 = let %6
+    ret
+  }
+}
+)";
+
+    capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+    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());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleCompare_2d_Array) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(ty.ptr(
+            handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2dArray)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+        auto* array_idx = b.Value(4_u);
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x",
+              b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, array_idx, 3_f));
+        b.Return(func);
+    });
+
+    auto* src = R"(
+$B1: {  # root
+  %1:ptr<handle, texture_depth_2d_array, read> = var @binding_point(0, 0)
+  %2:ptr<handle, sampler_comparison, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %4:vec2<f32> = construct 1.0f, 2.0f
+    %5:texture_depth_2d_array = load %1
+    %6:sampler_comparison = load %2
+    %7:f32 = textureSampleCompare %5, %6, %4, 4u, 3.0f
+    %x:f32 = let %7
+    ret
+  }
+}
+)";
+    ASSERT_EQ(src, str());
+
+    auto* expect = R"(
+$B1: {  # root
+  %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %3:vec2<f32> = construct 1.0f, 2.0f
+    %4:texture_depth_2d_array = load %my_tex
+    %5:f32 = convert 4u
+    %6:vec4<f32> = construct %3, %5, 3.0f
+    %7:f32 = glsl.texture %4, %6
+    %x:f32 = let %7
+    ret
+  }
+}
+)";
+
+    capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+    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());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleCompare_2d_Array_Offset) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(ty.ptr(
+            handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2dArray)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+        auto* array_idx = b.Value(4_u);
+        auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, array_idx, 3_f,
+                               offset));
+        b.Return(func);
+    });
+
+    auto* src = R"(
+$B1: {  # root
+  %1:ptr<handle, texture_depth_2d_array, read> = var @binding_point(0, 0)
+  %2:ptr<handle, sampler_comparison, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %4:vec2<f32> = construct 1.0f, 2.0f
+    %5:texture_depth_2d_array = load %1
+    %6:sampler_comparison = load %2
+    %7:f32 = textureSampleCompare %5, %6, %4, 4u, 3.0f, vec2<i32>(4i, 5i)
+    %x:f32 = let %7
+    ret
+  }
+}
+)";
+    ASSERT_EQ(src, str());
+
+    auto* expect = R"(
+$B1: {  # root
+  %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %3:vec2<f32> = construct 1.0f, 2.0f
+    %4:texture_depth_2d_array = load %my_tex
+    %5:f32 = convert 4u
+    %6:vec4<f32> = construct %3, %5, 3.0f
+    %7:vec2<f32> = dpdx %3
+    %8:vec2<f32> = dpdy %3
+    %9:f32 = glsl.textureGradOffset %4, %6, %7, %8, vec2<i32>(4i, 5i)
+    %x:f32 = let %9
+    ret
+  }
+}
+)";
+
+    capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+    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());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleCompare_Cube) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(
+            ty.ptr(handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::kCube)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, 3_f));
+        b.Return(func);
+    });
+
+    auto* src = R"(
+$B1: {  # root
+  %1:ptr<handle, texture_depth_cube, read> = var @binding_point(0, 0)
+  %2:ptr<handle, sampler_comparison, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %4:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+    %5:texture_depth_cube = load %1
+    %6:sampler_comparison = load %2
+    %7:f32 = textureSampleCompare %5, %6, %4, 3.0f
+    %x:f32 = let %7
+    ret
+  }
+}
+)";
+    ASSERT_EQ(src, str());
+
+    auto* expect = R"(
+$B1: {  # root
+  %my_tex:ptr<handle, texture_depth_cube, read> = var
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+    %4:texture_depth_cube = load %my_tex
+    %5:vec4<f32> = construct %3, 3.0f
+    %6:f32 = glsl.texture %4, %5
+    %x:f32 = let %6
+    ret
+  }
+}
+)";
+
+    capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+    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());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleCompare_Cube_Array) {
+    core::ir::Var* tex = nullptr;
+    core::ir::Var* sampler = nullptr;
+    b.Append(b.ir.root_block, [&] {
+        tex = b.Var(ty.ptr(
+            handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::kCubeArray)));
+        tex->SetBindingPoint(0, 0);
+
+        sampler = b.Var(ty.ptr(
+            handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kComparisonSampler)));
+        sampler->SetBindingPoint(0, 1);
+    });
+
+    auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+    b.Append(func->Block(), [&] {
+        auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+        auto* array_idx = b.Value(4_u);
+
+        auto* t = b.Load(tex);
+        auto* s = b.Load(sampler);
+        b.Let("x",
+              b.Call<f32>(core::BuiltinFn::kTextureSampleCompare, t, s, coords, array_idx, 3_f));
+        b.Return(func);
+    });
+
+    auto* src = R"(
+$B1: {  # root
+  %1:ptr<handle, texture_depth_cube_array, read> = var @binding_point(0, 0)
+  %2:ptr<handle, sampler_comparison, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %4:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+    %5:texture_depth_cube_array = load %1
+    %6:sampler_comparison = load %2
+    %7:f32 = textureSampleCompare %5, %6, %4, 4u, 3.0f
+    %x:f32 = let %7
+    ret
+  }
+}
+)";
+    ASSERT_EQ(src, str());
+
+    auto* expect = R"(
+$B1: {  # root
+  %my_tex:ptr<handle, texture_depth_cube_array, read> = var
+}
+
+%foo = @fragment func():void {
+  $B2: {
+    %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+    %4:texture_depth_cube_array = load %my_tex
+    %5:f32 = convert 4u
+    %6:vec4<f32> = construct %3, %5
+    %7:f32 = glsl.texture %4, %6, 3.0f
+    %x:f32 = let %7
+    ret
+  }
+}
+)";
+
+    capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+    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());
+}
+
 }  // namespace
 }  // namespace tint::glsl::writer::raise
diff --git a/test/tint/benchmark/shadow-fragment.wgsl.expected.ir.glsl b/test/tint/benchmark/shadow-fragment.wgsl.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/benchmark/shadow-fragment.wgsl.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.ir.glsl
index 29c0278..a4bc31f 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 460
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+float textureSampleCompare_1912e5() {
+  float res = texture(arg_0_arg_1, vec4(vec3(1.0f), float(1u)), 1.0f);
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_1912e5();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.ir.glsl
index 29c0278..f2e3a60 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DShadow arg_0_arg_1;
+float textureSampleCompare_3a5923() {
+  float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 1.0f));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_3a5923();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.ir.glsl
index 29c0278..a49d440 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp samplerCubeShadow arg_0_arg_1;
+float textureSampleCompare_63fb83() {
+  float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 1.0f));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_63fb83();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.ir.glsl
index 29c0278..6d65908 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.ir.glsl
@@ -1,11 +1,18 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+float textureSampleCompare_7b5025() {
+  vec4 v_1 = vec4(vec2(1.0f), float(1u), 1.0f);
+  vec2 v_2 = dFdx(vec2(1.0f));
+  float res = textureGradOffset(arg_0_arg_1, v_1, v_2, dFdy(vec2(1.0f)), ivec2(1));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_7b5025();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.ir.glsl
index 29c0278..ce57f63 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+float textureSampleCompare_90ae56() {
+  float res = texture(arg_0_arg_1, vec4(vec2(1.0f), float(1u), 1.0f));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_90ae56();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.ir.glsl
index 29c0278..3384345 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 460
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+float textureSampleCompare_a3ca7e() {
+  float res = texture(arg_0_arg_1, vec4(vec3(1.0f), float(1)), 1.0f);
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_a3ca7e();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.ir.glsl
index 29c0278..587a30d 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.ir.glsl
@@ -1,11 +1,18 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+float textureSampleCompare_af1051() {
+  vec4 v_1 = vec4(vec2(1.0f), float(1), 1.0f);
+  vec2 v_2 = dFdx(vec2(1.0f));
+  float res = textureGradOffset(arg_0_arg_1, v_1, v_2, dFdy(vec2(1.0f)), ivec2(1));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_af1051();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.ir.glsl
index 29c0278..b253e2f 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+float textureSampleCompare_dd431d() {
+  float res = texture(arg_0_arg_1, vec4(vec2(1.0f), float(1), 1.0f));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_dd431d();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.ir.glsl
index 29c0278..ad06433 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DShadow arg_0_arg_1;
+float textureSampleCompare_dec064() {
+  float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 1.0f), ivec2(1));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_dec064();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.ir.glsl
index 29c0278..53a075e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.ir.glsl
@@ -1,11 +1,21 @@
-SKIP: FAILED
+#version 460
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+float textureSampleCompare_1912e5() {
+  vec3 arg_2 = vec3(1.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec3 v_1 = arg_2;
+  float v_2 = arg_4;
+  float res = texture(arg_0_arg_1, vec4(v_1, float(arg_3)), v_2);
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_1912e5();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.ir.glsl
index 29c0278..fa76057 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.ir.glsl
@@ -1,11 +1,18 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DShadow arg_0_arg_1;
+float textureSampleCompare_3a5923() {
+  vec2 arg_2 = vec2(1.0f);
+  float arg_3 = 1.0f;
+  float res = texture(arg_0_arg_1, vec3(arg_2, arg_3));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_3a5923();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.ir.glsl
index 29c0278..81976a9 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.ir.glsl
@@ -1,11 +1,18 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp samplerCubeShadow arg_0_arg_1;
+float textureSampleCompare_63fb83() {
+  vec3 arg_2 = vec3(1.0f);
+  float arg_3 = 1.0f;
+  float res = texture(arg_0_arg_1, vec4(arg_2, arg_3));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_63fb83();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.ir.glsl
index 29c0278..45e5065 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.ir.glsl
@@ -1,11 +1,23 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+float textureSampleCompare_7b5025() {
+  vec2 arg_2 = vec2(1.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec2 v_1 = arg_2;
+  float v_2 = arg_4;
+  vec4 v_3 = vec4(v_1, float(arg_3), v_2);
+  vec2 v_4 = dFdx(v_1);
+  float res = textureGradOffset(arg_0_arg_1, v_3, v_4, dFdy(v_1), ivec2(1));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_7b5025();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.ir.glsl
index 29c0278..0928af8 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.ir.glsl
@@ -1,11 +1,21 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+float textureSampleCompare_90ae56() {
+  vec2 arg_2 = vec2(1.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec2 v_1 = arg_2;
+  float v_2 = arg_4;
+  float res = texture(arg_0_arg_1, vec4(v_1, float(arg_3), v_2));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_90ae56();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.glsl
index 29c0278..cfe9ea6 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.glsl
@@ -1,11 +1,21 @@
-SKIP: FAILED
+#version 460
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+float textureSampleCompare_a3ca7e() {
+  vec3 arg_2 = vec3(1.0f);
+  int arg_3 = 1;
+  float arg_4 = 1.0f;
+  vec3 v_1 = arg_2;
+  float v_2 = arg_4;
+  float res = texture(arg_0_arg_1, vec4(v_1, float(arg_3)), v_2);
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_a3ca7e();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.glsl
index 29c0278..91ba3eb 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.glsl
@@ -1,11 +1,23 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+float textureSampleCompare_af1051() {
+  vec2 arg_2 = vec2(1.0f);
+  int arg_3 = 1;
+  float arg_4 = 1.0f;
+  vec2 v_1 = arg_2;
+  float v_2 = arg_4;
+  vec4 v_3 = vec4(v_1, float(arg_3), v_2);
+  vec2 v_4 = dFdx(v_1);
+  float res = textureGradOffset(arg_0_arg_1, v_3, v_4, dFdy(v_1), ivec2(1));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_af1051();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.glsl
index 29c0278..9f81c32 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.glsl
@@ -1,11 +1,21 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+float textureSampleCompare_dd431d() {
+  vec2 arg_2 = vec2(1.0f);
+  int arg_3 = 1;
+  float arg_4 = 1.0f;
+  vec2 v_1 = arg_2;
+  float v_2 = arg_4;
+  float res = texture(arg_0_arg_1, vec4(v_1, float(arg_3), v_2));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_dd431d();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.ir.glsl
index 29c0278..cf5743e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.ir.glsl
@@ -1,11 +1,18 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  float tint_symbol;
+} v;
+uniform highp sampler2DShadow arg_0_arg_1;
+float textureSampleCompare_dec064() {
+  vec2 arg_2 = vec2(1.0f);
+  float arg_3 = 1.0f;
+  float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(1));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureSampleCompare_dec064();
+}
diff --git a/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/ImageSampleImplicitLod_BothDrefAndNonDref_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageSampleImplicitLod_BothDrefAndNonDref_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.ir.glsl
deleted file mode 100644
index 0f5dc88..0000000
--- a/test/tint/unittest/reader/spirv/ImageSampleImplicitLod_BothDrefAndNonDref_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSample
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/ImageSampleProjDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageSampleProjDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/unittest/reader/spirv/ImageSampleProjDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/ImageSampleProjDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageSampleProjDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/unittest/reader/spirv/ImageSampleProjDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_4.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_4.spvasm.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_4.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_8.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_8.spvasm.expected.ir.glsl
deleted file mode 100644
index 29c0278..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_8.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1468 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureSampleCompare
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap