From f412fac5b46eb274cbed8e62234d5dbfd859f1fe Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sun, 5 Sep 2010 01:48:11 -0700 Subject: glsl: Move is_builtin flag back to ir_function_signature. This effectively reverts b6f15869b324ae64a00d0fe46fa3c8c62c1edb6c. In desktop GLSL, defining a function with the same name as a built-in hides that built-in function completely, so there would never be built-in and user function signatures in the same ir_function. However, in GLSL ES, overloading built-ins is allowed, and does not hide the built-in signatures - so we're back to needing this. --- src/glsl/ir_reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/glsl/ir_reader.cpp') diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index 04b982974e..a9cbf8ea94 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -218,7 +218,6 @@ read_function(_mesa_glsl_parse_state *st, s_list *list, bool skip_body) ir_function *f = st->symbols->get_function(name->value()); if (f == NULL) { f = new(ctx) ir_function(name->value()); - f->is_builtin = true; added = st->symbols->add_function(f->name, f); assert(added); } @@ -291,6 +290,7 @@ read_function_sig(_mesa_glsl_parse_state *st, ir_function *f, s_list *list, if (sig == NULL && skip_body) { /* If scanning for prototypes, generate a new signature. */ sig = new(ctx) ir_function_signature(return_type); + sig->is_builtin = true; f->add_signature(sig); } else if (sig != NULL) { const char *badvar = sig->qualifiers_match(&hir_parameters); -- cgit v1.2.3