[Mesa-dev] [PATCH] glsl/parser: handle multiple layout sections with AST nodes.

Chris Forbes chrisf at ijw.co.nz
Mon May 23 06:23:49 UTC 2016


Eek, that would do it.

Reviewed-by: Chris Forbes <chrisforbes at google.com>

On Mon, May 23, 2016 at 5:55 PM, Dave Airlie <airlied at gmail.com> wrote:

> From: Dave Airlie <airlied at redhat.com>
>
> For geometry/compute inputs and tess control outputs, we create
> an AST node to keep track of some things. However if we have
> multiple layout sections, we don't ever link the node into the AST.
>
> This is because we create the node on the rightmost layout declaration
> and don't pass it back in so it gets linked at the end of the parsing
> of the rightmost.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/compiler/glsl/glsl_parser.yy | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/compiler/glsl/glsl_parser.yy
> b/src/compiler/glsl/glsl_parser.yy
> index 09e346d..3885688 100644
> --- a/src/compiler/glsl/glsl_parser.yy
> +++ b/src/compiler/glsl/glsl_parser.yy
> @@ -2859,6 +2859,7 @@ layout_in_defaults:
>                  merge_in_qualifier(& @1, state, $1, $$, false)) {
>              YYERROR;
>           }
> +         $$ = $2;
>        }
>     }
>     | layout_qualifier IN_TOK ';'
> @@ -2883,6 +2884,7 @@ layout_out_defaults:
>                  merge_out_qualifier(& @1, state, $1, $$, false)) {
>              YYERROR;
>           }
> +         $$ = $2;
>        }
>     }
>     | layout_qualifier OUT_TOK ';'
> --
> 2.5.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160523/33c0b62c/attachment.html>


More information about the mesa-dev mailing list