mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
glsl/ast: subroutineTypes can't be returned from functions.
These types can't be returned. This fixes: GL43-CTS.shader_subroutine.subroutines_not_allowed_as_variables_constructors_and_argument_or_return_types for the return type case. Reviewed-by: Chris Forbes <chrisforbes@google.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
db2a35193f
commit
6effdce92e
1 changed files with 9 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue