Commit graph

10 commits

Author SHA1 Message Date
Kenneth Graunke
21031b4e88 glsl: Don't bother unsetting a destructor that was never set.
This was totally copied and pasted from glsl_symbol_table.
2011-01-19 23:40:33 -08:00
Kenneth Graunke
c17c790387 glsl: Properly add functions during lazy built-in prototype importing.
The original lazy built-in importing patch did not add the newly created
function to the symbol table, nor actually emit it into the IR stream.

Adding it to the symbol table is non-trivial since importing occurs when
generating some ir_call in a nested scope.  A new add_global_function
method, backed by new symbol_table code in the previous patch, handles
this.

Fixes bug #32030.
2010-12-06 13:43:22 -08:00
Eric Anholt
001eee52d4 glsl: Make the symbol table's add_variable just use the variable's name. 2010-11-29 17:08:27 -08:00
Eric Anholt
e8f5ebf313 glsl: Make the symbol table's add_function just use the function's name. 2010-11-29 17:08:27 -08:00
Ian Romanick
e466b182bb glsl2: Remove unnecessary glsl_symbol_table::get_function parameter return_constructors
Now that constructors are not generated as functions or stored in the
symbol table, there is no need to flag whether or not constructors
should be returned.
2010-09-01 20:39:09 -07:00
Ian Romanick
16d9ebb357 glsl2: Remove unused 'constructor' parameter from glsl_symbol_table::add_type 2010-09-01 20:39:09 -07:00
Ian Romanick
a789ca649c glsl2: Don't generate constructor functions for structures 2010-09-01 20:39:09 -07:00
José Fonseca
ccd8b935e4 glsl: Silence unused variable warning. 2010-08-30 13:53:15 +01:00
Kenneth Graunke
ac2376e6f5 glsl: Don't add overloads to existing structure constructors.
Instead, make a new ir_function and try to add it to the symbol table.

Fixes piglit test redeclaration-08.vert.
2010-08-26 09:19:48 -07:00
Kenneth Graunke
e9c7ceed27 glsl: Use a single shared namespace in the symbol table.
As of 1.20, variable names, function names, and structure type names all
share a single namespace, and should conflict with one another in the
same scope, or hide each other in nested scopes.

However, in 1.10, variables and functions can share the same name in the
same scope.  Structure types, however, conflict with/hide both.

Fixes piglit tests redeclaration-06.vert, redeclaration-11.vert,
redeclaration-19.vert, and struct-05.vert.
2010-08-26 09:19:48 -07:00