Commit 265fe9dc authored by Dave Airlie's avatar Dave Airlie
Browse files

glsl: subroutine types cannot be used in constructors.

This fixes two of the cases in
Reviewed-by: Iago Toral's avatarIago Toral Quiroga <>
Signed-off-by: default avatarDave Airlie <>
parent 3110a0aa
......@@ -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'",
return ir_rvalue::error_value(ctx);
if (constructor_type->is_array()) {
if (!state->check_version(120, 300, &loc,
"array constructors forbidden")) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment