glsl: add ARB_shading_language_include support to #line
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 14 Aug 2019 04:24:31 +0000 (14:24 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 20 Nov 2019 05:05:55 +0000 (05:05 +0000)
commit67b32190f3c953c5b7091d76ddeff95c0cbfb439
treef80299cbb521fb547dd685dd46a5aae6b06bc7ef
parent2497c517176c2c9bd418d7d54eaef9aba0711727
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 <witold.baryluk@gmail.com>
src/compiler/glsl/ast.h
src/compiler/glsl/glcpp/glcpp-lex.l
src/compiler/glsl/glcpp/glcpp-parse.y
src/compiler/glsl/glsl_lexer.ll
src/compiler/glsl/glsl_parser.yy
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/glsl_parser_extras.h