[spirv-reader] Add FMul
Bug: tint:3 Change-Id: I2f7f9f451889d394b22bc297d511ee5fe92b7a85 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19502 Reviewed-by: dan sinclair <dsinclair@google.com>
This commit is contained in:
parent
31d9036769
commit
5ef27afbfb
|
@ -44,6 +44,8 @@ ast::BinaryOp ConvertBinaryOp(SpvOp opcode) {
|
|||
return ast::BinaryOp::kAdd;
|
||||
case SpvOpFSub:
|
||||
return ast::BinaryOp::kSubtract;
|
||||
case SpvOpFMul:
|
||||
return ast::BinaryOp::kMultiply;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -213,6 +213,18 @@ INSTANTIATE_TEST_SUITE_P(
|
|||
"__vec_2__f32", AstFor("v2float_50_60"), "subtract",
|
||||
AstFor("v2float_60_50")}));
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SpvParserTest_FMul,
|
||||
SpvBinaryTest,
|
||||
::testing::Values(
|
||||
// Scalar float
|
||||
BinaryData{"float", "float_50", "OpFMul", "float_60", "__f32",
|
||||
"ScalarConstructor{50.000000}", "multiply",
|
||||
"ScalarConstructor{60.000000}"},
|
||||
// Vector float
|
||||
BinaryData{"v2float", "v2float_50_60", "OpFMul", "v2float_60_50",
|
||||
"__vec_2__f32", AstFor("v2float_50_60"), "multiply",
|
||||
AstFor("v2float_60_50")}));
|
||||
|
||||
} // namespace
|
||||
} // namespace spirv
|
||||
|
|
Loading…
Reference in New Issue