diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index d6f9a750de7..ccacd266bb4 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -5400,6 +5400,15 @@ ast_function::hir(exec_list *instructions, name); } + /**/ + if (return_type->is_subroutine()) { + YYLTYPE loc = this->get_location(); + _mesa_glsl_error(&loc, state, + "function `%s' return type can't be a subroutine type", + name); + } + + /* Create an ir_function if one doesn't already exist. */ f = state->symbols->get_function(name); if (f == NULL) { |