summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_print_visitor.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-09-05 01:48:11 -0700
committerKenneth Graunke <[email protected]>2010-09-07 17:30:38 -0700
commitf412fac5b46eb274cbed8e62234d5dbfd859f1fe (patch)
tree89bbe21c6ba90bdfc59e850ebda738e329fc1fff /src/glsl/ir_print_visitor.cpp
parentc98deb18d5836f75cf62562f9304e4d90e0ea920 (diff)
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.
Diffstat (limited to 'src/glsl/ir_print_visitor.cpp')
-rw-r--r--src/glsl/ir_print_visitor.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index 9d81cef9f85..eff950ebd79 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -153,15 +153,14 @@ void ir_print_visitor::visit(ir_function_signature *ir)
void ir_print_visitor::visit(ir_function *ir)
{
- /* Don't print built-in functions as part of the IR. */
- if (ir->is_builtin)
- return;
-
printf("(function %s\n", ir->name);
indentation++;
foreach_iter(exec_list_iterator, iter, *ir) {
ir_function_signature *const sig = (ir_function_signature *) iter.get();
+ if (sig->is_builtin)
+ continue;
+
indent();
sig->accept(this);
printf("\n");