From b65861fc32a54d28b3fbbaf0d31bb1d71889f570 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Wed, 12 Jul 2017 13:32:24 -0700 Subject: Use C-style line directives, even for GLSL - As long as we are always going to pass GLSL through glslang, there should be no harm in this - Eventually we may need to re-enable the old style --- source/slang/emit.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source/slang/emit.cpp') diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 03cc7d8aa..3a5acd024 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -450,7 +450,17 @@ struct EmitVisitor emitRawText(" "); - if(context->shared->target == CodeGenTarget::GLSL) + bool shouldUseGLSLStyleLineDirective = false; + + // Let's not do this +#if 0 + if (context->shared->target == CodeGenTarget::GLSL) + { + shouldUseGLSLStyleLineDirective = true; + } +#endif + + if(shouldUseGLSLStyleLineDirective) { auto path = sourceLocation.FileName; -- cgit v1.2.3