intrinsics: textureDimensions for cubes return vec2

See: https://github.com/gpuweb/gpuweb/pull/1754

Fixed: tint:882
Change-Id: Ibb48722dbaf6a7b200158bb87bc71c282056ed5e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55259
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
Ben Clayton
2021-06-21 16:44:26 +00:00
committed by Tint LUCI CQ
parent 663271dca4
commit b96ed7bda4
95 changed files with 923 additions and 952 deletions

View File

@@ -1969,16 +1969,16 @@ TEST_P(ResolverIntrinsicTest_Texture, Call) {
EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
break;
case ast::TextureDimension::k2d:
case ast::TextureDimension::k2dArray: {
case ast::TextureDimension::k2dArray:
case ast::TextureDimension::kCube:
case ast::TextureDimension::kCubeArray: {
auto* vec = As<sem::Vector>(TypeOf(call));
ASSERT_NE(vec, nullptr);
EXPECT_EQ(vec->size(), 2u);
EXPECT_TRUE(vec->type()->Is<sem::I32>());
break;
}
case ast::TextureDimension::k3d:
case ast::TextureDimension::kCube:
case ast::TextureDimension::kCubeArray: {
case ast::TextureDimension::k3d: {
auto* vec = As<sem::Vector>(TypeOf(call));
ASSERT_NE(vec, nullptr);
EXPECT_EQ(vec->size(), 3u);