Browse Source
Merge pull request #1100 from ogniK5377/missing-pred
Added pred-condition GreaterThanWithNan
pull/15/merge
bunnei
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
5 deletions
-
src/video_core/engines/shader_bytecode.h
-
src/video_core/renderer_opengl/gl_shader_decompiler.cpp
|
|
|
@ -141,6 +141,7 @@ enum class PredCondition : u64 { |
|
|
|
NotEqual = 5, |
|
|
|
GreaterEqual = 6, |
|
|
|
LessThanWithNan = 9, |
|
|
|
GreaterThanWithNan = 12, |
|
|
|
NotEqualWithNan = 13, |
|
|
|
// TODO(Subv): Other condition types |
|
|
|
}; |
|
|
|
|
|
|
|
@ -707,6 +707,7 @@ private: |
|
|
|
{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 + ')'; |
|
|
|
} |
|
|
|
|
|
|
|
|