From: Ryan Houdek Date: Thu, 5 Nov 2015 17:03:44 +0000 (-0600) Subject: glsl: add a parse check to check for the index layout qualifier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=33ddc8e865e67f3dabcd1b598f4e978be6c7be6f;p=mesa.git glsl: add a parse check to check for the index layout qualifier This can only be used if EXT_blend_func_extended is enabled Reviewed-by: Ian Romanick Reviewed-by: Ilia Mirkin --- diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index adf6a05acce..403cbd1564a 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -1476,6 +1476,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; + } + $$.flags.q.explicit_index = 1; if ($3 >= 0) {