Commit 787b4468 by Chris Forbes

Add support for OpLogicalEqual, OpLogicalNotEqual

Test: dEQP-VK.glsl.operator.bool_compare.* Test: dEQP-VK.glsl.operator.binary_operator.equal.* Test: dEQP-VK.glsl.operator.binary_operator.not_equal.* Bug: b/126870789 Change-Id: I9d33444d67792274d8027b7d1632235533cfc079 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/26574Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent c212bbd8
......@@ -321,6 +321,8 @@ namespace sw
case spv::OpBitwiseAnd:
case spv::OpLogicalOr:
case spv::OpLogicalAnd:
case spv::OpLogicalEqual:
case spv::OpLogicalNotEqual:
case spv::OpUMulExtended:
case spv::OpSMulExtended:
case spv::OpDot:
......@@ -1091,6 +1093,8 @@ namespace sw
case spv::OpBitwiseAnd:
case spv::OpLogicalOr:
case spv::OpLogicalAnd:
case spv::OpLogicalEqual:
case spv::OpLogicalNotEqual:
case spv::OpUMulExtended:
case spv::OpSMulExtended:
EmitBinaryOp(insn, routine);
......@@ -1522,9 +1526,11 @@ namespace sw
dst.emplace(i, As<SIMD::Float>(As<SIMD::UInt>(lhs) % As<SIMD::UInt>(rhs)));
break;
case spv::OpIEqual:
case spv::OpLogicalEqual:
dst.emplace(i, As<SIMD::Float>(CmpEQ(As<SIMD::Int>(lhs), As<SIMD::Int>(rhs))));
break;
case spv::OpINotEqual:
case spv::OpLogicalNotEqual:
dst.emplace(i, As<SIMD::Float>(CmpNEQ(As<SIMD::Int>(lhs), As<SIMD::Int>(rhs))));
break;
case spv::OpUGreaterThan:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment