glsl: Disable ordering checks for const parameters with 420pack.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 16 Jul 2013 00:02:21 +0000 (17:02 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 18 Jul 2013 23:57:22 +0000 (16:57 -0700)
This makes the complier accept both "const in" and "in const".

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/glsl_parser.yy

index 1ce28e2e1219a18b07fbd9b92a0f203531f69e15..ff57c29741f2c1e43bee17093b5a93bfd2b5b19b 100644 (file)
@@ -898,7 +898,7 @@ parameter_qualifier:
       if (($1.flags.q.in || $1.flags.q.out) && ($2.flags.q.in || $2.flags.q.out))
          _mesa_glsl_error(&@1, state, "duplicate in/out/inout qualifier\n");
 
-      if ($2.flags.q.constant)
+      if (!state->ARB_shading_language_420pack_enable && $2.flags.q.constant)
          _mesa_glsl_error(&@1, state, "const must be specified before "
                           "in/out/inout.\n");