glsl: Fix cross-version linking between VS and GS.
authorPaul Berry <stereotype441@gmail.com>
Wed, 20 Nov 2013 01:48:02 +0000 (17:48 -0800)
committerPaul Berry <stereotype441@gmail.com>
Thu, 21 Nov 2013 23:05:06 +0000 (15:05 -0800)
commit0f4cacbb53c23e4fa027375c492edd17b40ae748
tree307c1bdceb7a8aa0626a77ed61eba8b4dd3931c4
parent2bbcf19acad530d339ffe8e007fe2f6a244e1580
glsl: Fix cross-version linking between VS and GS.

Previously, when attempting to link a vertex shader and a geometry
shader that use different GLSL versions, we would sometimes generate a
link error due to the implicit declaration of gl_PerVertex being
different between the two GLSL versions.

This patch fixes that problem by only requiring interface block
definitions to match when they are explicitly declared.

Fixes piglit test "shaders/version-mixing vs-gs".

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
v2: In the interface_block_definition constructor, move the assignment
to explicitly_declared after the existing if block.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/link_interface_blocks.cpp