summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
index 02cef2645..e63e25aa6 100644
--- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
+++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
@@ -816,8 +816,13 @@ private:
throw NotImplementedException("Statement type {}", stmt.type);
}
}
- if (current_block && continue_block) {
- IR::IREmitter{*current_block}.Branch(continue_block);
+ if (current_block) {
+ IR::IREmitter ir{*current_block};
+ if (continue_block) {
+ ir.Branch(continue_block);
+ } else {
+ ir.Unreachable();
+ }
}
}