diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2013-08-30 23:15:59 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-09-09 11:52:21 -0700 |
commit | 1ffcef04cee5eaa14617fa1dfb92fdb4a68332cf (patch) | |
tree | d5db6846b4492bfda7369d41e6e9c7395245ebd2 | |
parent | 3e820e3aef382fed73b6b8128596424ed7690951 (diff) |
glsl: Skip unavailable built-ins when matching signatures.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
-rw-r--r-- | src/glsl/ir_function.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/ir_function.cpp b/src/glsl/ir_function.cpp index 2dd98bcc29..53cf469d9c 100644 --- a/src/glsl/ir_function.cpp +++ b/src/glsl/ir_function.cpp @@ -145,6 +145,10 @@ ir_function::matching_signature(_mesa_glsl_parse_state *state, ir_function_signature *const sig = (ir_function_signature *) iter.get(); + /* Skip over any built-ins that aren't available in this shader. */ + if (sig->is_builtin() && !sig->is_builtin_available(state)) + continue; + switch (parameter_lists_match(& sig->parameters, actual_parameters)) { case PARAMETER_LIST_EXACT_MATCH: *is_exact = true; @@ -212,6 +216,10 @@ ir_function::exact_matching_signature(_mesa_glsl_parse_state *state, ir_function_signature *const sig = (ir_function_signature *) iter.get(); + /* Skip over any built-ins that aren't available in this shader. */ + if (sig->is_builtin() && !sig->is_builtin_available(state)) + continue; + if (parameter_lists_match_exact(&sig->parameters, actual_parameters)) return sig; } |