Otherwise we continue and hit the "Illegal formal parameter mode"
assertion.

Fixes negative compile test texelFetchOffset.frag in piglit.

Signed-off-by: Kenneth Graunke <kenn...@whitecape.org>
---
 src/glsl/ast_function.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index c49a33d..8b79d85 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -164,6 +164,7 @@ match_function_by_name(exec_list *instructions, const char 
*name,
            _mesa_glsl_error(loc, state,
                             "parameter `%s' must be a constant expression",
                             formal->name);
+           return ir_call::get_error_instruction(ctx);
         }
 
         if ((formal->mode == ir_var_out)
-- 
1.7.6

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to