Use a single index for excessive loops.

TRAC #21167 ISSUE=338 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1209 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent c264de47
......@@ -2052,7 +2052,9 @@ bool OutputHLSL::handleExcessiveLoop(TIntermLoop *node)
return false; // Not an excessive loop
}
out << "{";
out << "{int ";
index->traverse(this);
out << ";\n";
while (iterations > 0)
{
......@@ -2060,7 +2062,7 @@ bool OutputHLSL::handleExcessiveLoop(TIntermLoop *node)
// for(int index = initial; index < clampedLimit; index += increment)
out << "for(int ";
out << "for(";
index->traverse(this);
out << " = ";
out << initial;
......
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