Limit HLSL loop scope to match that of GLSL.

TRAC #19197 ISSUE=260 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@999 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 0f328a7a
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 998
#define BUILD_REVISION 999
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -1635,14 +1635,14 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node)
if (node->getType() == ELoopDoWhile)
{
out << "do\n";
out << "{do\n";
outputLineDirective(node->getLine());
out << "{\n";
}
else
{
out << "for(";
out << "{for(";
if (node->getInit())
{
......@@ -1687,7 +1687,7 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node)
out << ")";
}
out << ";\n";
out << "};\n";
return false;
}
......
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