From 844307a58470f88cf895789a6f797a0722d11434 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 15 Jul 2013 18:42:26 -0700 Subject: [PATCH] glsl: Allow precision qualifiers to be flexibly ordered with 420pack. Signed-off-by: Kenneth Graunke Reviewed-by: Matt Turner --- src/glsl/glsl_parser.yy | 4 ++-- 1 file 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; -- 2.30.2