From 4fba27258e7d91c76b4737fccc1519948958b521 Mon Sep 17 00:00:00 2001 From: Aras Pranckevicius Date: Fri, 31 Aug 2012 15:08:43 +0300 Subject: [PATCH] do not print file name in #line directives, some GLSL compilers don't allow anything after #line N --- hlslang/MachineIndependent/preprocessor/sourceloc.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hlslang/MachineIndependent/preprocessor/sourceloc.h b/hlslang/MachineIndependent/preprocessor/sourceloc.h index 469af60..67c54b2 100644 --- a/hlslang/MachineIndependent/preprocessor/sourceloc.h +++ b/hlslang/MachineIndependent/preprocessor/sourceloc.h @@ -55,12 +55,11 @@ inline void OutputLineDirective(std::stringstream& s, const TSourceLoc& l) s << "#line " << l.line; // GLSL spec (1.10 & 1.20) doesn't allow printing file name here; only an integer "string number". - // So just print file name as a comment. - if(l.file) - { - s << " // "; - s << l.file; - } + //if(l.file) + //{ + // s << " // "; + // s << l.file; + //} s << '\n'; }