diff options
author | Timothy Arceri <[email protected]> | 2019-08-14 14:24:31 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-11-20 05:05:55 +0000 |
commit | 67b32190f3c953c5b7091d76ddeff95c0cbfb439 (patch) | |
tree | f80299cbb521fb547dd685dd46a5aae6b06bc7ef /src/compiler/glsl/glsl_parser_extras.h | |
parent | 2497c517176c2c9bd418d7d54eaef9aba0711727 (diff) |
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 <line> <source-string-number>
#line <line> "<path>"
where <line> and <source-string-number> are constant integer
expressions and <path> 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 <line> and source string number <source-string-number>
or <path> path. Subsequent source strings will be numbered
sequentially, until another #line directive overrides that
numbering."
Reviewed-by: Witold Baryluk <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser_extras.h')
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |