glsl: Skip unavailable built-ins when printing out similar candidates.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 3 Sep 2013 06:14:43 +0000 (23:14 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Sep 2013 18:52:21 +0000 (11:52 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/ast_function.cpp

index 7580bec3209ce4660bf56f2826ad9497833c4862..e0fdfc3fe32e70f1603715f76519f85e3ea1006a 100644 (file)
@@ -472,6 +472,9 @@ no_matching_function_error(const char *name,
       foreach_list (node, &f->signatures) {
         ir_function_signature *sig = (ir_function_signature *) node;
 
+         if (sig->is_builtin() && !sig->is_builtin_available(state))
+            continue;
+
         str = prototype_string(sig->return_type, f->name, &sig->parameters);
         _mesa_glsl_error(loc, state, "%s%s", prefix, str);
         ralloc_free(str);