summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_function.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-09-01 20:48:45 -0700
committerKenneth Graunke <[email protected]>2013-09-09 14:42:33 -0700
commit76d2f73643f5502d88fdc272447753fde8f6438b (patch)
tree6687a192a0373a6b398c0b58219708296aa6c6bf /src/glsl/ast_function.cpp
parent7ddc312c1b2c610ba8f244b49f4c4bc94eeca985 (diff)
glsl: Switch to the new built-in function module.
All built-ins are now handled by the new code; the old system is dead. 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.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index e0fdfc3fe32..02aad4f8f85 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -403,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(state, 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) {