diff options
author | bunnei <bunneidev@gmail.com> | 2020-02-04 21:14:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-04 21:14:13 +0100 |
commit | 08c508b1c4740df6c1dca618c857efc4ced14afe (patch) | |
tree | 10475ad92628d80b220f37253d9a40fd505bcfe5 /src/video_core/shader/decode/bfi.cpp | |
parent | Merge pull request #3356 from ReinUsesLisp/fcmp (diff) | |
parent | shader/bfi: Implement register-constant buffer variant (diff) | |
download | yuzu-08c508b1c4740df6c1dca618c857efc4ced14afe.tar yuzu-08c508b1c4740df6c1dca618c857efc4ced14afe.tar.gz yuzu-08c508b1c4740df6c1dca618c857efc4ced14afe.tar.bz2 yuzu-08c508b1c4740df6c1dca618c857efc4ced14afe.tar.lz yuzu-08c508b1c4740df6c1dca618c857efc4ced14afe.tar.xz yuzu-08c508b1c4740df6c1dca618c857efc4ced14afe.tar.zst yuzu-08c508b1c4740df6c1dca618c857efc4ced14afe.zip |
Diffstat (limited to 'src/video_core/shader/decode/bfi.cpp')
-rw-r--r-- | src/video_core/shader/decode/bfi.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/shader/decode/bfi.cpp b/src/video_core/shader/decode/bfi.cpp index 8be1119df..f992bbe2a 100644 --- a/src/video_core/shader/decode/bfi.cpp +++ b/src/video_core/shader/decode/bfi.cpp @@ -17,10 +17,13 @@ u32 ShaderIR::DecodeBfi(NodeBlock& bb, u32 pc) { const Instruction instr = {program_code[pc]}; const auto opcode = OpCode::Decode(instr); - const auto [base, packed_shift] = [&]() -> std::tuple<Node, Node> { + const auto [packed_shift, base] = [&]() -> std::pair<Node, Node> { switch (opcode->get().GetId()) { + case OpCode::Id::BFI_RC: + return {GetRegister(instr.gpr39), + GetConstBuffer(instr.cbuf34.index, instr.cbuf34.offset)}; case OpCode::Id::BFI_IMM_R: - return {GetRegister(instr.gpr39), Immediate(instr.alu.GetSignedImm20_20())}; + return {Immediate(instr.alu.GetSignedImm20_20()), GetRegister(instr.gpr39)}; default: UNREACHABLE(); return {Immediate(0), Immediate(0)}; |