aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-03-24 01:33:45 -0300
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-22 21:51:24 -0400
commit24bc872af32d85b4e21f37233bc49ca94a045659 (patch)
treeb9a78497cd8af1d73a7eda34cd0df08b3dc324e6 /src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
parent3095e9d9ec5b70184b37b771ecfc70e04b6e7eae (diff)
shader: Implement NDC [-1, 1], attribute types and default varying initialization
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp')
-rw-r--r--src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp7
1 files changed, 6 insertions, 1 deletions
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;
}