diff options
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index 64787b353..a5e8c9b6e 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <ranges> | 5 | #include <algorithm> |
| 6 | #include <string> | 6 | #include <string> |
| 7 | #include <tuple> | 7 | #include <tuple> |
| 8 | 8 | ||
| @@ -196,7 +196,10 @@ void PrecolorInst(IR::Inst& phi) { | |||
| 196 | 196 | ||
| 197 | void Precolor(const IR::Program& program) { | 197 | void Precolor(const IR::Program& program) { |
| 198 | for (IR::Block* const block : program.blocks) { | 198 | for (IR::Block* const block : program.blocks) { |
| 199 | for (IR::Inst& phi : block->Instructions() | std::views::take_while(IR::IsPhi)) { | 199 | for (IR::Inst& phi : block->Instructions()) { |
| 200 | if (!IR::IsPhi(phi)) { | ||
| 201 | break; | ||
| 202 | } | ||
| 200 | PrecolorInst(phi); | 203 | PrecolorInst(phi); |
| 201 | } | 204 | } |
| 202 | } | 205 | } |