diff options
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, 3 insertions, 2 deletions
diff --git a/src/shader_recompiler/frontend/ir/basic_block.cpp b/src/shader_recompiler/frontend/ir/basic_block.cpp index 249251dd0..1a5d82135 100644 --- a/src/shader_recompiler/frontend/ir/basic_block.cpp +++ b/src/shader_recompiler/frontend/ir/basic_block.cpp | |||
| @@ -14,7 +14,8 @@ | |||
| 14 | 14 | ||
| 15 | namespace Shader::IR { | 15 | namespace Shader::IR { |
| 16 | 16 | ||
| 17 | Block::Block(u32 begin, u32 end) : location_begin{begin}, location_end{end} {} | 17 | Block::Block(ObjectPool<Inst>& inst_pool_, u32 begin, u32 end) |
| 18 | : inst_pool{&inst_pool_}, location_begin{begin}, location_end{end} {} | ||
| 18 | 19 | ||
| 19 | Block::~Block() = default; | 20 | Block::~Block() = default; |
| 20 | 21 | ||
| @@ -24,7 +25,7 @@ void Block::AppendNewInst(Opcode op, std::initializer_list<Value> args) { | |||
| 24 | 25 | ||
| 25 | Block::iterator Block::PrependNewInst(iterator insertion_point, Opcode op, | 26 | Block::iterator Block::PrependNewInst(iterator insertion_point, Opcode op, |
| 26 | std::initializer_list<Value> args, u64 flags) { | 27 | std::initializer_list<Value> args, u64 flags) { |
| 27 | Inst* const inst{std::construct_at(instruction_alloc_pool.allocate(), op, flags)}; | 28 | Inst* const inst{inst_pool->Create(op, flags)}; |
| 28 | const auto result_it{instructions.insert(insertion_point, *inst)}; | 29 | const auto result_it{instructions.insert(insertion_point, *inst)}; |
| 29 | 30 | ||
| 30 | if (inst->NumArgs() != args.size()) { | 31 | if (inst->NumArgs() != args.size()) { |