diff options
| author | 2018-08-31 10:40:18 +0300 | |
|---|---|---|
| committer | 2018-08-31 10:40:18 +0300 | |
| commit | d626bc8c626bebfbe6cade2cd1d6a3b734d5e477 (patch) | |
| tree | ed4206a055ad5930abab4cb15418d9ddbe2de826 /src | |
| parent | Merge pull request #1195 from FearlessTobi/port-gamelist-compat (diff) | |
| download | yuzu-d626bc8c626bebfbe6cade2cd1d6a3b734d5e477.tar.gz yuzu-d626bc8c626bebfbe6cade2cd1d6a3b734d5e477.tar.xz yuzu-d626bc8c626bebfbe6cade2cd1d6a3b734d5e477.zip | |
Added predicate comparison GreaterEqualWithNan
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 65e0c469f..3e4efbe0c 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -147,6 +147,7 @@ enum class PredCondition : u64 { | |||
| 147 | LessThanWithNan = 9, | 147 | LessThanWithNan = 9, |
| 148 | GreaterThanWithNan = 12, | 148 | GreaterThanWithNan = 12, |
| 149 | NotEqualWithNan = 13, | 149 | NotEqualWithNan = 13, |
| 150 | GreaterEqualWithNan = 14, | ||
| 150 | // TODO(Subv): Other condition types | 151 | // TODO(Subv): Other condition types |
| 151 | }; | 152 | }; |
| 152 | 153 | ||
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 842bfa0b7..391c92d47 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -729,8 +729,7 @@ private: | |||
| 729 | {PredCondition::LessEqual, "<="}, {PredCondition::GreaterThan, ">"}, | 729 | {PredCondition::LessEqual, "<="}, {PredCondition::GreaterThan, ">"}, |
| 730 | {PredCondition::NotEqual, "!="}, {PredCondition::GreaterEqual, ">="}, | 730 | {PredCondition::NotEqual, "!="}, {PredCondition::GreaterEqual, ">="}, |
| 731 | {PredCondition::LessThanWithNan, "<"}, {PredCondition::NotEqualWithNan, "!="}, | 731 | {PredCondition::LessThanWithNan, "<"}, {PredCondition::NotEqualWithNan, "!="}, |
| 732 | {PredCondition::GreaterThanWithNan, ">"}, | 732 | {PredCondition::GreaterThanWithNan, ">"}, {PredCondition::GreaterEqualWithNan, ">="}}; |
| 733 | }; | ||
| 734 | 733 | ||
| 735 | const auto& comparison{PredicateComparisonStrings.find(condition)}; | 734 | const auto& comparison{PredicateComparisonStrings.find(condition)}; |
| 736 | ASSERT_MSG(comparison != PredicateComparisonStrings.end(), | 735 | ASSERT_MSG(comparison != PredicateComparisonStrings.end(), |
| @@ -739,7 +738,8 @@ private: | |||
| 739 | std::string predicate{'(' + op_a + ") " + comparison->second + " (" + op_b + ')'}; | 738 | std::string predicate{'(' + op_a + ") " + comparison->second + " (" + op_b + ')'}; |
| 740 | if (condition == PredCondition::LessThanWithNan || | 739 | if (condition == PredCondition::LessThanWithNan || |
| 741 | condition == PredCondition::NotEqualWithNan || | 740 | condition == PredCondition::NotEqualWithNan || |
| 742 | condition == PredCondition::GreaterThanWithNan) { | 741 | condition == PredCondition::GreaterThanWithNan || |
| 742 | condition == PredCondition::GreaterEqualWithNan) { | ||
| 743 | predicate += " || isnan(" + op_a + ") || isnan(" + op_b + ')'; | 743 | predicate += " || isnan(" + op_a + ") || isnan(" + op_b + ')'; |
| 744 | } | 744 | } |
| 745 | 745 | ||