Output the complete function at once to avoid having to erase the function arguments.

TRAC #20737 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1118 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 06eb0d42
......@@ -1290,8 +1290,6 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
{
TString name = TFunction::unmangleName(node->getName());
if (visit == PreVisit)
{
out << typeString(node->getType()) << " ";
if (name == "main")
......@@ -1327,22 +1325,19 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
else UNREACHABLE();
}
sequence.erase(sequence.begin());
out << ")\n";
outputLineDirective(node->getLine());
out << "{\n";
out << ")\n"
"{\n";
if (sequence.size() > 1)
{
mInsideFunction = true;
sequence[1]->traverse(this);
mInsideFunction = false;
}
else if (visit == PostVisit)
{
outputLineDirective(node->getEndLine());
out << "}\n";
mInsideFunction = false;
}
return false;
}
break;
case EOpFunctionCall:
......
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