From d3dad6b6320f680b4e85ab991941d15cbce0e616 Mon Sep 17 00:00:00 2001
From: ReinUsesLisp <reinuseslisp@airmail.cc>
Date: Wed, 24 Mar 2021 19:37:44 -0300
Subject: shader: Properly insert Prologue instruction

---
 src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp')

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();
     }
 
-- 
cgit v1.2.3-70-g09d2