glsl: subroutine signatures must match exactly
authorYevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Wed, 20 May 2020 16:16:28 +0000 (19:16 +0300)
committerMarge Bot <eric+marge@anholt.net>
Sun, 24 May 2020 23:55:44 +0000 (23:55 +0000)
commitc7943343a0fc2463987f667658a257b74cec1782
tree502d0d51aec5d3c6623cdbd97a9181173d18914d
parent5bc18b79a4625ae39f1d44e8139017834a53736c
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>
src/compiler/glsl/ir_function.cpp