summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glasm/emit_glasm.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-07-12 05:22:01 -0300
committerGravatar ameerj2021-07-22 21:51:40 -0400
commitbf2956d77ab0ad06c4b5505cc9906e51e5878274 (patch)
tree3aae336c0dc3fe65351d5e6e312a214351e2e2fc /src/shader_recompiler/backend/glasm/emit_glasm.cpp
parentglsl: Clamp shared mem size to GL_MAX_COMPUTE_SHARED_MEMORY_SIZE (diff)
downloadyuzu-bf2956d77ab0ad06c4b5505cc9906e51e5878274.tar.gz
yuzu-bf2956d77ab0ad06c4b5505cc9906e51e5878274.tar.xz
yuzu-bf2956d77ab0ad06c4b5505cc9906e51e5878274.zip
shader: Avoid usage of C++20 ranges to build in clang
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm.cpp7
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
197void Precolor(const IR::Program& program) { 197void 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 }