summaryrefslogtreecommitdiff
path: root/glsl_parser.ypp
diff options
context:
space:
mode:
Diffstat (limited to 'glsl_parser.ypp')
-rw-r--r--glsl_parser.ypp7
1 files changed, 7 insertions, 0 deletions
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 */
}
;