[Mesa-dev] [PATCH 07/21] glsl: Skip unavailable built-ins when printing out similar candidates.

Kenneth Graunke kenneth at whitecape.org
Wed Sep 4 15:22:30 PDT 2013


Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/glsl/ast_function.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 7580bec..e0fdfc3 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);
-- 
1.8.3.4



More information about the mesa-dev mailing list