glsl/linker: Always invalidate shader ins/outs, even in corner cases.
authorPaul Berry <stereotype441@gmail.com>
Wed, 5 Dec 2012 15:17:07 +0000 (07:17 -0800)
committerPaul Berry <stereotype441@gmail.com>
Fri, 14 Dec 2012 18:48:35 +0000 (10:48 -0800)
commit50895d443ae7b96cb7de6b41857393d4e129d6eb
treea95d8f1e6693dbb62d13924c2c848f9bebf4288e
parent18392443d448e083187d085965375e7de910b18a
glsl/linker: Always invalidate shader ins/outs, even in corner cases.

Previously, link_invalidate_variable_locations() was only called
during assign_attribute_or_color_locations() and
assign_varying_locations().  This meant that in the corner case when
there was only a vertex shader, and varyings were being captured by
transform feedback, link_invalidate_variable_locations() wasn't being
called for the varyings.

This patch migrates the calls to link_invalidate_variable_locations()
to link_shaders(), so that they will be called in all circumstances.
In addition, it modifies the call semantics so that
link_invalidate_variable_locations() need only be called once per
shader stage (rather than once for inputs and once for outputs).

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/linker.cpp