mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-26 07:00:31 +01:00
glsl: subroutine types cannot be used in constructors.
This fixes two of the cases in GL43-CTS.shader_subroutine.subroutines_not_allowed_as_variables_constructors_and_argument_or_return_types Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
3110a0aa23
commit
265fe9dce8
1 changed files with 6 additions and 0 deletions
|
|
@ -1819,6 +1819,12 @@ ast_function_expression::hir(exec_list *instructions,
|
|||
return ir_rvalue::error_value(ctx);
|
||||
}
|
||||
|
||||
if (constructor_type->is_subroutine()) {
|
||||
_mesa_glsl_error(& loc, state, "subroutine name cannot be a constructor `%s'",
|
||||
constructor_type->name);
|
||||
return ir_rvalue::error_value(ctx);
|
||||
}
|
||||
|
||||
if (constructor_type->is_array()) {
|
||||
if (!state->check_version(120, 300, &loc,
|
||||
"array constructors forbidden")) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue