Front-end: Add specialization-constant subtrees for const variables/symbols.

This commit is contained in:
John Kessenich 2016-03-20 16:46:00 -06:00
parent 7cc0e2896e
commit a5845766e0
8 changed files with 61 additions and 23 deletions

View file

@ -605,6 +605,11 @@ void TOutputTraverser::visitSymbol(TIntermSymbol* node)
if (! node->getConstArray().empty())
OutputConstantUnion(infoSink, node, node->getConstArray(), depth + 1);
else if (node->getConstSubtree()) {
incrementDepth(node);
node->getConstSubtree()->traverse(this);
decrementDepth();
}
}
bool TOutputTraverser::visitLoop(TVisit /* visit */, TIntermLoop* node)