Commit 8ab69840 by baustin@google.com

Insert a new-line ('\n') before the #line directive in HLSL source.

Without this, sometimes the #line directive shows up at the end of the previous line of shader source. This was causing syntax errors when trying to compile shaders during a PIX session. Review URL: http://codereview.appspot.com/4561059 git-svn-id: https://angleproject.googlecode.com/svn/trunk@667 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 04277b82
...@@ -1880,6 +1880,7 @@ void OutputHLSL::outputLineDirective(int line) ...@@ -1880,6 +1880,7 @@ void OutputHLSL::outputLineDirective(int line)
{ {
if ((mContext.compileOptions & SH_LINE_DIRECTIVES) && (line > 0)) if ((mContext.compileOptions & SH_LINE_DIRECTIVES) && (line > 0))
{ {
mBody << "\n";
mBody << "#line " << line; mBody << "#line " << line;
if (mContext.sourcePath) if (mContext.sourcePath)
......
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