Remove outerProduct.

The community decided to remove outerProduct from WGSL. This Cl removes
the pieces from Tint.

Change-Id: Ib1735867e4a7ca852a72549fc8c9bd86e8de22b0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37600
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
dan sinclair
2021-01-12 22:00:58 +00:00
committed by Commit Bot service account
parent 8f4784006e
commit 1c200cffd0
13 changed files with 25 additions and 319 deletions

View File

@@ -472,8 +472,6 @@ ast::Intrinsic GetIntrinsic(SpvOp opcode) {
return ast::Intrinsic::kReverseBits;
case SpvOpDot:
return ast::Intrinsic::kDot;
case SpvOpOuterProduct:
return ast::Intrinsic::kOuterProduct;
default:
break;
}

View File

@@ -1099,38 +1099,6 @@ TEST_F(SpvBinaryArithTestBasic, Dot) {
<< ToString(p->get_module(), fe.ast_body());
}
TEST_F(SpvBinaryArithTestBasic, OuterProduct) {
const auto assembly = CommonTypes() + R"(
%100 = OpFunction %void None %voidfn
%entry = OpLabel
%1 = OpCopyObject %v2float %v2float_50_60
%2 = OpCopyObject %v2float %v2float_60_50
%3 = OpOuterProduct %m2v2float %1 %2
OpReturn
OpFunctionEnd
)";
auto p = parser(test::Assemble(assembly));
ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << assembly;
FunctionEmitter fe(p.get(), *spirv_function(p.get(), 100));
EXPECT_TRUE(fe.EmitBody()) << p->error();
EXPECT_THAT(ToString(p->get_module(), fe.ast_body()),
HasSubstr(R"(VariableConst{
x_3
none
__mat_2_2__f32
{
Call[not set]{
Identifier[not set]{outerProduct}
(
Identifier[not set]{x_1}
Identifier[not set]{x_2}
)
}
}
})"))
<< ToString(p->get_module(), fe.ast_body());
}
// TODO(dneto): OpSRem. Missing from WGSL
// https://github.com/gpuweb/gpuweb/issues/702