From 68a9505d8a1d00c6ba2739bc0af3069cf87b9b84 Mon Sep 17 00:00:00 2001
From: ReinUsesLisp <reinuseslisp@airmail.cc>
Date: Wed, 24 Mar 2021 01:33:45 -0300
Subject: shader: Implement NDC [-1, 1], attribute types and default varying
 initialization

---
 src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | 7 ++++++-
 1 file changed, 6 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 cec03e73ee..fdac1c95a7 100644
--- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
+++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
@@ -634,6 +634,9 @@ public:
         : stmt_pool{stmt_pool_}, inst_pool{inst_pool_}, block_pool{block_pool_}, env{env_},
           block_list{block_list_} {
         Visit(root_stmt, nullptr, nullptr);
+
+        IR::IREmitter ir{*block_list.front()};
+        ir.Prologue();
     }
 
 private:
@@ -734,7 +737,9 @@ private:
                     current_block = block_pool.Create(inst_pool);
                     block_list.push_back(current_block);
                 }
-                IR::IREmitter{*current_block}.Return();
+                IR::IREmitter ir{*current_block};
+                ir.Epilogue();
+                ir.Return();
                 current_block = nullptr;
                 break;
             }
-- 
cgit v1.2.3-70-g09d2