intrinsics.def: Include access and storage in ptr errors
Some overload mismatches just make no sense without this Change-Id: I2827808ab7dfd9e2d179b5207da8ad3c2ce56d99 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55040 Reviewed-by: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
c82b733ff0
commit
53829a5e42
|
@ -320,7 +320,7 @@ std::string Mat::String(MatchState& state) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TypeMatcher for 'type ptr'
|
/// TypeMatcher for 'type ptr'
|
||||||
/// @see src/intrinsics.def:77:37
|
/// @see src/intrinsics.def:77:6
|
||||||
class Ptr : public TypeMatcher {
|
class Ptr : public TypeMatcher {
|
||||||
public:
|
public:
|
||||||
/// Checks whether the given type matches the matcher rules.
|
/// Checks whether the given type matches the matcher rules.
|
||||||
|
@ -361,9 +361,7 @@ std::string Ptr::String(MatchState& state) const {
|
||||||
const std::string S = state.NumName();
|
const std::string S = state.NumName();
|
||||||
const std::string T = state.TypeName();
|
const std::string T = state.TypeName();
|
||||||
const std::string A = state.NumName();
|
const std::string A = state.NumName();
|
||||||
std::stringstream ss;
|
return "ptr<" + S + ", " + T + ", " + A + ">";
|
||||||
ss << "ptr<" << T << ">";
|
|
||||||
return ss.str();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TypeMatcher for 'type array'
|
/// TypeMatcher for 'type array'
|
||||||
|
|
|
@ -74,7 +74,7 @@ type vec3<T>
|
||||||
type vec4<T>
|
type vec4<T>
|
||||||
[[display("vec{N}<{T}>")]] type vec<N: num, T>
|
[[display("vec{N}<{T}>")]] type vec<N: num, T>
|
||||||
[[display("mat{N}x{M}<{T}>")]] type mat<N: num, M: num, T>
|
[[display("mat{N}x{M}<{T}>")]] type mat<N: num, M: num, T>
|
||||||
[[display("ptr<{T}>")]] type ptr<S: storage_class, T, A: access>
|
type ptr<S: storage_class, T, A: access>
|
||||||
type array<T>
|
type array<T>
|
||||||
type sampler
|
type sampler
|
||||||
type sampler_comparison
|
type sampler_comparison
|
||||||
|
|
|
@ -794,7 +794,7 @@ TEST_F(ResolverIntrinsicDataTest, ArrayLength_Error_ArraySized) {
|
||||||
|
|
||||||
2 candidate functions:
|
2 candidate functions:
|
||||||
arrayLength(array<T>) -> u32
|
arrayLength(array<T>) -> u32
|
||||||
arrayLength(ptr<array<T>>) -> u32
|
arrayLength(ptr<storage, array<T>, A>) -> u32
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -857,8 +857,8 @@ TEST_F(ResolverIntrinsicDataTest, Frexp_Error_FirstParamInt) {
|
||||||
R"(error: no matching call to frexp(i32, ptr<workgroup, i32, read_write>)
|
R"(error: no matching call to frexp(i32, ptr<workgroup, i32, read_write>)
|
||||||
|
|
||||||
2 candidate functions:
|
2 candidate functions:
|
||||||
frexp(f32, ptr<T>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
frexp(f32, ptr<S, T, A>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
||||||
frexp(vecN<f32>, ptr<vecN<T>>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
frexp(vecN<f32>, ptr<S, vecN<T>, A>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -874,8 +874,8 @@ TEST_F(ResolverIntrinsicDataTest, Frexp_Error_SecondParamFloatPtr) {
|
||||||
R"(error: no matching call to frexp(f32, ptr<workgroup, f32, read_write>)
|
R"(error: no matching call to frexp(f32, ptr<workgroup, f32, read_write>)
|
||||||
|
|
||||||
2 candidate functions:
|
2 candidate functions:
|
||||||
frexp(f32, ptr<T>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
frexp(f32, ptr<S, T, A>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
||||||
frexp(vecN<f32>, ptr<vecN<T>>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
frexp(vecN<f32>, ptr<S, vecN<T>, A>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -888,8 +888,8 @@ TEST_F(ResolverIntrinsicDataTest, Frexp_Error_SecondParamNotAPointer) {
|
||||||
EXPECT_EQ(r()->error(), R"(error: no matching call to frexp(f32, i32)
|
EXPECT_EQ(r()->error(), R"(error: no matching call to frexp(f32, i32)
|
||||||
|
|
||||||
2 candidate functions:
|
2 candidate functions:
|
||||||
frexp(f32, ptr<T>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
frexp(f32, ptr<S, T, A>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
||||||
frexp(vecN<f32>, ptr<vecN<T>>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
frexp(vecN<f32>, ptr<S, vecN<T>, A>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -905,8 +905,8 @@ TEST_F(ResolverIntrinsicDataTest, Frexp_Error_VectorSizesDontMatch) {
|
||||||
R"(error: no matching call to frexp(vec2<f32>, ptr<workgroup, vec4<i32>, read_write>)
|
R"(error: no matching call to frexp(vec2<f32>, ptr<workgroup, vec4<i32>, read_write>)
|
||||||
|
|
||||||
2 candidate functions:
|
2 candidate functions:
|
||||||
frexp(f32, ptr<T>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
frexp(f32, ptr<S, T, A>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
||||||
frexp(vecN<f32>, ptr<vecN<T>>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
frexp(vecN<f32>, ptr<S, vecN<T>, A>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -945,8 +945,8 @@ TEST_F(ResolverIntrinsicDataTest, Modf_Error_FirstParamInt) {
|
||||||
R"(error: no matching call to modf(i32, ptr<workgroup, f32, read_write>)
|
R"(error: no matching call to modf(i32, ptr<workgroup, f32, read_write>)
|
||||||
|
|
||||||
2 candidate functions:
|
2 candidate functions:
|
||||||
modf(f32, ptr<f32>) -> f32 where: S is function, private or workgroup
|
modf(f32, ptr<S, f32, A>) -> f32 where: S is function, private or workgroup
|
||||||
modf(vecN<f32>, ptr<vecN<f32>>) -> vecN<f32> where: S is function, private or workgroup
|
modf(vecN<f32>, ptr<S, vecN<f32>, A>) -> vecN<f32> where: S is function, private or workgroup
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -962,8 +962,8 @@ TEST_F(ResolverIntrinsicDataTest, Modf_Error_SecondParamIntPtr) {
|
||||||
R"(error: no matching call to modf(f32, ptr<workgroup, i32, read_write>)
|
R"(error: no matching call to modf(f32, ptr<workgroup, i32, read_write>)
|
||||||
|
|
||||||
2 candidate functions:
|
2 candidate functions:
|
||||||
modf(f32, ptr<f32>) -> f32 where: S is function, private or workgroup
|
modf(f32, ptr<S, f32, A>) -> f32 where: S is function, private or workgroup
|
||||||
modf(vecN<f32>, ptr<vecN<f32>>) -> vecN<f32> where: S is function, private or workgroup
|
modf(vecN<f32>, ptr<S, vecN<f32>, A>) -> vecN<f32> where: S is function, private or workgroup
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -976,8 +976,8 @@ TEST_F(ResolverIntrinsicDataTest, Modf_Error_SecondParamNotAPointer) {
|
||||||
EXPECT_EQ(r()->error(), R"(error: no matching call to modf(f32, f32)
|
EXPECT_EQ(r()->error(), R"(error: no matching call to modf(f32, f32)
|
||||||
|
|
||||||
2 candidate functions:
|
2 candidate functions:
|
||||||
modf(f32, ptr<f32>) -> f32 where: S is function, private or workgroup
|
modf(f32, ptr<S, f32, A>) -> f32 where: S is function, private or workgroup
|
||||||
modf(vecN<f32>, ptr<vecN<f32>>) -> vecN<f32> where: S is function, private or workgroup
|
modf(vecN<f32>, ptr<S, vecN<f32>, A>) -> vecN<f32> where: S is function, private or workgroup
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -993,8 +993,8 @@ TEST_F(ResolverIntrinsicDataTest, Modf_Error_VectorSizesDontMatch) {
|
||||||
R"(error: no matching call to modf(vec2<f32>, ptr<workgroup, vec4<f32>, read_write>)
|
R"(error: no matching call to modf(vec2<f32>, ptr<workgroup, vec4<f32>, read_write>)
|
||||||
|
|
||||||
2 candidate functions:
|
2 candidate functions:
|
||||||
modf(vecN<f32>, ptr<vecN<f32>>) -> vecN<f32> where: S is function, private or workgroup
|
modf(vecN<f32>, ptr<S, vecN<f32>, A>) -> vecN<f32> where: S is function, private or workgroup
|
||||||
modf(f32, ptr<f32>) -> f32 where: S is function, private or workgroup
|
modf(f32, ptr<S, f32, A>) -> f32 where: S is function, private or workgroup
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue