glsl/linker: Check that re-declared, inter-shader built-in blocks match
authorEduardo Lima Mitev <elima@igalia.com>
Sun, 5 Mar 2017 19:28:43 +0000 (20:28 +0100)
committerNeil Roberts <nroberts@igalia.com>
Mon, 30 Oct 2017 17:10:39 +0000 (18:10 +0100)
commitf9de7f55969e981f6e98a41fce04bc3a2a8280eb
tree76be292c6d07cac2a20ffb5fd2645d10b121df4e
parentf5fe99ac85e15b705612bd9e7599cc974c2a121b
glsl/linker: Check that re-declared, inter-shader built-in blocks match

>From GLSL 4.5 spec, section "7.1 Built-In Language Variables", page 130 of
the PDF states:

    "If multiple shaders using members of a built-in block belonging to
     the same interface are linked together in the same program, they must
     all redeclare the built-in block in the same way, as described in
     section 4.3.9 “Interface Blocks” for interface-block matching, or a
     link-time error will result."

Fixes:
* GL45-CTS.CommonBugs.CommonBug_PerVertexValidation

v2 (Neil Roberts):
Explicitly look for gl_PerVertex in the symbol tables instead of
waiting to find a variable in the interface.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102677
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Eduardo Lima Mitev <elima@igalia.com>
Signed-off-by: Neil Roberts <nroberts@igalia.com>
src/compiler/glsl/link_interface_blocks.cpp