mesa: set up gl_vert_result and gl_frag_attrib values for gl_ClipDistance.
[mesa.git] / src / glsl / ast_function.cpp
index c49a33d048639d2e35812ae175d3d1bde8743b98..ca45934a478ec311ab740545ff3bd3a6a51f754e 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)
@@ -194,6 +195,7 @@ match_function_by_name(exec_list *instructions, const char *name,
 
         if (formal->type->is_numeric() || formal->type->is_boolean()) {
             switch (formal->mode) {
+            case ir_var_const_in:
             case ir_var_in: {
                ir_rvalue *converted
                   = convert_component(actual, formal->type);