Support constant expression calculated by matrixCompMult.

This commit is contained in:
jimihem 2024-07-16 02:24:16 +08:00 committed by GitHub
parent fb7a681cab
commit 702026e3f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 72 additions and 0 deletions

View file

@ -1009,6 +1009,12 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
objectSize = std::max(children[0]->getAsTyped()->getType().getVectorSize(),
children[2]->getAsTyped()->getType().getVectorSize());
break;
case EOpMul:
{
TIntermConstantUnion* left = children[0]->getAsConstantUnion();
TIntermConstantUnion* right = children[1]->getAsConstantUnion();
return left->fold(EOpMul, right);
}
default:
return aggrNode;
}