summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-09-05 01:32:32 -0700
committerKenneth Graunke <[email protected]>2010-09-07 17:30:37 -0700
commitc5e74871d9e4b555f3927fd11944c769d466bd12 (patch)
tree825fa8b99437fdf49016705dcd7aa98025e367df /src/glsl/glsl_parser.cpp
parent7dcfc44b72f00ba5a38cb02123c80113440f0de9 (diff)
glsl: Recognize GLSL ES 1.00 keywords.
Diffstat (limited to 'src/glsl/glsl_parser.cpp')
-rw-r--r--src/glsl/glsl_parser.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/glsl/glsl_parser.cpp b/src/glsl/glsl_parser.cpp
index 8eae6b42103..301c2218927 100644
--- a/src/glsl/glsl_parser.cpp
+++ b/src/glsl/glsl_parser.cpp
@@ -4529,16 +4529,16 @@ yyreduce:
/* Line 1464 of yacc.c */
#line 1152 "glsl_parser.ypp"
{
- if (state->language_version < 130)
- _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
- "precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
- "required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ if (!state->es_shader && state->language_version < 130)
+ _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
+ "precision qualifier forbidden "
+ "in GLSL %d.%d (1.30 or later "
+ "required)\n",
+ state->language_version / 100,
+ state->language_version % 100);
- (yyval.n) = ast_precision_high;
- ;}
+ (yyval.n) = ast_precision_high;
+ ;}
break;
case 217:
@@ -4546,16 +4546,16 @@ yyreduce:
/* Line 1464 of yacc.c */
#line 1163 "glsl_parser.ypp"
{
- if (state->language_version < 130)
- _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
- "precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
- "required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ if (!state->es_shader && state->language_version < 130)
+ _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
+ "precision qualifier forbidden "
+ "in GLSL %d.%d (1.30 or later "
+ "required)\n",
+ state->language_version / 100,
+ state->language_version % 100);
- (yyval.n) = ast_precision_medium;
- ;}
+ (yyval.n) = ast_precision_medium;
+ ;}
break;
case 218:
@@ -4563,16 +4563,16 @@ yyreduce:
/* Line 1464 of yacc.c */
#line 1174 "glsl_parser.ypp"
{
- if (state->language_version < 130)
- _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
- "precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
- "required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ if (!state->es_shader && state->language_version < 130)
+ _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
+ "precision qualifier forbidden "
+ "in GLSL %d.%d (1.30 or later "
+ "required)\n",
+ state->language_version / 100,
+ state->language_version % 100);
- (yyval.n) = ast_precision_low;
- ;}
+ (yyval.n) = ast_precision_low;
+ ;}
break;
case 219: