diff --git a/src/resolver/intrinsic_validation_test.cc b/src/resolver/intrinsic_validation_test.cc index fef6915eea..6313ccca70 100644 --- a/src/resolver/intrinsic_validation_test.cc +++ b/src/resolver/intrinsic_validation_test.cc @@ -223,8 +223,7 @@ TEST_P(IntrinsicTextureSamplerValidationTest, GlobalConst) { EXPECT_FALSE(r()->Resolve()); std::stringstream err; err << "12:34 error: '" << param.function - << "' offset parameter must be provided as" - << " a literal or const_expr expression"; + << "' offset parameter must be a const_expression"; EXPECT_EQ(r()->error(), err.str()); } @@ -253,8 +252,7 @@ TEST_P(IntrinsicTextureSamplerValidationTest, ScalarConst) { EXPECT_FALSE(r()->Resolve()); std::stringstream err; err << "12:34 error: '" << param.function - << "' offset parameter must be provided as" - << " a literal or const_expr expression"; + << "' offset parameter must be a const_expression"; EXPECT_EQ(r()->error(), err.str()); } diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc index 35812c4d09..844d44445c 100644 --- a/src/resolver/resolver.cc +++ b/src/resolver/resolver.cc @@ -2479,10 +2479,9 @@ bool Resolver::ValidateTextureIntrinsicFunction( if (param->Is()) { auto values = ConstantValueOf(param); if (!values.IsValid()) { - AddError("'" + func_name + - "' offset parameter must be provided as a literal or " - "const_expr expression", - param->source()); + AddError( + "'" + func_name + "' offset parameter must be a const_expression", + param->source()); return false; } if (!values.Type()->Is() || @@ -2503,10 +2502,9 @@ bool Resolver::ValidateTextureIntrinsicFunction( } } } else { - AddError("'" + func_name + - "' offset parameter must be provided as a literal or " - "const_expr expression", - param->source()); + AddError( + "'" + func_name + "' offset parameter must be a const_expression", + param->source()); return false; } }