diff options
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 17 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 83a6fd875..c5f502ce1 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -153,6 +153,7 @@ enum class PredCondition : u64 { | |||
| 153 | NotEqual = 5, | 153 | NotEqual = 5, |
| 154 | GreaterEqual = 6, | 154 | GreaterEqual = 6, |
| 155 | LessThanWithNan = 9, | 155 | LessThanWithNan = 9, |
| 156 | LessEqualWithNan = 11, | ||
| 156 | GreaterThanWithNan = 12, | 157 | GreaterThanWithNan = 12, |
| 157 | NotEqualWithNan = 13, | 158 | NotEqualWithNan = 13, |
| 158 | GreaterEqualWithNan = 14, | 159 | GreaterEqualWithNan = 14, |
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index dd406b132..ba80e5832 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -1059,11 +1059,17 @@ private: | |||
| 1059 | const std::string& op_a, const std::string& op_b) const { | 1059 | const std::string& op_a, const std::string& op_b) const { |
| 1060 | using Tegra::Shader::PredCondition; | 1060 | using Tegra::Shader::PredCondition; |
| 1061 | static const std::unordered_map<PredCondition, const char*> PredicateComparisonStrings = { | 1061 | static const std::unordered_map<PredCondition, const char*> PredicateComparisonStrings = { |
| 1062 | {PredCondition::LessThan, "<"}, {PredCondition::Equal, "=="}, | 1062 | {PredCondition::LessThan, "<"}, |
| 1063 | {PredCondition::LessEqual, "<="}, {PredCondition::GreaterThan, ">"}, | 1063 | {PredCondition::Equal, "=="}, |
| 1064 | {PredCondition::NotEqual, "!="}, {PredCondition::GreaterEqual, ">="}, | 1064 | {PredCondition::LessEqual, "<="}, |
| 1065 | {PredCondition::LessThanWithNan, "<"}, {PredCondition::NotEqualWithNan, "!="}, | 1065 | {PredCondition::GreaterThan, ">"}, |
| 1066 | {PredCondition::GreaterThanWithNan, ">"}, {PredCondition::GreaterEqualWithNan, ">="}}; | 1066 | {PredCondition::NotEqual, "!="}, |
| 1067 | {PredCondition::GreaterEqual, ">="}, | ||
| 1068 | {PredCondition::LessThanWithNan, "<"}, | ||
| 1069 | {PredCondition::NotEqualWithNan, "!="}, | ||
| 1070 | {PredCondition::LessEqualWithNan, "<="}, | ||
| 1071 | {PredCondition::GreaterThanWithNan, ">"}, | ||
| 1072 | {PredCondition::GreaterEqualWithNan, ">="}}; | ||
| 1067 | 1073 | ||
| 1068 | const auto& comparison{PredicateComparisonStrings.find(condition)}; | 1074 | const auto& comparison{PredicateComparisonStrings.find(condition)}; |
| 1069 | UNIMPLEMENTED_IF_MSG(comparison == PredicateComparisonStrings.end(), | 1075 | UNIMPLEMENTED_IF_MSG(comparison == PredicateComparisonStrings.end(), |
| @@ -1072,6 +1078,7 @@ private: | |||
| 1072 | std::string predicate{'(' + op_a + ") " + comparison->second + " (" + op_b + ')'}; | 1078 | std::string predicate{'(' + op_a + ") " + comparison->second + " (" + op_b + ')'}; |
| 1073 | if (condition == PredCondition::LessThanWithNan || | 1079 | if (condition == PredCondition::LessThanWithNan || |
| 1074 | condition == PredCondition::NotEqualWithNan || | 1080 | condition == PredCondition::NotEqualWithNan || |
| 1081 | condition == PredCondition::LessEqualWithNan || | ||
| 1075 | condition == PredCondition::GreaterThanWithNan || | 1082 | condition == PredCondition::GreaterThanWithNan || |
| 1076 | condition == PredCondition::GreaterEqualWithNan) { | 1083 | condition == PredCondition::GreaterEqualWithNan) { |
| 1077 | predicate += " || isnan(" + op_a + ") || isnan(" + op_b + ')'; | 1084 | predicate += " || isnan(" + op_a + ") || isnan(" + op_b + ')'; |