summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2015-10-15 14:47:34 -0700
committerJordan Justen <[email protected]>2015-10-31 23:17:06 -0700
commit218e94906d877889b2b124187d8e17b7f0879122 (patch)
tree9877bde72317da429c72736aeede7038b570e949
parentb6e9b2b7a0affabd80f14d63284cd0ffe4745136 (diff)
glsl: OpenGLES GLSL 3.1 precision qualifiers ordering rules
The OpenGLES GLSL 3.1 specification uses the precision qualifier ordering rules from ARB_shading_language_420pack. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Marta Lofstedt <[email protected]>
-rw-r--r--src/glsl/glsl_parser.yy6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 2f2e10d7992..4636435f191 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -948,7 +948,8 @@ parameter_qualifier:
if ($2.precision != ast_precision_none)
_mesa_glsl_error(&@1, state, "duplicate precision qualifier");
- if (!state->has_420pack() && $2.flags.i != 0)
+ if (!(state->has_420pack() || state->is_version(420, 310)) &&
+ $2.flags.i != 0)
_mesa_glsl_error(&@1, state, "precision qualifiers must come last");
$$ = $2;
@@ -1847,7 +1848,8 @@ type_qualifier:
if ($2.precision != ast_precision_none)
_mesa_glsl_error(&@1, state, "duplicate precision qualifier");
- if (!state->has_420pack() && $2.flags.i != 0)
+ if (!(state->has_420pack() || state->is_version(420, 310)) &&
+ $2.flags.i != 0)
_mesa_glsl_error(&@1, state, "precision qualifiers must come last");
$$ = $2;