glsl/linker: Check the subroutine associated functions names
authorVadym Shovkoplias <vadim.shovkoplias@gmail.com>
Wed, 3 Oct 2018 08:39:04 +0000 (11:39 +0300)
committerIago Toral Quiroga <itoral@igalia.com>
Thu, 4 Oct 2018 15:41:19 +0000 (17:41 +0200)
commit5f0567a4f60c6671d4e2a942ab3f3248dbbd6997
treecdd38d87df840f51a6046b2e7b8cdfe13064f2c7
parented53a79cf81b13e9c16517c70713a926d49a5fe6
glsl/linker: Check the subroutine associated functions names

>From Section 6.1.2 (Subroutines) of the GLSL 4.00 specification

    "A program will fail to compile or link if any shader
     or stage contains two or more functions with the same
     name if the name is associated with a subroutine type."

v2:
  - error out earlier (Tapani)
  - style fixes (Iago)

Fixes:
    * no-overloads.vert

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108109
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/compiler/glsl/linker.cpp