mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 11:42:48 +00:00
gl_shader_decompiler: Implement PredCondition::LessThanWithNan.
This commit is contained in:
parent
274d1fb0fc
commit
49c0c081c4
|
@ -142,6 +142,7 @@ enum class PredCondition : u64 {
|
|||
GreaterThan = 4,
|
||||
NotEqual = 5,
|
||||
GreaterEqual = 6,
|
||||
LessThanWithNan = 9,
|
||||
NotEqualWithNan = 13,
|
||||
// TODO(Subv): Other condition types
|
||||
};
|
||||
|
|
|
@ -731,7 +731,7 @@ private:
|
|||
{PredCondition::LessThan, "<"}, {PredCondition::Equal, "=="},
|
||||
{PredCondition::LessEqual, "<="}, {PredCondition::GreaterThan, ">"},
|
||||
{PredCondition::NotEqual, "!="}, {PredCondition::GreaterEqual, ">="},
|
||||
{PredCondition::NotEqualWithNan, "!="},
|
||||
{PredCondition::LessThanWithNan, "<"}, {PredCondition::NotEqualWithNan, "!="},
|
||||
};
|
||||
|
||||
const auto& comparison{PredicateComparisonStrings.find(condition)};
|
||||
|
@ -739,7 +739,8 @@ private:
|
|||
"Unknown predicate comparison operation");
|
||||
|
||||
std::string predicate{'(' + op_a + ") " + comparison->second + " (" + op_b + ')'};
|
||||
if (condition == PredCondition::NotEqualWithNan) {
|
||||
if (condition == PredCondition::LessThanWithNan ||
|
||||
condition == PredCondition::NotEqualWithNan) {
|
||||
predicate += " || isnan(" + op_a + ") || isnan(" + op_b + ')';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue