aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.ypp
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.ypp
parent7dcfc44b72f00ba5a38cb02123c80113440f0de9 (diff)
glsl: Recognize GLSL ES 1.00 keywords.
Diffstat (limited to 'src/glsl/glsl_parser.ypp')
-rw-r--r--src/glsl/glsl_parser.ypp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/glsl/glsl_parser.ypp b/src/glsl/glsl_parser.ypp
index 594e4459303..0df1e480ce3 100644
--- a/src/glsl/glsl_parser.ypp
+++ b/src/glsl/glsl_parser.ypp
@@ -1149,39 +1149,39 @@ basic_type_specifier_nonarray:
;
precision_qualifier:
- HIGHP {
- if (state->language_version < 130)
- _mesa_glsl_error(& @1, state,
- "precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
- "required)\n",
- state->language_version / 100,
- state->language_version % 100);
-
- $$ = ast_precision_high;
- }
- | MEDIUMP {
- if (state->language_version < 130)
- _mesa_glsl_error(& @1, state,
- "precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
- "required)\n",
- state->language_version / 100,
- state->language_version % 100);
-
- $$ = ast_precision_medium;
- }
- | LOWP {
- if (state->language_version < 130)
- _mesa_glsl_error(& @1, state,
- "precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
- "required)\n",
- state->language_version / 100,
- state->language_version % 100);
-
- $$ = ast_precision_low;
- }
+ HIGHP {
+ if (!state->es_shader && state->language_version < 130)
+ _mesa_glsl_error(& @1, state,
+ "precision qualifier forbidden "
+ "in GLSL %d.%d (1.30 or later "
+ "required)\n",
+ state->language_version / 100,
+ state->language_version % 100);
+
+ $$ = ast_precision_high;
+ }
+ | MEDIUMP {
+ if (!state->es_shader && state->language_version < 130)
+ _mesa_glsl_error(& @1, state,
+ "precision qualifier forbidden "
+ "in GLSL %d.%d (1.30 or later "
+ "required)\n",
+ state->language_version / 100,
+ state->language_version % 100);
+
+ $$ = ast_precision_medium;
+ }
+ | LOWP {
+ if (!state->es_shader && state->language_version < 130)
+ _mesa_glsl_error(& @1, state,
+ "precision qualifier forbidden "
+ "in GLSL %d.%d (1.30 or later "
+ "required)\n",
+ state->language_version / 100,
+ state->language_version % 100);
+
+ $$ = ast_precision_low;
+ }
;
struct_specifier: