From c25b4943322ddd31d70d87464fe32be26ac6c858 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 25 Aug 2011 09:43:41 -0700 Subject: [PATCH] glsl: Bail after reporting an error for non-constant const_in parameters. Otherwise we continue and hit the "Illegal formal parameter mode" assertion. Fixes negative compile test texelFetchOffset.frag in piglit. Signed-off-by: Kenneth Graunke Signed-off-by: Dave Airlie --- src/glsl/ast_function.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index c49a33d0486..8b79d850581 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) -- 2.30.2