summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/ast_function.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp
index f50c7bf7b71..37fb3e790c4 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -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")) {