Only allow global precision qualifier for int and float

This causes the following tests to pass:

    glslparsertest/glsl2/precision-03.vert
This commit is contained in:
Ian Romanick 2010-06-07 19:02:44 -07:00
parent 9bcb67bdc4
commit 19eb5896c4

View file

@ -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 */
}
;