summaryrefslogtreecommitdiff
path: root/src/glsl/glsl_types.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-08-21 20:23:18 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-08-26 09:19:48 -0700
commite9c7ceed27f6811ad1cae46c93ce9bc3fb3668d8 (patch)
treee66302bca944353decf9b78291effb9cee7a4982 /src/glsl/glsl_types.cpp
parent86ddb356e8278423ef41125be627e57e073471d1 (diff)
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.
Diffstat (limited to 'src/glsl/glsl_types.cpp')
-rw-r--r--src/glsl/glsl_types.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
index 2e5c2ecf04..a7d02e18df 100644
--- a/src/glsl/glsl_types.cpp
+++ b/src/glsl/glsl_types.cpp
@@ -233,18 +233,11 @@ _mesa_glsl_release_types(void)
ir_function *
-glsl_type::generate_constructor(glsl_symbol_table *symtab) const
+glsl_type::generate_constructor() const
{
- void *ctx = symtab;
+ void *ctx = (void *) this;
- /* Generate the function name and add it to the symbol table.
- */
ir_function *const f = new(ctx) ir_function(name);
-
- bool added = symtab->add_function(name, f);
- assert(added);
- (void) added;
-
ir_function_signature *const sig = new(ctx) ir_function_signature(this);
f->add_signature(sig);