summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2013-07-15 18:42:26 -0700
committerKenneth Graunke <kenneth@whitecape.org>2013-07-18 16:57:23 -0700
commit844307a58470f88cf895789a6f797a0722d11434 (patch)
treec5ddbd53d5473b975d440488a670332d745dc88b
parent6eec502e84f2b4f6118544e78d2e97928618ba0f (diff)
glsl: Allow precision qualifiers to be flexibly ordered with 420pack.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--src/glsl/glsl_parser.yy4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 08806a32bcf..5a7db874df2 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -908,7 +908,7 @@ parameter_qualifier:
if ($2.precision != ast_precision_none)
_mesa_glsl_error(&@1, state, "Duplicate precision qualifier.\n");
- if ($2.flags.i != 0)
+ if (!state->ARB_shading_language_420pack_enable && $2.flags.i != 0)
_mesa_glsl_error(&@1, state, "Precision qualifiers must come last.\n");
$$ = $2;
@@ -1433,7 +1433,7 @@ type_qualifier:
if ($2.precision != ast_precision_none)
_mesa_glsl_error(&@1, state, "Duplicate precision qualifier.\n");
- if ($2.flags.i != 0)
+ if (!state->ARB_shading_language_420pack_enable && $2.flags.i != 0)
_mesa_glsl_error(&@1, state, "Precision qualifiers must come last.\n");
$$ = $2;