glsl: Don't add structure fields to the symbol table
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 6 Dec 2012 22:57:01 +0000 (14:57 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 8 Jan 2013 21:09:31 +0000 (13:09 -0800)
I erroneously added this back in January 2011 in commit 88421589.
Looking at the commit message, I have no idea why I added it.  It only
added non-array structure fields to the symbol table, so array structure
fields are treated correctly.

Fixes piglit tests structure-and-field-have-same-name.vert and
structure-and-field-have-same-name-nested.vert.  It should also fix
WebGL conformance tests shader-with-non-reserved-words.

NOTE: This is a candidate for the stable release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57622
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/glsl_parser.yy

index d8494667bf2d34b041fc27439f9c774eb53642eb..88aae64d424d5d24a4e64ee38163e8fc5889043c 100644 (file)
@@ -1542,7 +1542,6 @@ struct_declarator:
           void *ctx = state;
           $$ = new(ctx) ast_declaration($1, false, NULL, NULL);
           $$->set_location(yylloc);
-          state->symbols->add_variable(new(state) ir_variable(NULL, $1, ir_var_auto));
        }
        | any_identifier '[' constant_expression ']'
        {