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/linker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/glsl/linker.cpp') diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 4d84ab39b3..78f3a7402b 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -740,14 +740,14 @@ link_intrastage_shaders(GLcontext *ctx, ir_function_signature *sig = (ir_function_signature *) iter.get(); - if (!sig->is_defined || f->is_builtin) + if (!sig->is_defined || sig->is_builtin) continue; ir_function_signature *other_sig = other->exact_matching_signature(& sig->parameters); if ((other_sig != NULL) && other_sig->is_defined - && !other_sig->function()->is_builtin) { + && !other_sig->is_builtin) { linker_error_printf(prog, "function `%s' is multiply defined", f->name); -- cgit v1.2.3