glsl: Allow duplicate layout qualifiers with 420pack.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 18 Jul 2013 23:31:05 +0000 (16:31 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 18 Jul 2013 23:57:22 +0000 (16:57 -0700)
The new 4.20 rules explicitly allow multiple layout(...) sections.

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

index c31f5e264813fc5dfeaa2ebf25b16cc8e93c3637..381fa2b52891cf67b1b19233f424cd9d6f15dab8 100644 (file)
@@ -1385,7 +1385,7 @@ type_qualifier:
        * appear to be any text indicating that it must come before the storage
        * qualifier, but always seems to in examples.
        */
-      if ($2.has_layout())
+      if (!state->ARB_shading_language_420pack_enable && $2.has_layout())
          _mesa_glsl_error(&@1, state, "Duplicate layout(...) qualifiers.\n");
 
       if ($2.flags.q.invariant)