summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2018-12-17 19:03:53 -0300
committerGravatar ReinUsesLisp2019-01-15 17:54:52 -0300
commit6ca31f544a4559eca547b45b5158d210932cc428 (patch)
treebb809c281c4252dbdd6ecb8f5e7d88380cb05ac4
parentshader_decode: Implement ISCADD (diff)
downloadyuzu-6ca31f544a4559eca547b45b5158d210932cc428.tar.gz
yuzu-6ca31f544a4559eca547b45b5158d210932cc428.tar.xz
yuzu-6ca31f544a4559eca547b45b5158d210932cc428.zip
shader_decode: Implement BRA internal flag
-rw-r--r--src/video_core/shader/decode/other.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/video_core/shader/decode/other.cpp b/src/video_core/shader/decode/other.cpp
index 0416d7eaa..5b3f9aa30 100644
--- a/src/video_core/shader/decode/other.cpp
+++ b/src/video_core/shader/decode/other.cpp
@@ -50,11 +50,15 @@ u32 ShaderIR::DecodeOther(BasicBlock& bb, u32 pc) {
50 UNIMPLEMENTED_IF_MSG(instr.bra.constant_buffer != 0, 50 UNIMPLEMENTED_IF_MSG(instr.bra.constant_buffer != 0,
51 "BRA with constant buffers are not implemented"); 51 "BRA with constant buffers are not implemented");
52 52
53 const Tegra::Shader::ConditionCode cc = instr.flow_condition_code;
54 UNIMPLEMENTED_IF(cc != Tegra::Shader::ConditionCode::T);
55
56 const u32 target = pc + instr.bra.GetBranchTarget(); 53 const u32 target = pc + instr.bra.GetBranchTarget();
57 bb.push_back(Operation(OperationCode::Bra, Immediate(target))); 54 const Node branch = Operation(OperationCode::Bra, Immediate(target));
55
56 const Tegra::Shader::ConditionCode cc = instr.flow_condition_code;
57 if (cc != Tegra::Shader::ConditionCode::T) {
58 bb.push_back(Conditional(GetConditionCode(cc), {branch}));
59 } else {
60 bb.push_back(branch);
61 }
58 break; 62 break;
59 } 63 }
60 case OpCode::Id::SSY: { 64 case OpCode::Id::SSY: {