diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-09 20:36:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-09 20:36:52 +0200 |
commit | 0bfe974281de2944d08d2856908142298b78c86b (patch) | |
tree | 11db1a4ac56e53b71e8a676796c60b8c57915d8b | |
parent | Merge pull request #994 from lioncash/const (diff) | |
parent | gl_shader_decompiler: Declare predicates on use. (diff) | |
download | yuzu-0bfe974281de2944d08d2856908142298b78c86b.tar yuzu-0bfe974281de2944d08d2856908142298b78c86b.tar.gz yuzu-0bfe974281de2944d08d2856908142298b78c86b.tar.bz2 yuzu-0bfe974281de2944d08d2856908142298b78c86b.tar.lz yuzu-0bfe974281de2944d08d2856908142298b78c86b.tar.xz yuzu-0bfe974281de2944d08d2856908142298b78c86b.tar.zst yuzu-0bfe974281de2944d08d2856908142298b78c86b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index dd240a4ce..ea7779429 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -657,16 +657,17 @@ private: * @param instr Instruction to generate the if condition for. * @returns string containing the predicate condition. */ - std::string GetPredicateCondition(u64 index, bool negate) const { + std::string GetPredicateCondition(u64 index, bool negate) { using Tegra::Shader::Pred; std::string variable; // Index 7 is used as an 'Always True' condition. - if (index == static_cast<u64>(Pred::UnusedIndex)) + if (index == static_cast<u64>(Pred::UnusedIndex)) { variable = "true"; - else + } else { variable = 'p' + std::to_string(index) + '_' + suffix; - + declr_predicates.insert(variable); + } if (negate) { return "!(" + variable + ')'; } |