aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_function.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-09-02 23:14:43 -0700
committerKenneth Graunke <[email protected]>2013-09-09 11:52:21 -0700
commit1b3a482a9642a6850f1717966f1c6630fcbbe3bc (patch)
tree46d4970679454d6861458889d50a8358ef7fa070 /src/glsl/ast_function.cpp
parent1ffcef04cee5eaa14617fa1dfb92fdb4a68332cf (diff)
glsl: Skip unavailable built-ins when printing out similar candidates.
Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/ast_function.cpp')
-rw-r--r--src/glsl/ast_function.cpp3
1 files changed, 3 insertions, 0 deletions
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);