diff options
| author | 2021-04-11 20:40:00 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:27 -0400 | |
| commit | dfd5341d7117e4299b6c34e8b1feb0e66c230478 (patch) | |
| tree | 4dab215e2c5ee46b5283dcfa9a18c0a5aafa70f9 /src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | |
| parent | shader: Implement LOP CC (diff) | |
| download | yuzu-dfd5341d7117e4299b6c34e8b1feb0e66c230478.tar.gz yuzu-dfd5341d7117e4299b6c34e8b1feb0e66c230478.tar.xz yuzu-dfd5341d7117e4299b6c34e8b1feb0e66c230478.zip | |
shader: Mark blocks with no end branch as unreachable
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | 9 |
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: | |||
| 816 | throw NotImplementedException("Statement type {}", stmt.type); | 816 | throw NotImplementedException("Statement type {}", stmt.type); |
| 817 | } | 817 | } |
| 818 | } | 818 | } |
| 819 | if (current_block && continue_block) { | 819 | if (current_block) { |
| 820 | IR::IREmitter{*current_block}.Branch(continue_block); | 820 | IR::IREmitter ir{*current_block}; |
| 821 | if (continue_block) { | ||
| 822 | ir.Branch(continue_block); | ||
| 823 | } else { | ||
| 824 | ir.Unreachable(); | ||
| 825 | } | ||
| 821 | } | 826 | } |
| 822 | } | 827 | } |
| 823 | 828 | ||