|
|
|
@ -1059,11 +1059,17 @@ 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::GreaterThanWithNan, ">"}, {PredCondition::GreaterEqualWithNan, ">="}};
|
|
|
|
|
{PredCondition::LessThan, "<"},
|
|
|
|
|
{PredCondition::Equal, "=="},
|
|
|
|
|
{PredCondition::LessEqual, "<="},
|
|
|
|
|
{PredCondition::GreaterThan, ">"},
|
|
|
|
|
{PredCondition::NotEqual, "!="},
|
|
|
|
|
{PredCondition::GreaterEqual, ">="},
|
|
|
|
|
{PredCondition::LessThanWithNan, "<"},
|
|
|
|
|
{PredCondition::NotEqualWithNan, "!="},
|
|
|
|
|
{PredCondition::LessEqualWithNan, "<="},
|
|
|
|
|
{PredCondition::GreaterThanWithNan, ">"},
|
|
|
|
|
{PredCondition::GreaterEqualWithNan, ">="}};
|
|
|
|
|
|
|
|
|
|
const auto& comparison{PredicateComparisonStrings.find(condition)};
|
|
|
|
|
UNIMPLEMENTED_IF_MSG(comparison == PredicateComparisonStrings.end(),
|
|
|
|
@ -1072,6 +1078,7 @@ private:
|
|
|
|
|
std::string predicate{'(' + op_a + ") " + comparison->second + " (" + op_b + ')'};
|
|
|
|
|
if (condition == PredCondition::LessThanWithNan ||
|
|
|
|
|
condition == PredCondition::NotEqualWithNan ||
|
|
|
|
|
condition == PredCondition::LessEqualWithNan ||
|
|
|
|
|
condition == PredCondition::GreaterThanWithNan ||
|
|
|
|
|
condition == PredCondition::GreaterEqualWithNan) {
|
|
|
|
|
predicate += " || isnan(" + op_a + ") || isnan(" + op_b + ')';
|
|
|
|
|