glsl: Reduce a bit of extra code in the merging of layout qualifiers.
authorEric Anholt <eric@anholt.net>
Tue, 24 Apr 2012 19:18:17 +0000 (12:18 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 9 Jul 2012 18:05:33 +0000 (11:05 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/glsl_parser.yy

index 9ad67e2..531d257 100644 (file)
@@ -1100,13 +1100,8 @@ layout_qualifier_id_list:
              YYERROR;
           }
 
-          $$.flags.i = $1.flags.i | $3.flags.i;
-
-          if ($1.flags.q.explicit_location)
-             $$.location = $1.location;
-
-          if ($1.flags.q.explicit_index)
-             $$.index = $1.index;
+          $$ = $1;
+          $$.flags.i |= $3.flags.i;
 
           if ($3.flags.q.explicit_location)
              $$.location = $3.location;