diff options
| author | 2021-02-14 01:24:32 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:22 -0400 | |
| commit | 8af9297f0972d0aaa8306369c5d04926b886a89e (patch) | |
| tree | 43bb3f50d694b615d2ae821eef84e417166d4890 /src/shader_recompiler/frontend/ir/ir_emitter.cpp | |
| parent | shader: Initial implementation of an AST (diff) | |
| download | yuzu-8af9297f0972d0aaa8306369c5d04926b886a89e.tar.gz yuzu-8af9297f0972d0aaa8306369c5d04926b886a89e.tar.xz yuzu-8af9297f0972d0aaa8306369c5d04926b886a89e.zip | |
shader: Misc fixes
Diffstat (limited to 'src/shader_recompiler/frontend/ir/ir_emitter.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp index 30932043f..f42489d41 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp +++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp | |||
| @@ -46,10 +46,12 @@ F64 IREmitter::Imm64(f64 value) const { | |||
| 46 | 46 | ||
| 47 | void IREmitter::Branch(Block* label) { | 47 | void IREmitter::Branch(Block* label) { |
| 48 | label->AddImmediatePredecessor(block); | 48 | label->AddImmediatePredecessor(block); |
| 49 | block->SetBranch(label); | ||
| 49 | Inst(Opcode::Branch, label); | 50 | Inst(Opcode::Branch, label); |
| 50 | } | 51 | } |
| 51 | 52 | ||
| 52 | void IREmitter::BranchConditional(const U1& condition, Block* true_label, Block* false_label) { | 53 | void IREmitter::BranchConditional(const U1& condition, Block* true_label, Block* false_label) { |
| 54 | block->SetBranches(IR::Condition{true}, true_label, false_label); | ||
| 53 | true_label->AddImmediatePredecessor(block); | 55 | true_label->AddImmediatePredecessor(block); |
| 54 | false_label->AddImmediatePredecessor(block); | 56 | false_label->AddImmediatePredecessor(block); |
| 55 | Inst(Opcode::BranchConditional, condition, true_label, false_label); | 57 | Inst(Opcode::BranchConditional, condition, true_label, false_label); |