projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bcb67b
)
Only allow global precision qualifier for int and float
author
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 8 Jun 2010 02:02:44 +0000
(19:02 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 8 Jun 2010 02:03:03 +0000
(19:03 -0700)
This causes the following tests to pass:
glslparsertest/glsl2/precision-03.vert
glsl_parser.ypp
patch
|
blob
|
history
diff --git
a/glsl_parser.ypp
b/glsl_parser.ypp
index 4de1ec9591ce117dd3a37236068d25ca51001947..99c6ca132c7378be42adf273c7258ec40b9b28f5 100644
(file)
--- 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 */
}
;