From: Ian Romanick Date: Tue, 8 Jun 2010 02:02:44 +0000 (-0700) Subject: Only allow global precision qualifier for int and float X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19eb5896c4f47a8485a7be2d7b63c6f44dff1b42;p=mesa.git Only allow global precision qualifier for int and float This causes the following tests to pass: glslparsertest/glsl2/precision-03.vert --- diff --git a/glsl_parser.ypp b/glsl_parser.ypp index 4de1ec9591c..99c6ca132c7 100644 --- a/glsl_parser.ypp +++ b/glsl_parser.ypp @@ -628,6 +628,13 @@ declaration: } | PRECISION precision_qualifier type_specifier_no_prec ';' { + if (($3->type_specifier != ast_float) + && ($3->type_specifier != ast_int)) { + _mesa_glsl_error(& @3, state, "global precision qualifier can " + "only be applied to `int' or `float'\n"); + YYERROR; + } + $$ = NULL; /* FINISHME */ } ;