diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-18 16:32:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-18 16:32:59 +0200 |
commit | 6eba539f4a945500c6e5a4395272184fff445698 (patch) | |
tree | 6c827c5f2f64f426d21d811116de61cbbdb7038b | |
parent | Merge pull request #1096 from bunnei/supported-blits (diff) | |
parent | Added predcondition GreaterThanWithNan (diff) | |
download | yuzu-6eba539f4a945500c6e5a4395272184fff445698.tar yuzu-6eba539f4a945500c6e5a4395272184fff445698.tar.gz yuzu-6eba539f4a945500c6e5a4395272184fff445698.tar.bz2 yuzu-6eba539f4a945500c6e5a4395272184fff445698.tar.lz yuzu-6eba539f4a945500c6e5a4395272184fff445698.tar.xz yuzu-6eba539f4a945500c6e5a4395272184fff445698.tar.zst yuzu-6eba539f4a945500c6e5a4395272184fff445698.zip |
-rw-r--r-- | src/video_core/engines/shader_bytecode.h | 1 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 12 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 2526ebf28..b038a9d92 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -141,6 +141,7 @@ enum class PredCondition : u64 { NotEqual = 5, GreaterEqual = 6, LessThanWithNan = 9, + GreaterThanWithNan = 12, NotEqualWithNan = 13, // TODO(Subv): Other condition types }; 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<PredCondition, const char*> 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 + ')'; } |