parent
51d672b8a8
commit
c176085909
3 changed files with 51 additions and 7 deletions
|
|
@ -3776,11 +3776,16 @@ void TIntermBinary::updatePrecision()
|
|||
{
|
||||
if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
|
||||
getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
|
||||
getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision);
|
||||
if (getQualifier().precision != EpqNone) {
|
||||
left->propagatePrecision(getQualifier().precision);
|
||||
right->propagatePrecision(getQualifier().precision);
|
||||
}
|
||||
if (op == EOpRightShift || op == EOpLeftShift) {
|
||||
// For shifts get precision from left side only and thus no need to propagate
|
||||
getQualifier().precision = left->getQualifier().precision;
|
||||
} else {
|
||||
getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision);
|
||||
if (getQualifier().precision != EpqNone) {
|
||||
left->propagatePrecision(getQualifier().precision);
|
||||
right->propagatePrecision(getQualifier().precision);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue