diff options
author | bunnei <bunneidev@gmail.com> | 2020-02-04 17:36:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-04 17:36:59 +0100 |
commit | bf21aacc7412c930da21e36850f24e97c3f103f6 (patch) | |
tree | e6bf9646156c8041dff2759e66b0fd0b6856c1b4 /src/video_core/shader | |
parent | Merge pull request #3360 from CJBok/statusbar-buttons (diff) | |
parent | shader/arithmetic: Implement FCMP (diff) | |
download | yuzu-bf21aacc7412c930da21e36850f24e97c3f103f6.tar yuzu-bf21aacc7412c930da21e36850f24e97c3f103f6.tar.gz yuzu-bf21aacc7412c930da21e36850f24e97c3f103f6.tar.bz2 yuzu-bf21aacc7412c930da21e36850f24e97c3f103f6.tar.lz yuzu-bf21aacc7412c930da21e36850f24e97c3f103f6.tar.xz yuzu-bf21aacc7412c930da21e36850f24e97c3f103f6.tar.zst yuzu-bf21aacc7412c930da21e36850f24e97c3f103f6.zip |
Diffstat (limited to 'src/video_core/shader')
-rw-r--r-- | src/video_core/shader/decode/arithmetic.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/video_core/shader/decode/arithmetic.cpp b/src/video_core/shader/decode/arithmetic.cpp index fcedd2af6..90240c765 100644 --- a/src/video_core/shader/decode/arithmetic.cpp +++ b/src/video_core/shader/decode/arithmetic.cpp @@ -21,7 +21,7 @@ u32 ShaderIR::DecodeArithmetic(NodeBlock& bb, u32 pc) { Node op_a = GetRegister(instr.gpr8); - Node op_b = [&]() -> Node { + Node op_b = [&] { if (instr.is_b_imm) { return GetImmediate19(instr); } else if (instr.is_b_gpr) { @@ -141,6 +141,15 @@ u32 ShaderIR::DecodeArithmetic(NodeBlock& bb, u32 pc) { SetRegister(bb, instr.gpr0, value); break; } + case OpCode::Id::FCMP_R: { + UNIMPLEMENTED_IF(instr.fcmp.ftz == 0); + Node op_c = GetRegister(instr.gpr39); + Node comp = GetPredicateComparisonFloat(instr.fcmp.cond, std::move(op_c), Immediate(0.0f)); + SetRegister( + bb, instr.gpr0, + Operation(OperationCode::Select, std::move(comp), std::move(op_a), std::move(op_b))); + break; + } case OpCode::Id::RRO_C: case OpCode::Id::RRO_R: case OpCode::Id::RRO_IMM: { |