Mesa (master): glsl: Reduce a bit of extra code in the merging of layout qualifiers.
Eric Anholt
anholt at kemper.freedesktop.org
Mon Jul 9 19:45:08 UTC 2012
Module: Mesa
Branch: master
Commit: f4fb6bf08811cc69c1e635cf0af198ded197bcb0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f4fb6bf08811cc69c1e635cf0af198ded197bcb0
Author: Eric Anholt <eric at anholt.net>
Date: Tue Apr 24 12:18:17 2012 -0700
glsl: Reduce a bit of extra code in the merging of layout qualifiers.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/glsl/glsl_parser.yy | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 9ad67e2..531d257 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;
More information about the mesa-commit
mailing list