mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
glsl: subroutine signatures must match exactly
From GLSL 4.60.7 spec, section 6.1.2 "Subroutines": It is a compile-time error if arguments and return type don’t match between the function and each associated subroutine type. Before, if subroutine type and implementation function were declared with types, that could be implicitly converted, it led to a runtime crash. Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5125>
This commit is contained in:
parent
5bc18b79a4
commit
c7943343a0
1 changed files with 3 additions and 0 deletions
|
|
@ -329,6 +329,9 @@ ir_function::matching_signature(_mesa_glsl_parse_state *state,
|
|||
free(inexact_matches);
|
||||
return sig;
|
||||
case PARAMETER_LIST_INEXACT_MATCH:
|
||||
/* Subroutine signatures must match exactly */
|
||||
if (this->is_subroutine)
|
||||
continue;
|
||||
inexact_matches_temp = (ir_function_signature **)
|
||||
realloc(inexact_matches,
|
||||
sizeof(*inexact_matches) *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue