[Mesa-dev] [PATCH 06/21] glsl: Skip unavailable built-ins when matching signatures.
Kenneth Graunke
kenneth at whitecape.org
Wed Sep 4 15:22:29 PDT 2013
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/glsl/ir_function.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/glsl/ir_function.cpp b/src/glsl/ir_function.cpp
index 2dd98bc..53cf469 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;
}
--
1.8.3.4
More information about the mesa-dev
mailing list