glsl: Change from has_builtin_signature to has_user_signature.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 16 Sep 2010 09:52:25 +0000 (02:52 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 16 Sep 2010 09:52:25 +0000 (02:52 -0700)
The print visitor needs this, and the only existing user can work with
has_user_signature just as well.

src/glsl/ast_to_hir.cpp
src/glsl/ir.cpp
src/glsl/ir.h

index 31bb40dd138e71a4c7f6d59f14c125bb71aa5e30..96385449bd642eea4a939ac291ea8367fa3faddd 100644 (file)
@@ -2285,7 +2285,7 @@ ast_function::hir(exec_list *instructions,
     * that the previously seen signature does not have an associated definition.
     */
    f = state->symbols->get_function(name);
-   if (f != NULL && (state->es_shader || !f->has_builtin_signature())) {
+   if (f != NULL && (state->es_shader || f->has_user_signature())) {
       sig = f->exact_matching_signature(&hir_parameters);
       if (sig != NULL) {
         const char *badvar = sig->qualifiers_match(&hir_parameters);
index 86dc49015433fe8a8aa0f412e4aad433daab20da..7cc55d40b78846c388154f4e790b59da58c15296 100644 (file)
@@ -1137,11 +1137,11 @@ ir_function::ir_function(const char *name)
 
 
 bool
-ir_function::has_builtin_signature()
+ir_function::has_user_signature()
 {
    foreach_list(n, &this->signatures) {
       ir_function_signature *const sig = (ir_function_signature *) n;
-      if (sig->is_builtin)
+      if (!sig->is_builtin)
         return true;
    }
    return false;
index 70c6faaf156543138042c659c5f19da7ceb61936..b3b15bb08ed71114aaef755ad156494e59e2c03c 100644 (file)
@@ -410,8 +410,8 @@ public:
     */
    const char *name;
 
-   /** Whether or not this function has a signature that is a built-in. */
-   bool has_builtin_signature();
+   /** Whether or not this function has a signature that isn't a built-in. */
+   bool has_user_signature();
 
    /**
     * List of ir_function_signature for each overloaded function with this name.