summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.ypp
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-01-20 22:43:18 +0100
committerChristian König <[email protected]>2011-01-20 22:43:18 +0100
commit78faf8d0e9c276a0ff1465e501d58fb3d66de2f7 (patch)
tree4e124bd6b511e408c5e113c4166b8fa97fd75b24 /src/glsl/glsl_parser.ypp
parentd2ff6b8715e817c1ef14d4bf12be58c19d894143 (diff)
parent37233f1ee0213a224611788bbab38840ba9f8308 (diff)
Merge remote branch 'origin/master' into pipe-video
Conflicts: src/gallium/drivers/r600/r600_asm.c
Diffstat (limited to 'src/glsl/glsl_parser.ypp')
-rw-r--r--src/glsl/glsl_parser.ypp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/glsl/glsl_parser.ypp b/src/glsl/glsl_parser.ypp
index 124ee18356d..3982167c482 100644
--- a/src/glsl/glsl_parser.ypp
+++ b/src/glsl/glsl_parser.ypp
@@ -276,16 +276,16 @@ extension_statement:
external_declaration_list:
external_declaration
{
- /* FINISHME: The NULL test is only required because 'precision'
- * FINISHME: statements are not yet supported.
+ /* FINISHME: The NULL test is required because pragmas are set to
+ * FINISHME: NULL. (See production rule for external_declaration.)
*/
if ($1 != NULL)
state->translation_unit.push_tail(& $1->link);
}
| external_declaration_list external_declaration
{
- /* FINISHME: The NULL test is only required because 'precision'
- * FINISHME: statements are not yet supported.
+ /* FINISHME: The NULL test is required because pragmas are set to
+ * FINISHME: NULL. (See production rule for external_declaration.)
*/
if ($2 != NULL)
state->translation_unit.push_tail(& $2->link);
@@ -702,14 +702,9 @@ 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 */
+ $3->precision = $2;
+ $3->is_precision_statement = true;
+ $$ = $3;
}
;
@@ -1195,6 +1190,9 @@ storage_qualifier:
type_specifier:
type_specifier_no_prec
+ {
+ $$ = $1;
+ }
| precision_qualifier type_specifier_no_prec
{
$$ = $2;