summaryrefslogtreecommitdiff
path: root/glsl_parser.ypp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-07 19:02:44 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-07 19:03:03 -0700
commit19eb5896c4f47a8485a7be2d7b63c6f44dff1b42 (patch)
tree8c52bfe98194fbf7d13cdd849d0d8ba9c6d18fd5 /glsl_parser.ypp
parent9bcb67bdc4d3f6aee9ef577266aebca85fcfb44f (diff)
Only allow global precision qualifier for int and float
This causes the following tests to pass: glslparsertest/glsl2/precision-03.vert
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 */
}
;