diff --git a/src/ast/intrinsic_texture_helper_test.cc b/src/ast/intrinsic_texture_helper_test.cc index d71b1d3581..84a5f1f5eb 100644 --- a/src/ast/intrinsic_texture_helper_test.cc +++ b/src/ast/intrinsic_texture_helper_test.cc @@ -190,7 +190,6 @@ ast::Variable* TextureOverloadCase::buildTextureVariable( ast::Variable* TextureOverloadCase::buildSamplerVariable( ast::Builder* b) const { - VariableDecorationList decos = { b->create(0), b->create(1), @@ -1422,7 +1421,7 @@ std::vector TextureOverloadCase::ValidCases() { }, }, { - ValidTextureOverload::kSampleGradDepth2dF32, + ValidTextureOverload::kSampleCompareDepth2dF32, "textureSampleCompare(t : texture_depth_2d,\n" " s : sampler_comparison,\n" " coords : vec2,\n" @@ -1440,7 +1439,7 @@ std::vector TextureOverloadCase::ValidCases() { }, }, { - ValidTextureOverload::kSampleGradDepth2dOffsetF32, + ValidTextureOverload::kSampleCompareDepth2dOffsetF32, "textureSampleCompare(t : texture_depth_2d,\n" " s : sampler_comparison,\n" " coords : vec2,\n" @@ -1460,7 +1459,7 @@ std::vector TextureOverloadCase::ValidCases() { }, }, { - ValidTextureOverload::kSampleGradDepth2dArrayF32, + ValidTextureOverload::kSampleCompareDepth2dArrayF32, "textureSampleCompare(t : texture_depth_2d_array,\n" " s : sampler_comparison,\n" " coords : vec2,\n" @@ -1480,7 +1479,7 @@ std::vector TextureOverloadCase::ValidCases() { }, }, { - ValidTextureOverload::kSampleGradDepth2dArrayOffsetF32, + ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32, "textureSampleCompare(t : texture_depth_2d_array,\n" " s : sampler_comparison,\n" " coords : vec2,\n" @@ -1502,7 +1501,7 @@ std::vector TextureOverloadCase::ValidCases() { }, }, { - ValidTextureOverload::kSampleGradDepthCubeF32, + ValidTextureOverload::kSampleCompareDepthCubeF32, "textureSampleCompare(t : texture_depth_cube,\n" " s : sampler_comparison,\n" " coords : vec3,\n" @@ -1520,7 +1519,7 @@ std::vector TextureOverloadCase::ValidCases() { }, }, { - ValidTextureOverload::kSampleGradDepthCubeArrayF32, + ValidTextureOverload::kSampleCompareDepthCubeArrayF32, "textureSampleCompare(t : texture_depth_cube_array,\n" " s : sampler_comparison,\n" " coords : vec3,\n" diff --git a/src/ast/intrinsic_texture_helper_test.h b/src/ast/intrinsic_texture_helper_test.h index fd2d17e94a..07a1eee56d 100644 --- a/src/ast/intrinsic_texture_helper_test.h +++ b/src/ast/intrinsic_texture_helper_test.h @@ -114,12 +114,12 @@ enum class ValidTextureOverload { kSampleGrad3dOffsetF32, kSampleGradCubeF32, kSampleGradCubeArrayF32, - kSampleGradDepth2dF32, - kSampleGradDepth2dOffsetF32, - kSampleGradDepth2dArrayF32, - kSampleGradDepth2dArrayOffsetF32, - kSampleGradDepthCubeF32, - kSampleGradDepthCubeArrayF32, + kSampleCompareDepth2dF32, + kSampleCompareDepth2dOffsetF32, + kSampleCompareDepth2dArrayF32, + kSampleCompareDepth2dArrayOffsetF32, + kSampleCompareDepthCubeF32, + kSampleCompareDepthCubeArrayF32, kLoad1dF32, kLoad1dU32, kLoad1dI32, diff --git a/src/type_determiner_test.cc b/src/type_determiner_test.cc index 87f6ed0adc..df295aee7d 100644 --- a/src/type_determiner_test.cc +++ b/src/type_determiner_test.cc @@ -3030,17 +3030,17 @@ const char* expected_texture_overload( return R"(textureSampleGrad(texture, sampler, coords, ddx, ddy))"; case ValidTextureOverload::kSampleGradCubeArrayF32: return R"(textureSampleGrad(texture, sampler, coords, array_index, ddx, ddy))"; - case ValidTextureOverload::kSampleGradDepth2dF32: + case ValidTextureOverload::kSampleCompareDepth2dF32: return R"(textureSampleCompare(texture, sampler, coords, depth_ref))"; - case ValidTextureOverload::kSampleGradDepth2dOffsetF32: + case ValidTextureOverload::kSampleCompareDepth2dOffsetF32: return R"(textureSampleCompare(texture, sampler, coords, depth_ref, offset))"; - case ValidTextureOverload::kSampleGradDepth2dArrayF32: + case ValidTextureOverload::kSampleCompareDepth2dArrayF32: return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))"; - case ValidTextureOverload::kSampleGradDepth2dArrayOffsetF32: + case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32: return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref, offset))"; - case ValidTextureOverload::kSampleGradDepthCubeF32: + case ValidTextureOverload::kSampleCompareDepthCubeF32: return R"(textureSampleCompare(texture, sampler, coords, depth_ref))"; - case ValidTextureOverload::kSampleGradDepthCubeArrayF32: + case ValidTextureOverload::kSampleCompareDepthCubeArrayF32: return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))"; case ValidTextureOverload::kLoad1dF32: return R"(textureLoad(texture, coords))"; diff --git a/src/writer/hlsl/generator_impl_intrinsic_texture_test.cc b/src/writer/hlsl/generator_impl_intrinsic_texture_test.cc index bd4029b182..e5b5ee2eb4 100644 --- a/src/writer/hlsl/generator_impl_intrinsic_texture_test.cc +++ b/src/writer/hlsl/generator_impl_intrinsic_texture_test.cc @@ -203,17 +203,17 @@ ExpectedResult expected_texture_overload( return R"(texture_tint_0.SampleGrad(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f)))"; case ValidTextureOverload::kSampleGradCubeArrayF32: return R"(texture_tint_0.SampleGrad(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4)), float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f)))"; - case ValidTextureOverload::kSampleGradDepth2dF32: + case ValidTextureOverload::kSampleCompareDepth2dF32: return R"(texture_tint_0.SampleCmp(sampler_tint_0, float2(1.0f, 2.0f), 3.0f))"; - case ValidTextureOverload::kSampleGradDepth2dOffsetF32: + case ValidTextureOverload::kSampleCompareDepth2dOffsetF32: return R"(texture_tint_0.SampleCmp(sampler_tint_0, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))"; - case ValidTextureOverload::kSampleGradDepth2dArrayF32: + case ValidTextureOverload::kSampleCompareDepth2dArrayF32: return R"(texture_tint_0.SampleCmp(sampler_tint_0, float3(1.0f, 2.0f, float(4)), 3.0f))"; - case ValidTextureOverload::kSampleGradDepth2dArrayOffsetF32: + case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32: return R"(texture_tint_0.SampleCmp(sampler_tint_0, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6)))"; - case ValidTextureOverload::kSampleGradDepthCubeF32: + case ValidTextureOverload::kSampleCompareDepthCubeF32: return R"(texture_tint_0.SampleCmp(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))"; - case ValidTextureOverload::kSampleGradDepthCubeArrayF32: + case ValidTextureOverload::kSampleCompareDepthCubeArrayF32: return R"(texture_tint_0.SampleCmp(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))"; case ValidTextureOverload::kLoad1dF32: return R"(texture_tint_0.Load(int2(1, 0)))"; diff --git a/src/writer/msl/generator_impl_intrinsic_texture_test.cc b/src/writer/msl/generator_impl_intrinsic_texture_test.cc index fcc6bbe9f9..3955bedc4e 100644 --- a/src/writer/msl/generator_impl_intrinsic_texture_test.cc +++ b/src/writer/msl/generator_impl_intrinsic_texture_test.cc @@ -163,17 +163,17 @@ std::string expected_texture_overload( return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), gradientcube(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))))"; case ValidTextureOverload::kSampleGradCubeArrayF32: return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4, gradientcube(float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f))))"; - case ValidTextureOverload::kSampleGradDepth2dF32: + case ValidTextureOverload::kSampleCompareDepth2dF32: return R"(texture_tint_0.sample_compare(sampler_tint_0, float2(1.0f, 2.0f), 3.0f))"; - case ValidTextureOverload::kSampleGradDepth2dOffsetF32: + case ValidTextureOverload::kSampleCompareDepth2dOffsetF32: return R"(texture_tint_0.sample_compare(sampler_tint_0, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))"; - case ValidTextureOverload::kSampleGradDepth2dArrayF32: + case ValidTextureOverload::kSampleCompareDepth2dArrayF32: return R"(texture_tint_0.sample_compare(sampler_tint_0, float2(1.0f, 2.0f), 4, 3.0f))"; - case ValidTextureOverload::kSampleGradDepth2dArrayOffsetF32: + case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32: return R"(texture_tint_0.sample_compare(sampler_tint_0, float2(1.0f, 2.0f), 4, 3.0f, int2(5, 6)))"; - case ValidTextureOverload::kSampleGradDepthCubeF32: + case ValidTextureOverload::kSampleCompareDepthCubeF32: return R"(texture_tint_0.sample_compare(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))"; - case ValidTextureOverload::kSampleGradDepthCubeArrayF32: + case ValidTextureOverload::kSampleCompareDepthCubeArrayF32: return R"(texture_tint_0.sample_compare(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))"; case ValidTextureOverload::kLoad1dF32: return R"(texture_tint_0.read(1))"; diff --git a/src/writer/spirv/builder_intrinsic_texture_test.cc b/src/writer/spirv/builder_intrinsic_texture_test.cc index d9e648ecc3..c65fb9638e 100644 --- a/src/writer/spirv/builder_intrinsic_texture_test.cc +++ b/src/writer/spirv/builder_intrinsic_texture_test.cc @@ -2144,7 +2144,7 @@ OpCapability SampledCubeArray R"( OpCapability SampledCubeArray )"}; - case ValidTextureOverload::kSampleGradDepth2dF32: + case ValidTextureOverload::kSampleCompareDepth2dF32: return { R"( %4 = OpTypeFloat 32 @@ -2170,7 +2170,7 @@ OpCapability SampledCubeArray )", R"( )"}; - case ValidTextureOverload::kSampleGradDepth2dOffsetF32: + case ValidTextureOverload::kSampleCompareDepth2dOffsetF32: return { R"( %4 = OpTypeFloat 32 @@ -2201,7 +2201,7 @@ OpCapability SampledCubeArray )", R"( )"}; - case ValidTextureOverload::kSampleGradDepth2dArrayF32: + case ValidTextureOverload::kSampleCompareDepth2dArrayF32: return { R"( %4 = OpTypeFloat 32 @@ -2230,7 +2230,7 @@ OpCapability SampledCubeArray )", R"( )"}; - case ValidTextureOverload::kSampleGradDepth2dArrayOffsetF32: + case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32: return { R"( %4 = OpTypeFloat 32 @@ -2263,7 +2263,7 @@ OpCapability SampledCubeArray )", R"( )"}; - case ValidTextureOverload::kSampleGradDepthCubeF32: + case ValidTextureOverload::kSampleCompareDepthCubeF32: return { R"( %4 = OpTypeFloat 32 @@ -2290,7 +2290,7 @@ OpCapability SampledCubeArray )", R"( )"}; - case ValidTextureOverload::kSampleGradDepthCubeArrayF32: + case ValidTextureOverload::kSampleCompareDepthCubeArrayF32: return { R"( %4 = OpTypeFloat 32