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.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/glsl/ir.h') diff --git a/src/glsl/ir.h b/src/glsl/ir.h index efe59d8064..0d933024df 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -342,6 +342,9 @@ public: /** Whether or not this function has a body (which may be empty). */ unsigned is_defined:1; + /** Whether or not this function signature is a built-in. */ + unsigned is_builtin:1; + /** Body of instructions in the function. */ struct exec_list body; @@ -407,8 +410,8 @@ public: */ const char *name; - /** Whether or not this function is a built-in. */ - unsigned is_builtin:1; + /** Whether or not this function has a signature that is a built-in. */ + bool has_builtin_signature(); /** * List of ir_function_signature for each overloaded function with this name. -- cgit v1.2.3