From 67b32190f3c953c5b7091d76ddeff95c0cbfb439 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 14 Aug 2019 14:24:31 +1000 Subject: glsl: add ARB_shading_language_include support to #line From the ARB_shading_language_include spec: "#line must have, after macro substitution, one of the following forms: #line #line #line "" where and are constant integer expressions and is a valid string for a path supplied in the #include directive. After processing this directive (including its new-line), the implementation will behave as if it is compiling at line number and source string number or path. Subsequent source strings will be numbered sequentially, until another #line directive overrides that numbering." Reviewed-by: Witold Baryluk --- src/compiler/glsl/glsl_parser_extras.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/glsl/glsl_parser_extras.h') diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h index 33db8b5b656..444a51dfdb5 100644 --- a/src/compiler/glsl/glsl_parser_extras.h +++ b/src/compiler/glsl/glsl_parser_extras.h @@ -68,6 +68,8 @@ typedef struct YYLTYPE { int last_line; int last_column; unsigned source; + /* Path for ARB_shading_language_include include source */ + char *path; } YYLTYPE; # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 -- cgit v1.2.3