From 33ddc8e865e67f3dabcd1b598f4e978be6c7be6f Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 5 Nov 2015 11:03:44 -0600 Subject: 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 --- src/glsl/glsl_parser.yy | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3