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_import_prototypes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/glsl/ir_import_prototypes.cpp') diff --git a/src/glsl/ir_import_prototypes.cpp b/src/glsl/ir_import_prototypes.cpp index a39b384071..066137e60a 100644 --- a/src/glsl/ir_import_prototypes.cpp +++ b/src/glsl/ir_import_prototypes.cpp @@ -59,7 +59,6 @@ public: this->function = this->symbols->get_function(ir->name); if (!this->function) { this->function = new(this->mem_ctx) ir_function(ir->name); - this->function->is_builtin = ir->is_builtin; list->push_tail(this->function); @@ -87,6 +86,7 @@ public: new(mem_ctx) ir_function_signature(ir->return_type); copy->is_defined = false; + copy->is_builtin = ir->is_builtin; /* Clone the parameter list, but NOT the body. */ -- cgit v1.2.3