[spirv-reader] Add INotEqual
Bug: tint:3 Change-Id: I5de89c15dfdcab1b454e2698244f51b0e2deb4ab Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19541 Reviewed-by: dan sinclair <dsinclair@google.com>
This commit is contained in:
parent
bd2965858a
commit
11d9ac1ee1
|
@ -50,6 +50,8 @@ ast::BinaryOp ConvertBinaryOp(SpvOp opcode) {
|
||||||
return ast::BinaryOp::kDivide;
|
return ast::BinaryOp::kDivide;
|
||||||
case SpvOpIEqual:
|
case SpvOpIEqual:
|
||||||
return ast::BinaryOp::kEqual;
|
return ast::BinaryOp::kEqual;
|
||||||
|
case SpvOpINotEqual:
|
||||||
|
return ast::BinaryOp::kNotEqual;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,6 +193,27 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
"__vec_2__bool", AstFor("v2int_30_40"), "equal",
|
"__vec_2__bool", AstFor("v2int_30_40"), "equal",
|
||||||
AstFor("v2int_40_30")}));
|
AstFor("v2int_40_30")}));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
|
SpvParserTest_INotEqual,
|
||||||
|
SpvBinaryLogicalTest,
|
||||||
|
::testing::Values(
|
||||||
|
// Both uint
|
||||||
|
BinaryData{"bool", "uint_10", "OpINotEqual", "uint_20", "__bool",
|
||||||
|
"ScalarConstructor{10}", "not_equal",
|
||||||
|
"ScalarConstructor{20}"},
|
||||||
|
// Both int
|
||||||
|
BinaryData{"bool", "int_30", "OpINotEqual", "int_40", "__bool",
|
||||||
|
"ScalarConstructor{30}", "not_equal",
|
||||||
|
"ScalarConstructor{40}"},
|
||||||
|
// Both v2uint
|
||||||
|
BinaryData{"v2bool", "v2uint_10_20", "OpINotEqual", "v2uint_20_10",
|
||||||
|
"__vec_2__bool", AstFor("v2uint_10_20"), "not_equal",
|
||||||
|
AstFor("v2uint_20_10")},
|
||||||
|
// Both v2int
|
||||||
|
BinaryData{"v2bool", "v2int_30_40", "OpINotEqual", "v2int_40_30",
|
||||||
|
"__vec_2__bool", AstFor("v2int_30_40"), "not_equal",
|
||||||
|
AstFor("v2int_40_30")}));
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace spirv
|
} // namespace spirv
|
||||||
} // namespace reader
|
} // namespace reader
|
||||||
|
|
Loading…
Reference in New Issue