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 MAJOR_VERSION 1
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 998 #define BUILD_REVISION 999
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -1635,14 +1635,14 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node) ...@@ -1635,14 +1635,14 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node)
if (node->getType() == ELoopDoWhile) if (node->getType() == ELoopDoWhile)
{ {
out << "do\n"; out << "{do\n";
outputLineDirective(node->getLine()); outputLineDirective(node->getLine());
out << "{\n"; out << "{\n";
} }
else else
{ {
out << "for("; out << "{for(";
if (node->getInit()) if (node->getInit())
{ {
...@@ -1687,7 +1687,7 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node) ...@@ -1687,7 +1687,7 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node)
out << ")"; out << ")";
} }
out << ";\n"; out << "};\n";
return false; 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