diff options
Diffstat (limited to 'src/glsl/glsl_parser.ypp')
-rw-r--r-- | src/glsl/glsl_parser.ypp | 66 |
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: |