diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-07 19:02:44 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-07 19:03:03 -0700 |
commit | 19eb5896c4f47a8485a7be2d7b63c6f44dff1b42 (patch) | |
tree | 8c52bfe98194fbf7d13cdd849d0d8ba9c6d18fd5 | |
parent | 9bcb67bdc4d3f6aee9ef577266aebca85fcfb44f (diff) |
Only allow global precision qualifier for int and float
This causes the following tests to pass:
glslparsertest/glsl2/precision-03.vert
-rw-r--r-- | glsl_parser.ypp | 7 |
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 */ } ; |