glsl: Fix interstage uniform interface block link error detection.
authorPaul Berry <stereotype441@gmail.com>
Fri, 15 Nov 2013 22:23:45 +0000 (14:23 -0800)
committerPaul Berry <stereotype441@gmail.com>
Thu, 21 Nov 2013 23:05:09 +0000 (15:05 -0800)
commit544e3129c5addeb6c9539339782dd54616ef0499
treef615f76a4c237750a3f0af3ad13952f85ec5069b
parent0f4cacbb53c23e4fa027375c492edd17b40ae748
glsl: Fix interstage uniform interface block link error detection.

Previously, we checked for interstage uniform interface block link
errors in validate_interstage_interface_blocks(), which is only called
on pairs of adjacent shader stages.  Therefore, we failed to detect
uniform interface block mismatches between non-adjacent shader stages.

Before the introduction of geometry shaders, this wasn't a problem,
because the only supported shader stages were vertex and fragment
shaders, therefore they were always adjacent.  However, now that we
allow a program to contain vertex, geometry, and fragment shaders,
that is no longer the case.

Fixes piglit test "skip-stage-uniform-block-array-size-mismatch".

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
v2: Rename validate_interstage_interface_blocks() to
validate_interstage_inout_blocks() to reflect the fact that it no
longer validates uniform blocks.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
v3: Make validate_interstage_inout_blocks() skip uniform blocks.

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