diff options
author | bunnei <bunneidev@gmail.com> | 2018-07-13 03:59:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-13 03:59:15 +0200 |
commit | 64b5e5d5d940436c38c51c6da0796b58001f6dde (patch) | |
tree | 486a01886b784083646a025a29179f15e8bd5bd1 /src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |
parent | Merge pull request #654 from bunnei/cond-exit (diff) | |
parent | gl_shader_decompiler: Implement PredCondition::LessThanWithNan. (diff) | |
download | yuzu-64b5e5d5d940436c38c51c6da0796b58001f6dde.tar yuzu-64b5e5d5d940436c38c51c6da0796b58001f6dde.tar.gz yuzu-64b5e5d5d940436c38c51c6da0796b58001f6dde.tar.bz2 yuzu-64b5e5d5d940436c38c51c6da0796b58001f6dde.tar.lz yuzu-64b5e5d5d940436c38c51c6da0796b58001f6dde.tar.xz yuzu-64b5e5d5d940436c38c51c6da0796b58001f6dde.tar.zst yuzu-64b5e5d5d940436c38c51c6da0796b58001f6dde.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_decompiler.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 36a6f1cc5..96a4ca6fe 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -728,10 +728,10 @@ private: const std::string& op_a, const std::string& op_b) const { using Tegra::Shader::PredCondition; static const std::unordered_map<PredCondition, const char*> PredicateComparisonStrings = { - {PredCondition::LessThan, "<"}, {PredCondition::Equal, "=="}, - {PredCondition::LessEqual, "<="}, {PredCondition::GreaterThan, ">"}, - {PredCondition::NotEqual, "!="}, {PredCondition::GreaterEqual, ">="}, - {PredCondition::NotEqualWithNan, "!="}, + {PredCondition::LessThan, "<"}, {PredCondition::Equal, "=="}, + {PredCondition::LessEqual, "<="}, {PredCondition::GreaterThan, ">"}, + {PredCondition::NotEqual, "!="}, {PredCondition::GreaterEqual, ">="}, + {PredCondition::LessThanWithNan, "<"}, {PredCondition::NotEqualWithNan, "!="}, }; const auto& comparison{PredicateComparisonStrings.find(condition)}; @@ -739,7 +739,8 @@ private: "Unknown predicate comparison operation"); std::string predicate{'(' + op_a + ") " + comparison->second + " (" + op_b + ')'}; - if (condition == PredCondition::NotEqualWithNan) { + if (condition == PredCondition::LessThanWithNan || + condition == PredCondition::NotEqualWithNan) { predicate += " || isnan(" + op_a + ") || isnan(" + op_b + ')'; } |