*/
_mesa_glsl_error(loc, state, "no matching function for call to `%s'",
f->name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
}
YYLTYPE *loc, exec_list *actual_parameters,
struct _mesa_glsl_parse_state *state)
{
+ void *ctx = talloc_parent(state);
ir_function *f = state->symbols->get_function(name);
if (f == NULL) {
_mesa_glsl_error(loc, state, "function `%s' undeclared", name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
/* Once we've determined that the function being called might exist, try
YYLTYPE *loc, exec_list *parameters,
struct _mesa_glsl_parse_state *state)
{
+ void *ctx = talloc_parent(state);
/* Array constructors come in two forms: sized and unsized. Sized array
* constructors look like 'vec4[2](a, b)', where 'a' and 'b' are vec4
* variables. In this case the number of parameters must exactly match the
"parameter%s",
(constructor_type->length != 0) ? "at least" : "exactly",
min_param, (min_param <= 1) ? "" : "s");
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
if (constructor_type->length == 0) {
if (constructor_type->is_sampler()) {
_mesa_glsl_error(& loc, state, "cannot construct sampler type `%s'",
constructor_type->name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
if (constructor_type->is_array()) {
if (state->language_version <= 110) {
_mesa_glsl_error(& loc, state,
"array constructors forbidden in GLSL 1.10");
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
return process_array_constructor(instructions, constructor_type,
_mesa_glsl_error(& loc, state, "too few components to construct "
"`%s'",
constructor_type->name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
foreach_list (n, &this->expressions) {
_mesa_glsl_error(& loc, state, "too many parameters to `%s' "
"constructor",
constructor_type->name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
if (!result->type->is_numeric() && !result->type->is_boolean()) {
_mesa_glsl_error(& loc, state, "cannot construct `%s' from a "
"non-numeric data type",
constructor_type->name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
/* Count the number of matrix and nonmatrix parameters. This
_mesa_glsl_error(& loc, state, "cannot construct `%s' from a "
"matrix in GLSL 1.10",
constructor_type->name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
/* From page 50 (page 56 of the PDF) of the GLSL 1.50 spec:
_mesa_glsl_error(& loc, state, "for matrix `%s' constructor, "
"matrix must be only parameter",
constructor_type->name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
/* From page 28 (page 34 of the PDF) of the GLSL 1.10 spec:
_mesa_glsl_error(& loc, state, "too few components to construct "
"`%s'",
constructor_type->name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
ir_function *f = state->symbols->get_function(constructor_type->name);
if (f == NULL) {
_mesa_glsl_error(& loc, state, "no constructor for type `%s'",
constructor_type->name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
const ir_function_signature *sig =
*/
_mesa_glsl_error(& loc, state, "no matching constructor for `%s'",
constructor_type->name);
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}
}
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
} else {
const ast_expression *id = subexpressions[0];
YYLTYPE loc = id->get_location();
&actual_parameters, state);
}
- return ir_call::get_error_instruction();
+ return ir_call::get_error_instruction(ctx);
}