Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

shader: Properly insert Prologue instruction

ReinUsesLisp1688302a0de7
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
index fdac1c95a7..79e3449863 100644
--- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
+++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
@@ -635,7 +635,8 @@ public:
block_list{block_list_} {
Visit(root_stmt, nullptr, nullptr);
- IR::IREmitter ir{*block_list.front()};
+ IR::Block& first_block{*block_list.front()};
+ IR::IREmitter ir{first_block, first_block.begin()};
ir.Prologue();
}