[spirv-writer] Handle output of bitwise xor.
This CL adds bitwise xor support to the spirv writer. Bug: tint:5 Change-Id: I011283ef12840d25c882b95fc664f2b0dc6003da Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19410 Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
parent
2de7cb978d
commit
a51d697f8c
|
@ -617,6 +617,8 @@ uint32_t Builder::GenerateBinaryExpression(ast::BinaryExpression* expr) {
|
|||
op = lhs_is_float_or_vec ? spv::Op::OpFOrdNotEqual : spv::Op::OpINotEqual;
|
||||
} else if (expr->IsOr()) {
|
||||
op = spv::Op::OpBitwiseOr;
|
||||
} else if (expr->IsXor()) {
|
||||
op = spv::Op::OpBitwiseXor;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,8 @@ INSTANTIATE_TEST_SUITE_P(
|
|||
BinaryArithIntegerTest,
|
||||
testing::Values(BinaryData{ast::BinaryOp::kAdd, "OpIAdd"},
|
||||
BinaryData{ast::BinaryOp::kAnd, "OpBitwiseAnd"},
|
||||
BinaryData{ast::BinaryOp::kOr, "OpBitwiseOr"}));
|
||||
BinaryData{ast::BinaryOp::kOr, "OpBitwiseOr"},
|
||||
BinaryData{ast::BinaryOp::kXor, "OpBitwiseXor"}));
|
||||
|
||||
using BinaryArithFloatTest = testing::TestWithParam<BinaryData>;
|
||||
TEST_P(BinaryArithFloatTest, Scalar) {
|
||||
|
|
Loading…
Reference in New Issue