diff options
Diffstat (limited to 'src/compiler/glsl/builtin_functions.cpp')
-rw-r--r-- | src/compiler/glsl/builtin_functions.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp index cc1432197b9..84833bdd7d5 100644 --- a/src/compiler/glsl/builtin_functions.cpp +++ b/src/compiler/glsl/builtin_functions.cpp @@ -6227,14 +6227,23 @@ _mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state, } bool -_mesa_glsl_has_builtin_function(const char *name) +_mesa_glsl_has_builtin_function(_mesa_glsl_parse_state *state, const char *name) { ir_function *f; + bool ret = false; mtx_lock(&builtins_lock); f = builtins.shader->symbols->get_function(name); + if (f != NULL) { + foreach_in_list(ir_function_signature, sig, &f->signatures) { + if (sig->is_builtin_available(state)) { + ret = true; + break; + } + } + } mtx_unlock(&builtins_lock); - return f != NULL; + return ret; } gl_shader * |