From 19eb5896c4f47a8485a7be2d7b63c6f44dff1b42 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 7 Jun 2010 19:02:44 -0700 Subject: Only allow global precision qualifier for int and float This causes the following tests to pass: glslparsertest/glsl2/precision-03.vert --- glsl_parser.ypp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/glsl_parser.ypp b/glsl_parser.ypp index 4de1ec9591..99c6ca132c 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 */ } ; -- cgit v1.2.3