From: Kenneth Graunke Date: Tue, 3 Sep 2013 06:14:43 +0000 (-0700) Subject: glsl: Skip unavailable built-ins when printing out similar candidates. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b3a482a9642a6850f1717966f1c6630fcbbe3bc;p=mesa.git glsl: Skip unavailable built-ins when printing out similar candidates. Signed-off-by: Kenneth Graunke Reviewed-by: Matt Turner Reviewed-by: Paul Berry --- diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index 7580bec3209..e0fdfc3fe32 100644 --- a/src/glsl/ast_function.cpp +++ b/src/glsl/ast_function.cpp @@ -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);