summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-06-21 10:29:49 -0700
committerIan Romanick <[email protected]>2016-07-19 12:19:28 -0700
commit806add360ff2ffbf70c6a52c64115fcb7ef718bd (patch)
tree8c23dbe8fb337aa761021583d8b2288173a645a4
parent90537e1a0e97737c123742fb88fce7efd2284c04 (diff)
MESA_shader_integer_functions: Allow new function overload matching rules
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--src/compiler/glsl/ir_function.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/compiler/glsl/ir_function.cpp b/src/compiler/glsl/ir_function.cpp
index 0b4cb4bd30d..c0b62af11a9 100644
--- a/src/compiler/glsl/ir_function.cpp
+++ b/src/compiler/glsl/ir_function.cpp
@@ -268,11 +268,13 @@ choose_best_inexact_overload(_mesa_glsl_parse_state *state,
if (num_matches == 1)
return *matches;
- /* Without GLSL 4.0 / ARB_gpu_shader5, there is no overload resolution
- * among multiple inexact matches. Note that state may be NULL here if
- * called from the linker; in that case we assume everything supported in
- * any GLSL version is available. */
- if (!state || state->is_version(400, 0) || state->ARB_gpu_shader5_enable) {
+ /* Without GLSL 4.0, ARB_gpu_shader5, or MESA_shader_integer_functions,
+ * there is no overload resolution among multiple inexact matches. Note
+ * that state may be NULL here if called from the linker; in that case we
+ * assume everything supported in any GLSL version is available.
+ */
+ if (!state || state->is_version(400, 0) || state->ARB_gpu_shader5_enable ||
+ state->MESA_shader_integer_functions_enable) {
for (ir_function_signature **sig = matches; sig < matches + num_matches; sig++) {
if (is_best_inexact_overload(actual_parameters, matches, num_matches, *sig))
return *sig;