[Mesa-dev] [PATCH v3 5/8] glsl: Add a parse check to check for the index layout qualifier

Ian Romanick idr at freedesktop.org
Fri Nov 6 10:08:38 PST 2015


On 11/05/2015 06:47 PM, Ryan Houdek wrote:
> This can only be used if EXT_blend_func_extended is enabled
> ---
>  src/glsl/glsl_parser.yy | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> index 4636435..40e60e5 100644
> --- a/src/glsl/glsl_parser.yy
> +++ b/src/glsl/glsl_parser.yy
> @@ -1463,6 +1463,11 @@ layout_qualifier_id:
>        }
>  
>        if (match_layout_qualifier("index", $1, state) == 0) {
> +         if (state->es_shader && !state->EXT_blend_func_extended_enable) {
> +            _mesa_glsl_error(& @3, state, "index layout qualifier requires EXT_blend_func_extended");
> +            YYERROR;
> +         }
> +

It seems like more changes should be necessary in this area.  Did we not
previously generate errors in an ES 3.0 shader that used the index
layout qualifier?

>           $$.flags.q.explicit_index = 1;
>  
>           if ($3 >= 0) {
> 



More information about the mesa-dev mailing list