shader/arithmetic_integer: Implement CC for IADD
This commit is contained in:
parent
ffc5ec6fa8
commit
255197e643
5 changed files with 43 additions and 4 deletions
|
@ -1870,6 +1870,14 @@ private:
|
|||
return GenerateBinaryInfix(operation, ">=", Type::Bool, type, type);
|
||||
}
|
||||
|
||||
Expression LogicalAddCarry(Operation operation) {
|
||||
const std::string carry = code.GenerateTemporary();
|
||||
code.AddLine("uint {};", carry);
|
||||
code.AddLine("uaddCarry({}, {}, {});", VisitOperand(operation, 0).AsUint(),
|
||||
VisitOperand(operation, 1).AsUint(), carry);
|
||||
return {fmt::format("({} != 0)", carry), Type::Bool};
|
||||
}
|
||||
|
||||
Expression LogicalFIsNan(Operation operation) {
|
||||
return GenerateUnary(operation, "isnan", Type::Bool, Type::Float);
|
||||
}
|
||||
|
@ -2441,6 +2449,8 @@ private:
|
|||
&GLSLDecompiler::LogicalNotEqual<Type::Uint>,
|
||||
&GLSLDecompiler::LogicalGreaterEqual<Type::Uint>,
|
||||
|
||||
&GLSLDecompiler::LogicalAddCarry,
|
||||
|
||||
&GLSLDecompiler::Logical2HLessThan<false>,
|
||||
&GLSLDecompiler::Logical2HEqual<false>,
|
||||
&GLSLDecompiler::Logical2HLessEqual<false>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue