diff options
author | marha <marha@users.sourceforge.net> | 2013-09-10 10:38:33 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-09-10 10:42:30 +0200 |
commit | 2c1b75db27d66ff4760d624e44d1c1c6f42a4ca7 (patch) | |
tree | a32e3d5f8bb662ba5c14a72d97a553c4927c0b76 /mesalib/src/glsl/ast_function.cpp | |
parent | d53900c52abc2402f978b72278712e4bcdbde9f2 (diff) | |
parent | 889d7dd8e94a5538f388cc619115bf5c0b6fc0b7 (diff) | |
download | vcxsrv-2c1b75db27d66ff4760d624e44d1c1c6f42a4ca7.tar.gz vcxsrv-2c1b75db27d66ff4760d624e44d1c1c6f42a4ca7.tar.bz2 vcxsrv-2c1b75db27d66ff4760d624e44d1c1c6f42a4ca7.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig libX11 libXmu libxcb mesa xserver git update 10 Sep 2013
Conflicts:
mesalib/src/glsl/.gitignore
xorg-server/hw/xwin/InitOutput.c
xorg-server/hw/xwin/winclipboardwndproc.c
xorg-server/hw/xwin/winmultiwindowwm.c
xorg-server/hw/xwin/winsetsp.c
Diffstat (limited to 'mesalib/src/glsl/ast_function.cpp')
-rw-r--r-- | mesalib/src/glsl/ast_function.cpp | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/mesalib/src/glsl/ast_function.cpp b/mesalib/src/glsl/ast_function.cpp index 7df2b6925..02aad4f8f 100644 --- a/mesalib/src/glsl/ast_function.cpp +++ b/mesalib/src/glsl/ast_function.cpp @@ -388,7 +388,8 @@ match_function_by_name(const char *name, if (f != NULL) { /* Look for a match in the local shader. If exact, we're done. */ bool is_exact = false; - sig = local_sig = f->matching_signature(actual_parameters, &is_exact); + sig = local_sig = f->matching_signature(state, actual_parameters, + &is_exact); if (is_exact) goto done; @@ -402,33 +403,8 @@ match_function_by_name(const char *name, } /* Local shader has no exact candidates; check the built-ins. */ - _mesa_glsl_initialize_functions(state); - for (unsigned i = 0; i < state->num_builtins_to_link; i++) { - ir_function *builtin = - state->builtins_to_link[i]->symbols->get_function(name); - if (builtin == NULL) - continue; - - bool is_exact = false; - ir_function_signature *builtin_sig = - builtin->matching_signature(actual_parameters, &is_exact); - - if (builtin_sig == NULL) - continue; - - /* If the built-in signature is exact, we can stop. */ - if (is_exact) { - sig = builtin_sig; - goto done; - } - - if (sig == NULL) { - /* We found an inexact match, which is better than nothing. However, - * we should keep searching for an exact match. - */ - sig = builtin_sig; - } - } + _mesa_glsl_initialize_builtin_functions(); + sig = _mesa_glsl_find_builtin_function(state, name, actual_parameters); done: if (sig != NULL) { @@ -471,6 +447,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); |