[Mesa-dev] [PATCH 02/18] glsl: Reduce a bit of extra code in the merging of layout qualifiers.

Eric Anholt eric at anholt.net
Mon Jul 2 17:38:11 PDT 2012


---
 src/glsl/glsl_parser.yy |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index e688b48..248376b 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;
-- 
1.7.10



More information about the mesa-dev mailing list