diff options
| author | 2021-07-12 05:22:01 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:40 -0400 | |
| commit | bf2956d77ab0ad06c4b5505cc9906e51e5878274 (patch) | |
| tree | 3aae336c0dc3fe65351d5e6e312a214351e2e2fc /src/shader_recompiler/backend/glsl/emit_glsl.cpp | |
| parent | glsl: Clamp shared mem size to GL_MAX_COMPUTE_SHARED_MEMORY_SIZE (diff) | |
| download | yuzu-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/glsl/emit_glsl.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl.cpp b/src/shader_recompiler/backend/glsl/emit_glsl.cpp index c5e819a0a..8a430d573 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl.cpp | |||
| @@ -2,8 +2,10 @@ | |||
| 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> | ||
| 8 | #include <type_traits> | ||
| 7 | 9 | ||
| 8 | #include "common/div_ceil.h" | 10 | #include "common/div_ceil.h" |
| 9 | #include "common/settings.h" | 11 | #include "common/settings.h" |
| @@ -120,7 +122,10 @@ void PrecolorInst(IR::Inst& phi) { | |||
| 120 | 122 | ||
| 121 | void Precolor(const IR::Program& program) { | 123 | void Precolor(const IR::Program& program) { |
| 122 | for (IR::Block* const block : program.blocks) { | 124 | for (IR::Block* const block : program.blocks) { |
| 123 | for (IR::Inst& phi : block->Instructions() | std::views::take_while(IR::IsPhi)) { | 125 | for (IR::Inst& phi : block->Instructions()) { |
| 126 | if (!IR::IsPhi(phi)) { | ||
| 127 | break; | ||
| 128 | } | ||
| 124 | PrecolorInst(phi); | 129 | PrecolorInst(phi); |
| 125 | } | 130 | } |
| 126 | } | 131 | } |