summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-04-24 12:18:17 -0700
committerEric Anholt <[email protected]>2012-07-09 11:05:33 -0700
commitf4fb6bf08811cc69c1e635cf0af198ded197bcb0 (patch)
tree970e73817ce17517d81a1447a6c0812fd9269fa2 /src/glsl/glsl_parser.yy
parent60a784d56e0034d32b9c243afd860cf095d3d2c5 (diff)
glsl: Reduce a bit of extra code in the merging of layout qualifiers.
Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser.yy')
-rw-r--r--src/glsl/glsl_parser.yy9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 9ad67e27881..531d257c9d1 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -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;