[Mesa-dev] [PATCH 4/8] glcpp: Honor the GL context's DisableGLSLLineContinuations option

Carl Worth cworth at cworth.org
Wed Dec 5 17:32:13 PST 2012


And simply don't call into the function that removes line continuations.
---
 src/glsl/glcpp/pp.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/glsl/glcpp/pp.c b/src/glsl/glcpp/pp.c
index 5f86a49..3f33648 100644
--- a/src/glsl/glcpp/pp.c
+++ b/src/glsl/glcpp/pp.c
@@ -155,7 +155,9 @@ glcpp_preprocess(void *ralloc_ctx, const char **shader, char **info_log,
 {
 	int errors;
 	glcpp_parser_t *parser = glcpp_parser_create (extensions, gl_ctx->API);
-	*shader = remove_line_continuations(parser, *shader);
+
+	if (! gl_ctx->Const.DisableGLSLLineContinuations)
+		*shader = remove_line_continuations(parser, *shader);
 
 	glcpp_lex_set_source_string (parser, *shader);
 
-- 
1.7.10



More information about the mesa-dev mailing list