Limit HLSL loop scope to match that of GLSL, for excessive loops.

TRAC #21167 ISSUE=338 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1208 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 11190ec6
......@@ -2052,6 +2052,8 @@ bool OutputHLSL::handleExcessiveLoop(TIntermLoop *node)
return false; // Not an excessive loop
}
out << "{";
while (iterations > 0)
{
int clampedLimit = initial + increment * std::min(MAX_LOOP_ITERATIONS, iterations);
......@@ -2089,6 +2091,8 @@ bool OutputHLSL::handleExcessiveLoop(TIntermLoop *node)
iterations -= MAX_LOOP_ITERATIONS;
}
out << "}";
return true;
}
else UNIMPLEMENTED();
......
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