diff options
| author | 2021-07-25 21:34:17 -0300 | |
|---|---|---|
| committer | 2021-11-16 22:11:28 +0100 | |
| commit | c892359d1bf228d3c119c953c20fff44f280a7c4 (patch) | |
| tree | c7461d3dea22a37448351fdcf92b5efadc1143b0 /src/shader_recompiler/frontend/ir/basic_block.cpp | |
| parent | shader: Add integer division opcodes (diff) | |
| download | yuzu-c892359d1bf228d3c119c953c20fff44f280a7c4.tar.gz yuzu-c892359d1bf228d3c119c953c20fff44f280a7c4.tar.xz yuzu-c892359d1bf228d3c119c953c20fff44f280a7c4.zip | |
shader: Add copy constructor to instructions
Diffstat (limited to 'src/shader_recompiler/frontend/ir/basic_block.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/basic_block.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/basic_block.cpp b/src/shader_recompiler/frontend/ir/basic_block.cpp index 7c08b25ce..974efa4a0 100644 --- a/src/shader_recompiler/frontend/ir/basic_block.cpp +++ b/src/shader_recompiler/frontend/ir/basic_block.cpp | |||
| @@ -22,6 +22,11 @@ void Block::AppendNewInst(Opcode op, std::initializer_list<Value> args) { | |||
| 22 | PrependNewInst(end(), op, args); | 22 | PrependNewInst(end(), op, args); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | Block::iterator Block::PrependNewInst(iterator insertion_point, const Inst& base_inst) { | ||
| 26 | Inst* const inst{inst_pool->Create(base_inst)}; | ||
| 27 | return instructions.insert(insertion_point, *inst); | ||
| 28 | } | ||
| 29 | |||
| 25 | Block::iterator Block::PrependNewInst(iterator insertion_point, Opcode op, | 30 | Block::iterator Block::PrependNewInst(iterator insertion_point, Opcode op, |
| 26 | std::initializer_list<Value> args, u32 flags) { | 31 | std::initializer_list<Value> args, u32 flags) { |
| 27 | Inst* const inst{inst_pool->Create(op, flags)}; | 32 | Inst* const inst{inst_pool->Create(op, flags)}; |