Commit a357236f by Olli Etuaho

Fix small issues in array related AST transformations

Make sure that user-defined bit stays in place when copying function call nodes, and that mInFunctionWithArrayReturnValue gets reset correctly in ArrayReturnValueToOutParameter. BUG=angleproject:971 TEST=WebGL 2 conformance tests Change-Id: I385f4ce4990597e44ddad4f0fa6db23b661771dc Reviewed-on: https://chromium-review.googlesource.com/273110Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org>
parent 113bc73e
...@@ -118,7 +118,7 @@ bool ArrayReturnValueToOutParameterTraverser::visitAggregate(Visit visit, TInter ...@@ -118,7 +118,7 @@ bool ArrayReturnValueToOutParameterTraverser::visitAggregate(Visit visit, TInter
} }
else if (visit == PostVisit) else if (visit == PostVisit)
{ {
if (node->getOp() == EOpFunction && node->isArray()) if (node->getOp() == EOpFunction)
{ {
mInFunctionWithArrayReturnValue = false; mInFunctionWithArrayReturnValue = false;
} }
......
...@@ -61,6 +61,10 @@ TIntermAggregate *CopyAggregateNode(TIntermAggregate *node) ...@@ -61,6 +61,10 @@ TIntermAggregate *CopyAggregateNode(TIntermAggregate *node)
copySeq->insert(copySeq->begin(), node->getSequence()->begin(), node->getSequence()->end()); copySeq->insert(copySeq->begin(), node->getSequence()->begin(), node->getSequence()->end());
copyNode->setType(node->getType()); copyNode->setType(node->getType());
copyNode->setFunctionId(node->getFunctionId()); copyNode->setFunctionId(node->getFunctionId());
if (node->isUserDefined())
{
copyNode->setUserDefined();
}
copyNode->setName(node->getName()); copyNode->setName(node->getName());
return copyNode; return copyNode;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment