mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
glsl: Reject structure constructors that have too many arguments.
Fixes piglit test constructor-27.vert.
This commit is contained in:
parent
e466b182bb
commit
cfe0dd5622
1 changed files with 6 additions and 0 deletions
|
|
@ -1207,6 +1207,12 @@ ast_function_expression::hir(exec_list *instructions,
|
|||
node = node->next;
|
||||
}
|
||||
|
||||
if (!node->is_tail_sentinel()) {
|
||||
_mesa_glsl_error(&loc, state, "too many parameters in constructor "
|
||||
"for `%s'", type->name);
|
||||
return ir_call::get_error_instruction(ctx);
|
||||
}
|
||||
|
||||
ir_rvalue *const constant =
|
||||
constant_record_constructor(type, &actual_parameters, state);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue