glsl: Bail after reporting an error for non-constant const_in parameters.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 25 Aug 2011 16:43:41 +0000 (09:43 -0700)
committerDave Airlie <airlied@redhat.com>
Thu, 25 Aug 2011 20:07:42 +0000 (21:07 +0100)
Otherwise we continue and hit the "Illegal formal parameter mode"
assertion.

Fixes negative compile test texelFetchOffset.frag in piglit.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/glsl/ast_function.cpp

index c49a33d048639d2e35812ae175d3d1bde8743b98..8b79d8505810854ed7cf2010c00911928e6447eb 100644 (file)
@@ -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)