From 63dff47e2269107233e0fb4956d0fcdbf6566a7e Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sat, 18 Aug 2018 17:49:59 +1000 Subject: Added predcondition GreaterThanWithNan --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/video_core/renderer_opengl') diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 07006b55e..bb01b3c27 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -703,10 +703,11 @@ private: const std::string& op_a, const std::string& op_b) const { using Tegra::Shader::PredCondition; static const std::unordered_map PredicateComparisonStrings = { - {PredCondition::LessThan, "<"}, {PredCondition::Equal, "=="}, - {PredCondition::LessEqual, "<="}, {PredCondition::GreaterThan, ">"}, - {PredCondition::NotEqual, "!="}, {PredCondition::GreaterEqual, ">="}, - {PredCondition::LessThanWithNan, "<"}, {PredCondition::NotEqualWithNan, "!="}, + {PredCondition::LessThan, "<"}, {PredCondition::Equal, "=="}, + {PredCondition::LessEqual, "<="}, {PredCondition::GreaterThan, ">"}, + {PredCondition::NotEqual, "!="}, {PredCondition::GreaterEqual, ">="}, + {PredCondition::LessThanWithNan, "<"}, {PredCondition::NotEqualWithNan, "!="}, + {PredCondition::GreaterThanWithNan, ">"}, }; const auto& comparison{PredicateComparisonStrings.find(condition)}; @@ -715,7 +716,8 @@ private: std::string predicate{'(' + op_a + ") " + comparison->second + " (" + op_b + ')'}; if (condition == PredCondition::LessThanWithNan || - condition == PredCondition::NotEqualWithNan) { + condition == PredCondition::NotEqualWithNan || + condition == PredCondition::GreaterThanWithNan) { predicate += " || isnan(" + op_a + ") || isnan(" + op_b + ')'; } -- cgit v1.2.3